From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH v0 03/18] btrfs: add nested locking mode for paths Date: Thu, 6 Oct 2011 22:50:45 +0200 Message-ID: <20111006205045.GU14482@one.firstfloor.org> References: <55d5758142bf964aefbbaadc2188f66ca178f876.1317915010.git.sensille@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andi Kleen , chris.mason@oracle.com, Arne Jansen , linux-btrfs@vger.kernel.org To: Andrey Kuzmin Return-path: In-Reply-To: List-ID: 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 level code can be called both with and without locking and it doesn't know. But that usually can be avoided with some restructuring. -Andi