mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +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)
|
||||
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;
|
||||
|
||||
if (!(handle = init_processing_handle(cmd, NULL))) {
|
||||
|
Loading…
Reference in New Issue
Block a user