diff options
author | David Teigland <teigland@redhat.com> | 2019-04-30 14:10:27 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2019-04-30 14:10:27 -0500 |
commit | 366c1ac15b853fe3efc95472c569efc575f1237f (patch) | |
tree | f762b3b79d37373d1e716a416f47fb6115f4324b /tools/vgextend.c | |
parent | 6d0f09f4783061054152ae0013d7ebfad949c343 (diff) | |
download | lvm2-366c1ac15b853fe3efc95472c569efc575f1237f.tar.gz |
pvcreate: call label scan prior to pvcreate_each_device
and don't call it from inside pvcreate_each_device.
This avoids having to repeat it for users of
pvcreate_each_device (pvcreate/pvremove/vgcreate/vgextend.)
Diffstat (limited to 'tools/vgextend.c')
-rw-r--r-- | tools/vgextend.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/vgextend.c b/tools/vgextend.c index 02da3a867..785be3fa3 100644 --- a/tools/vgextend.c +++ b/tools/vgextend.c @@ -162,6 +162,8 @@ int vgextend(struct cmd_context *cmd, int argc, char **argv) clear_hint_file(cmd); + lvmcache_label_scan(cmd); + if (!(handle = init_processing_handle(cmd, NULL))) { log_error("Failed to initialize processing handle."); return ECMD_FAILED; @@ -185,7 +187,7 @@ int vgextend(struct cmd_context *cmd, int argc, char **argv) handle->custom_handle = &vp; ret = process_each_vg(cmd, 0, NULL, vg_name, NULL, - READ_FOR_UPDATE, 0, handle, + READ_FOR_UPDATE | PROCESS_SKIP_SCAN, 0, handle, restoremissing ? &_vgextend_restoremissing : &_vgextend_single); destroy_processing_handle(cmd, handle); |