From: David Teigland <teigland@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: lixiaokeng@huawei.com, louhongxiang@huawei.com
Subject: Re: [linux-lvm] vgchange acquire an exclusive VG lock for refresh
Date: Tue, 29 Aug 2023 16:41:43 -0500 [thread overview]
Message-ID: <20230829214143.GC18158@redhat.com> (raw)
In-Reply-To: <8fa261fb-cc28-1e3a-d533-88e0bd52f87a@huawei.com>
On Tue, Aug 29, 2023 at 02:36:53PM +0800, wangzhiqiang (Q) wrote:
> diff --git a/tools/vgchange.c b/tools/vgchange.c
> index f07b245bd..f35ff4c0e 100644
> --- a/tools/vgchange.c
> +++ b/tools/vgchange.c
> @@ -1003,7 +1003,7 @@ int vgchange(struct cmd_context *cmd, int argc, char **argv)
> init_external_device_info_source(DEV_EXT_NONE);
> }
>
> - if (update)
> + if (update || arg_is_set(cmd, refresh_ARG))
> flags |= READ_FOR_UPDATE;
> else if (arg_is_set(cmd, activate_ARG))
> flags |= READ_FOR_ACTIVATE;
Shouldn't it be:
else if (arg_is_set(cmd, activate_ARG) ||
arg_is_set(cmd, refresh_ARG))
flags |= READ_FOR_ACTIVATE;
READ_FOR_ACTIVATE should translate to an ex lock like READ_FOR_UPDATE.
Note the same fix for lvchange refresh in commit 47bcb446b83f9aa4fca74301fda109a8bf670fbb
Dave
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
next prev parent reply other threads:[~2023-08-29 21:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 3:53 [linux-lvm] vgchange acquire an exclusive VG lock for refresh wangzhiqiang (Q)
2023-08-29 6:36 ` wangzhiqiang (Q)
2023-08-29 21:41 ` David Teigland [this message]
2023-08-30 2:14 ` wangzhiqiang (Q)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230829214143.GC18158@redhat.com \
--to=teigland@redhat.com \
--cc=linux-lvm@redhat.com \
--cc=lixiaokeng@huawei.com \
--cc=louhongxiang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.