diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2016-03-01 15:25:14 +0100 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2016-03-03 13:49:15 +0100 |
commit | 9a34de9cb9c1e8585f11bbb79bc447fdbdf7ea31 (patch) | |
tree | 079300ba5192e7945bdaf80355701bd24788b350 | |
parent | 8f47119f6fb00b685d3a631ca9464ab940ee256a (diff) | |
download | lvm2-9a34de9cb9c1e8585f11bbb79bc447fdbdf7ea31.tar.gz |
cmd: add 'nohistory' option and wire it up in cmd_context
The --nohistory switch will cause historical 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 | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h index b5328e803..6a6267d1d 100644 --- a/lib/commands/toolcontext.h +++ b/lib/commands/toolcontext.h @@ -129,6 +129,7 @@ struct cmd_context { unsigned independent_metadata_areas:1; /* active formats have MDAs outside PVs */ unsigned unknown_system_id:1; unsigned include_historical_lvs:1; /* also process/report/display historical LVs */ + unsigned record_historical_lvs:1; /* record historical LVs */ unsigned include_foreign_vgs:1; /* report/display cmds can reveal foreign VGs */ unsigned include_shared_vgs:1; /* report/display cmds can reveal lockd VGs */ unsigned include_active_foreign_vgs:1; /* cmd should process foreign VGs with active LVs */ diff --git a/tools/args.h b/tools/args.h index 8dfe7440c..dc7b9e15c 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 4a5cd2355..ffe8447de 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -1102,6 +1102,8 @@ 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_historical_lvs = arg_is_set(cmd, history_ARG) ? 1 : 0; + cmd->include_historical_lvs = arg_is_set(cmd, history_ARG) ? 1 : 0; + cmd->record_historical_lvs = arg_is_set(cmd, nohistory_ARG) ? 0 : 1; /* * This is set to zero by process_each which wants to print errors |