diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2015-08-21 14:01:06 +0200 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2016-02-04 16:20:33 +0100 |
commit | fbcff2833c77b9d691afc4f6474bb67f045f1da0 (patch) | |
tree | b0bf71e96b001234810cedc1f9ade277a4e4bbf0 | |
parent | a10b9c3292b2452c49cd7ffca439d16b77799bff (diff) | |
download | lvm2-fbcff2833c77b9d691afc4f6474bb67f045f1da0.tar.gz |
cmd: add 'nohistory' option and wire it up in cmd_context
The --nohistory switch will cause removed LVs to not be recorded
in metadata on demand.
-rw-r--r-- | lib/commands/toolcontext.h | 1 | ||||
-rw-r--r-- | tools/args.h | 1 | ||||
-rw-r--r-- | tools/lvmcmdline.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h index 627af649a..222c8f0bc 100644 --- a/lib/commands/toolcontext.h +++ b/lib/commands/toolcontext.h @@ -128,6 +128,7 @@ struct cmd_context { unsigned threaded:1; /* set if running within a thread e.g. clvmd */ unsigned independent_metadata_areas:1; /* active formats have MDAs outside PVs */ unsigned unknown_system_id:1; + unsigned record_dead_entities:1; /* record dead entities */ unsigned include_dead_entities:1; /* also process/report/display dead entities */ unsigned include_foreign_vgs:1; /* report/display cmds can reveal foreign VGs */ unsigned include_shared_vgs:1; /* report/display cmds can reveal lockd VGs */ diff --git a/tools/args.h b/tools/args.h index 3210a2b24..bed8b9de9 100644 --- a/tools/args.h +++ b/tools/args.h @@ -69,6 +69,7 @@ arg(mknodes_ARG, '\0', "mknodes", NULL, 0) arg(monitor_ARG, '\0', "monitor", yes_no_arg, 0) arg(nameprefixes_ARG, '\0', "nameprefixes", NULL, 0) arg(noheadings_ARG, '\0', "noheadings", NULL, 0) +arg(nohistory_ARG, '\0', "nohistory", NULL, 0) arg(nolocking_ARG, '\0', "nolocking", NULL, 0) arg(norestorefile_ARG, '\0', "norestorefile", NULL, 0) arg(nosuffix_ARG, '\0', "nosuffix", NULL, 0) diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index 828426df2..c5dc907fc 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -1102,6 +1102,7 @@ static int _get_settings(struct cmd_context *cmd) cmd->include_foreign_vgs = arg_is_set(cmd, foreign_ARG) ? 1 : 0; cmd->include_shared_vgs = arg_is_set(cmd, shared_ARG) ? 1 : 0; cmd->include_dead_entities = arg_is_set(cmd, removed_ARG) ? 1 : 0; + cmd->record_dead_entities = arg_is_set(cmd, nohistory_ARG) ? 0 : 1; /* * This is set to zero by process_each which wants to print errors |