summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2017-10-19 13:18:49 -0500
committerDavid Teigland <teigland@redhat.com>2017-10-19 13:18:49 -0500
commit37a895803d2d174c3a0cba2d58e2b75fc615a909 (patch)
tree9870027e16cf51fda6e6c4deb0490c0a76f5812a
parent8ea997bfccef083ecda40c01c3190fffc0c4c88a (diff)
downloadlvm2-dev-dct-new-scan-8.tar.gz
add longer comment about independent metadata areasdev-dct-new-scan-8
and how rescanning labels doesn't apply when reading metadata from files.
-rw-r--r--lib/cache/lvmcache.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index e753dd0ff..519a5d480 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -1172,6 +1172,18 @@ next:
* scan, and if they all match, consider it good enough to use for
* reporting without rereading it. (A command modifying the VG would
* always want to reread while the lock is held before modifying.)
+ *
+ * A label scan is ultimately creating associations between devices
+ * and VGs so that when vg_read wants to get VG metadata, it knows
+ * which devices to read. In the special case where VG metadata is
+ * stored in files on the file system (configured in lvm.conf), the
+ * vginfo->independent_metadata_location flag is set during label scan.
+ * When we get here to rescan, we are revalidating the device to VG
+ * mapping from label scan by repeating the label scan on a subset of
+ * devices. If we see independent_metadata_location is set from the
+ * initial label scan, we know that there is nothing to do because
+ * there is no device to VG mapping to revalidate, since the VG metadata
+ * comes directly from files.
*/
int lvmcache_label_rescan_vg(struct cmd_context *cmd, const char *vgname, const char *vgid)