On 08/30/2017 at 02:21 PM, Dave Young wrote:
Hi Xunlei,
On 08/30/17 at 10:12am, Xunlei Pang wrote:
With the help of "--hostonly-cmdline", dracut will generate the needed cmdlines for the dump target, so we can avoid the corresponding inheritage.
Change the code style in passing.
Signed-off-by: Xunlei Pang xlpang@redhat.com
kdumpctl | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/kdumpctl b/kdumpctl index 4c11bc9..1a24d29 100755 --- a/kdumpctl +++ b/kdumpctl @@ -181,32 +181,35 @@ prepare_cmdline() local cmdline id
if [ -z "$KDUMP_COMMANDLINE" ]; then
cmdline=`cat /proc/cmdline`
cmdline=$(cat /proc/cmdline)else cmdline=${KDUMP_COMMANDLINE} fi
# These params should always be removed
- cmdline=`remove_cmdline_param "$cmdline" crashkernel panic_on_warn`
- cmdline=$(remove_cmdline_param "$cmdline" crashkernel panic_on_warn) # These params can be removed configurably
- cmdline=`remove_cmdline_param "$cmdline" ${KDUMP_COMMANDLINE_REMOVE}`
cmdline=$(remove_cmdline_param "$cmdline" ${KDUMP_COMMANDLINE_REMOVE})
# Always remove "root=X", as we now explicitly generate all kinds # of dump target mount information including root fs. But we can
- # not remove it in case of fadump or "default dump_to_rootfs".
- # not remove it in case of "default dump_to_rootfs". # # We do this before KDUMP_COMMANDLINE_APPEND, if one really cares # about it(e.g. for debug purpose), then can pass "root=X" using # KDUMP_COMMANDLINE_APPEND.
- if [ $DEFAULT_DUMP_MODE != "fadump" ] && ! is_dump_to_rootfs; then
cmdline=`remove_cmdline_param "$cmdline" root`
- if ! is_dump_to_rootfs; then
cmdline=$(remove_cmdline_param "$cmdline" root)In patch 6/8, you added rootfs device in case is_dump_to_rootfs so above checking is useless?
They are different, removing "root=X" is to skip systemd fstable mount generator. PATCH 6/8 is to notify dracut to mark root device as host devices(i.e. host_devs[]).
Regards, Xunlei
fi
- # With the help of "--hostonly-cmdline", we can avoid some interitage.
- cmdline=$(remove_cmdline_param "$cmdline" rd.lvm.lv rd.luks.uuid rd.dm.uuid rd.md.uuid fcoe)
- cmdline="${cmdline} ${KDUMP_COMMANDLINE_APPEND}"
- id=`get_bootcpu_apicid`
- id=$(get_bootcpu_apicid) if [ ! -z ${id} ] ; then
cmdline=`append_cmdline "${cmdline}" disable_cpu_apicid ${id}`
cmdline=$(append_cmdline "${cmdline}" disable_cpu_apicid ${id})fi
KDUMP_COMMANDLINE=$cmdline
-- 1.8.3.1
Thanks Dave