linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Alasdair G Kergon <agk@redhat.com>
To: Petr Rockai <prockai@redhat.com>
Cc: lvm-devel@redhat.com,
	LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [PATCH] Re: [linux-lvm] Clarifications wanted about locking process
Date: Fri, 14 Aug 2009 18:12:34 +0100	[thread overview]
Message-ID: <20090814171234.GA7033@agk-dp.fab.redhat.com> (raw)
In-Reply-To: <87my62sjie.fsf_-_@twilight.int.mornfall.net.>

On Fri, Aug 14, 2009 at 01:49:13PM +0200, Peter Rockai wrote:
> The attached patch should fix the issue. I believe that taking a global write
> lock while scanning is a mistake (I consulted with Milan, he says it only
> serves to enable metadata caching).
 
Well only one instance of pvscan and/or vgscan is allowed to run at once,
and IIRC VG_GLOBAL with LCK_VG_WRITE is what enforces that.

IOW The write lock is correct.  

See the comment in toollib:

/*
 * If the lock_type is LCK_VG_READ (used only in reporting commands),
 * we lock VG_GLOBAL to enable use of metadata cache.
 * This can pause alongide pvscan or vgscan process for a while.
 */

I don't want to touch the VG_GLOBAL logic here at this stage.

Are there any problems with just excluding an already-held VG_GLOBAL from the
test that generates this error message?

Alasdair

      reply	other threads:[~2009-08-14 17:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-14  0:13 [linux-lvm] Clarifications wanted about locking process Eric Bélanger
2009-08-14  8:24 ` Alasdair G Kergon
2009-08-14 11:49   ` [PATCH] " Petr Rockai
2009-08-14 17:12     ` Alasdair G Kergon [this message]

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=20090814171234.GA7033@agk-dp.fab.redhat.com \
    --to=agk@redhat.com \
    --cc=linux-lvm@redhat.com \
    --cc=lvm-devel@redhat.com \
    --cc=prockai@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).