There is a system-wide sync call at the end of mkdumprd, move it to kdumpctl after rebuild initrd and add another one for mkfadumprd. Sync only the $TARGET_INITRD to avoid a system-wide sync taking too long on a system with high disk activity.
Also update the sync in kdumpctl:restore_default_initrd which will mv the $DEFAULT_INITRD_BAK to $DEFAULT_INITRD.
Signed-off-by: Lichen Liu lichliu@redhat.com --- kdumpctl | 4 +++- mkdumprd | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/kdumpctl b/kdumpctl index 9fd76ac..8ad47bf 100755 --- a/kdumpctl +++ b/kdumpctl @@ -79,6 +79,7 @@ rebuild_fadump_initrd() return 1 fi
+ sync -f "$TARGET_INITRD" return 0 }
@@ -100,6 +101,7 @@ rebuild_kdump_initrd() dwarn "Tips: If early kdump is enabled, also require rebuilding the system initramfs to make the changes take effect for early kdump." fi
+ sync -f "$TARGET_INITRD" return 0 }
@@ -180,7 +182,7 @@ restore_default_initrd() rm -f $INITRD_CHECKSUM_LOCATION if mv "$DEFAULT_INITRD_BAK" "$DEFAULT_INITRD"; then derror "Restoring original initrd as fadump mode is disabled." - sync + sync -f "$DEFAULT_INITRD" fi fi fi diff --git a/mkdumprd b/mkdumprd index 593ec77..5996d50 100644 --- a/mkdumprd +++ b/mkdumprd @@ -458,7 +458,3 @@ if ! is_fadump_capable; then fi
dracut "${dracut_args[@]}" "$@" - -_rc=$? -sync -exit $_rc
Hi Lichen,
On Tue, 1 Mar 2022 13:09:00 +0800 Lichen Liu lichliu@redhat.com wrote:
There is a system-wide sync call at the end of mkdumprd, move it to kdumpctl after rebuild initrd and add another one for mkfadumprd. Sync only the $TARGET_INITRD to avoid a system-wide sync taking too long on a system with high disk activity.
Also update the sync in kdumpctl:restore_default_initrd which will mv the $DEFAULT_INITRD_BAK to $DEFAULT_INITRD.
Signed-off-by: Lichen Liu lichliu@redhat.com
looks good. Thanks!
Reviewed-by: Philipp Rudo prudo@redhat.com
kdumpctl | 4 +++- mkdumprd | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/kdumpctl b/kdumpctl index 9fd76ac..8ad47bf 100755 --- a/kdumpctl +++ b/kdumpctl @@ -79,6 +79,7 @@ rebuild_fadump_initrd() return 1 fi
- sync -f "$TARGET_INITRD" return 0
}
@@ -100,6 +101,7 @@ rebuild_kdump_initrd() dwarn "Tips: If early kdump is enabled, also require rebuilding the system initramfs to make the changes take effect for early kdump." fi
- sync -f "$TARGET_INITRD" return 0
}
@@ -180,7 +182,7 @@ restore_default_initrd() rm -f $INITRD_CHECKSUM_LOCATION if mv "$DEFAULT_INITRD_BAK" "$DEFAULT_INITRD"; then derror "Restoring original initrd as fadump mode is disabled."
sync
fi fisync -f "$DEFAULT_INITRD" fidiff --git a/mkdumprd b/mkdumprd index 593ec77..5996d50 100644 --- a/mkdumprd +++ b/mkdumprd @@ -458,7 +458,3 @@ if ! is_fadump_capable; then fi
dracut "${dracut_args[@]}" "$@"
-_rc=$? -sync -exit $_rc
On Tue, Mar 01, 2022 at 09:56:52AM +0100, Philipp Rudo wrote:
Hi Lichen,
On Tue, 1 Mar 2022 13:09:00 +0800 Lichen Liu lichliu@redhat.com wrote:
There is a system-wide sync call at the end of mkdumprd, move it to kdumpctl after rebuild initrd and add another one for mkfadumprd. Sync only the $TARGET_INITRD to avoid a system-wide sync taking too long on a system with high disk activity.
Also update the sync in kdumpctl:restore_default_initrd which will mv the $DEFAULT_INITRD_BAK to $DEFAULT_INITRD.
Signed-off-by: Lichen Liu lichliu@redhat.com
looks good. Thanks!
Reviewed-by: Philipp Rudo prudo@redhat.com
Patch merged, thanks to Lichen and Philipp!
kdumpctl | 4 +++- mkdumprd | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/kdumpctl b/kdumpctl index 9fd76ac..8ad47bf 100755 --- a/kdumpctl +++ b/kdumpctl @@ -79,6 +79,7 @@ rebuild_fadump_initrd() return 1 fi
- sync -f "$TARGET_INITRD" return 0
}
@@ -100,6 +101,7 @@ rebuild_kdump_initrd() dwarn "Tips: If early kdump is enabled, also require rebuilding the system initramfs to make the changes take effect for early kdump." fi
- sync -f "$TARGET_INITRD" return 0
}
@@ -180,7 +182,7 @@ restore_default_initrd() rm -f $INITRD_CHECKSUM_LOCATION if mv "$DEFAULT_INITRD_BAK" "$DEFAULT_INITRD"; then derror "Restoring original initrd as fadump mode is disabled."
sync
fi fisync -f "$DEFAULT_INITRD" fidiff --git a/mkdumprd b/mkdumprd index 593ec77..5996d50 100644 --- a/mkdumprd +++ b/mkdumprd @@ -458,7 +458,3 @@ if ! is_fadump_capable; then fi
dracut "${dracut_args[@]}" "$@"
-_rc=$? -sync -exit $_rc
kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure