1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00

In the new _vg_read_for_update(), we always do the check for CLUSTERED vg

status flag after reading the volume group.  Thus, no need to set the flag
in vg_read() or clear it later before calling _vg_bad_status_bits().

Also, add back in the !lockingfailed() as part of the CLUSTERED flag check.
It's unclear why it was removed when the check was moved from
_vg_bad_status_bits() to inside _vg_lock_and_read().
There was an open question about the last check in the 'if' stmt for
lockingfailed() with a previous patch submitted.  However, I would
defer that right now as it is a separate item and this patch should
be no functional change by including the !lockingfailed().

Petr acked this patch on 5/26 I just forgot to check it in.

Acked-by: Petr Rockai <prockai@redhat.com>
This commit is contained in:
Dave Wysochanski 2009-06-10 16:14:40 +00:00
parent 41c97745a6
commit fe2b3ea0d4

View File

@ -2772,7 +2772,8 @@ static vg_t *_vg_lock_and_read(struct cmd_context *cmd, const char *vg_name,
goto_bad; goto_bad;
} }
if (vg_is_clustered(vg) && !locking_is_clustered()) { if (vg_is_clustered(vg) && !locking_is_clustered() &&
!lockingfailed()) {
log_error("Skipping clustered volume group %s", vg->name); log_error("Skipping clustered volume group %s", vg->name);
failure |= FAILED_CLUSTERED; failure |= FAILED_CLUSTERED;
goto_bad; goto_bad;
@ -2790,7 +2791,7 @@ static vg_t *_vg_lock_and_read(struct cmd_context *cmd, const char *vg_name,
} }
failure |= _vg_bad_status_bits(vg, status_flags & ~CLUSTERED); failure |= _vg_bad_status_bits(vg, status_flags);
if (failure) if (failure)
goto_bad; goto_bad;
@ -2837,7 +2838,7 @@ bad:
vg_t *vg_read(struct cmd_context *cmd, const char *vg_name, vg_t *vg_read(struct cmd_context *cmd, const char *vg_name,
const char *vgid, uint32_t flags) const char *vgid, uint32_t flags)
{ {
uint32_t status = CLUSTERED; uint32_t status = 0;
uint32_t lock_flags = LCK_VG_READ; uint32_t lock_flags = LCK_VG_READ;
if (flags & READ_FOR_UPDATE) { if (flags & READ_FOR_UPDATE) {