diff options
author | David Teigland <teigland@redhat.com> | 2019-06-11 16:17:24 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2019-06-21 10:57:49 -0500 |
commit | d16142f90fdcf2aef42a51ecabd0c4ff11733d7c (patch) | |
tree | fb1d4202c96e45e2d37c53514381b888ce04e7b6 /tools/vgchange.c | |
parent | 8fecd9c14e0b3f62cc4de6ddac0a015db687b335 (diff) | |
download | lvm2-d16142f90fdcf2aef42a51ecabd0c4ff11733d7c.tar.gz |
scanning: open devs rw when rescanning for write
When vg_read rescans devices with the intention of
writing the VG, the label rescan can open the devs
RW so they do not need to be closed and reopened
RW in dev_write_bytes.
Diffstat (limited to 'tools/vgchange.c')
-rw-r--r-- | tools/vgchange.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/vgchange.c b/tools/vgchange.c index a17f4566f..aad6db32f 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -800,8 +800,10 @@ int vgchange(struct cmd_context *cmd, int argc, char **argv) cmd->lockd_vg_enforce_sh = 1; } - if (update || arg_is_set(cmd, activate_ARG)) + if (update) flags |= READ_FOR_UPDATE; + else if (arg_is_set(cmd, activate_ARG)) + flags |= READ_FOR_ACTIVATE; if (!(handle = init_processing_handle(cmd, NULL))) { log_error("Failed to initialize processing handle."); |