[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [PATCH] Re: [linux-lvm] Clarifications wanted about locking process
- 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
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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]