mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
vgchange: acquire an exclusive VG lock for refresh
Concurrent vgchange --refresh commands can lead to hung tasks in dm code. Signed-off-by: wangzhiqiang <wangzhiqiang95@huawei.com>
This commit is contained in:
parent
092f58a762
commit
65d23a1d75
@ -1008,7 +1008,8 @@ int vgchange(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
|
|
||||||
if (update)
|
if (update)
|
||||||
flags |= READ_FOR_UPDATE;
|
flags |= READ_FOR_UPDATE;
|
||||||
else if (arg_is_set(cmd, activate_ARG))
|
else if (arg_is_set(cmd, activate_ARG) ||
|
||||||
|
arg_is_set(cmd, refresh_ARG))
|
||||||
flags |= READ_FOR_ACTIVATE;
|
flags |= READ_FOR_ACTIVATE;
|
||||||
|
|
||||||
if (!(handle = init_processing_handle(cmd, NULL))) {
|
if (!(handle = init_processing_handle(cmd, NULL))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user