From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Hudec Subject: Re: inode rwlock instead of semaphore Date: Mon, 3 Feb 2003 14:13:52 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20030203131352.GA7993@vagabond> References: <20030202100155.A18636@schatzie.adilger.int> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: To: linux-fsdevel@vger.kernel.org, Alexander Viro Content-Disposition: inline In-Reply-To: <20030202100155.A18636@schatzie.adilger.int> List-Id: linux-fsdevel.vger.kernel.org On Sun, Feb 02, 2003 at 10:01:55AM -0700, Andreas Dilger wrote: > Al, > One possibility is to change the VFS to use down_read(&dir->i_rwlock) or > similar, or alternately create VFS methods that allow pushing the locking > down into the filesystem so they could use a rwlock or even a dir+name-based > lock (e.g. for ext3+htree) so they can lock subsets of the directory for > both read and write operations. Definitely sure lookup is a reader? AFAICT from the VFS point of view, it's a writer and from the disk's point of view the filesystem driver and not VFS should do the locking (eg. networking filesystems would only do this locking on server). ------------------------------------------------------------------------------- Jan 'Bulb' Hudec