Re: [PATCH v0 03/18] btrfs: add nested locking mode for paths

2011-10-07 Thread Arne Jansen
On 06.10.2011 22:54, Andrey Kuzmin wrote: > > > On Friday, October 7, 2011, Andi Kleen > wrote: >> On Fri, Oct 07, 2011 at 12:44:30AM +0400, Andrey Kuzmin wrote: >>> Perhaps you could just elaborate on "needs this feature"? In general, write >>> lock gives one exclusi

Re: [PATCH v0 03/18] btrfs: add nested locking mode for paths

2011-10-06 Thread Andi Kleen
On Fri, Oct 07, 2011 at 12:44:30AM +0400, Andrey Kuzmin wrote: > Perhaps you could just elaborate on "needs this feature"? In general, write > lock gives one exclusive access, so the need for additional read > (non-exclusive) lock does not appear easily understandable. Usually it's because the low

Re: [PATCH v0 03/18] btrfs: add nested locking mode for paths

2011-10-06 Thread Andi Kleen
Arne Jansen writes: > This patch adds the possibilty to read-lock an extent > even if it is already write-locked from the same thread. > Subvolume quota needs this capability. Recursive locking is generally strongly discouraged, it causes all kinds of problems and tends to eventuall ylead to loc

[PATCH v0 03/18] btrfs: add nested locking mode for paths

2011-10-06 Thread Arne Jansen
This patch adds the possibilty to read-lock an extent even if it is already write-locked from the same thread. Subvolume quota needs this capability. Signed-off-by: Arne Jansen --- fs/btrfs/ctree.c | 22 fs/btrfs/ctree.h |1 + fs/btrfs/extent_io.c |1 + fs/