diff options
author | Tejun Heo <tj@kernel.org> | 2015-03-26 14:56:26 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2015-04-15 10:05:59 +0900 |
commit | ca718aa5070bb528c6f49172dee724a37dbd1e8a (patch) | |
tree | ad1138b6be3f48cc20d0f5ca0f5d725bc31a9b20 /kexec/kexec.c | |
parent | 6eb1c19a45bc5476ee9919241426d69288f3090a (diff) |
kexec: implement -y (--no-sync) option
During kernel develoment, kexec can be used to get out of sticky
situations without going through possibly lenghty reboot; however,
there are situations where the filesystem and/or storage stack are
known to be misbehaving and performing sync before kexecing is
dangerous or just never finishes.
This patch implement -y (--no-sync) option which makes kexec skip
syncing in the similar way as -x (--no-ifdown).
Signed-off-by: Tejun Heo <tj@kernel.org>
Suggested-by: Chris Mason <clm@fb.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec.c')
-rw-r--r-- | kexec/kexec.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kexec/kexec.c b/kexec/kexec.c index b088916..7123460 100644 --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -913,7 +913,10 @@ void usage(void) " -f, --force Force an immediate kexec,\n" " don't call shutdown.\n" " -x, --no-ifdown Don't bring down network interfaces.\n" - " (if used, must be last option\n" + " (if used, must be one of last options\n" + " specified)\n" + " -y, --no-sync Don't sync filesystems before kexec.\n" + " (if used, must be one of last options\n" " specified)\n" " -l, --load Load the new kernel into the\n" " current kernel.\n" @@ -1218,6 +1221,9 @@ int main(int argc, char *argv[]) case OPT_NOIFDOWN: do_ifdown = 0; break; + case OPT_NOSYNC: + do_sync = 0; + break; case OPT_FORCE: do_load = 1; do_shutdown = 0; |