Hi Kairui Song,
Thanks for the review..
On 31/01/19 12:01 PM, Kairui Song wrote:
On Wed, Jan 30, 2019 at 9:20 PM Hari Bathini hbathini@linux.ibm.com wrote:
With kernel commit 0823c68b054b ("powerpc/fadump: re-register firmware- assisted dump if already registered") support is enabled to re-register when FADump is alredy registered. Leverage that option in kdump scripts.
Signed-off-by: Hari Bathini hbathini@linux.ibm.com
kdumpctl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index de6da39..c93c3fa 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1047,7 +1047,8 @@ reload() fi
if [ $DEFAULT_DUMP_MODE == "fadump" ]; then
stop_fadump
reload_fadump
return $? else stop_kdump fi
@@ -1103,6 +1104,19 @@ stop_kdump() return 0 }
+reload_fadump() +{
start_fadump
if [ $? != 0 ]; then
# FADump could fail on older kernel where re-register
# support is not enabled. Try stop/start from userspace
# to handle such scenario.
stop_fadump
start_fadump
return $?
fi
+}
- stop() { if [ $DEFAULT_DUMP_MODE == "fadump" ]; then
kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org
Thanks for the patch. But start_fadump won't check if the return value of "echo 1 > $FADUMP_REGISTER_SYS_NODE", it only check if fadump is registered after the echo operation, so it will also success on an older kernel and this will break the reload on older kernels.
Posted V2 fixing it..
- Hari