summaryrefslogtreecommitdiffstats
path: root/lib/commands
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2010-12-10 22:39:52 +0000
committerAlasdair Kergon <agk@redhat.com>2010-12-10 22:39:52 +0000
commitacb037657cf4ffb5b36e20881bdffd954e6249cf (patch)
treef7189777eb7cc0baa63f7ca30c3cce26fb888147 /lib/commands
parent706edf60d564996ea018573e495c5946872d9062 (diff)
downloadlvm2-acb037657cf4ffb5b36e20881bdffd954e6249cf.tar.gz
lvm2-acb037657cf4ffb5b36e20881bdffd954e6249cf.tar.xz
lvm2-acb037657cf4ffb5b36e20881bdffd954e6249cf.zip
Fix scanning of VGs without in-PV mdas.
Set cmd->independent_metadata_areas if metadata/dirs or disk_areas in use. - Identify and record this state. Don't skip full scan when independent mdas are present even if memlock is set. - Clusters and OOM aren't supported, so no problem doing the proper scans. Avoid revalidating the label cache immediately after scanning. - A simple optimisation. Support scanning for a single VG in independent mdas. - Not used by the fix but I left it in anyway as later patches might use it.
Diffstat (limited to 'lib/commands')
-rw-r--r--lib/commands/toolcontext.c3
-rw-r--r--lib/commands/toolcontext.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 8dd7d6f8..c59238de 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -1138,6 +1138,7 @@ struct cmd_context *create_toolcontext(unsigned is_long_lived,
cmd->is_long_lived = is_long_lived;
cmd->handles_missing_pvs = 0;
cmd->handles_unknown_segments = 0;
+ cmd->independent_metadata_areas = 0;
cmd->hosttags = 0;
dm_list_init(&cmd->arg_value_groups);
dm_list_init(&cmd->formats);
@@ -1246,6 +1247,8 @@ static void _destroy_formats(struct cmd_context *cmd, struct dm_list *formats)
dlclose(lib);
#endif
}
+
+ cmd->independent_metadata_areas = 0;
}
static void _destroy_segtypes(struct dm_list *segtypes)
diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h
index 04fd755c..4628c7c2 100644
--- a/lib/commands/toolcontext.h
+++ b/lib/commands/toolcontext.h
@@ -78,6 +78,8 @@ struct cmd_context {
unsigned si_unit_consistency:1;
unsigned metadata_read_only:1;
+ unsigned independent_metadata_areas:1; /* Active formats have MDAs outside PVs */
+
struct dev_filter *filter;
int dump_filter; /* Dump filter when exiting? */