From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Subject: Re: [PATCH 17/18] fs: icache remove inode_lock Date: Fri, 8 Oct 2010 19:09:41 +1100 Message-ID: <20101008080941.GZ4681@dastard> References: <1286515292-15882-1-git-send-email-david@fromorbit.com> <1286515292-15882-18-git-send-email-david@fromorbit.com> <20101008080319.GC30902@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Christoph Hellwig Return-path: Content-Disposition: inline In-Reply-To: <20101008080319.GC30902@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Oct 08, 2010 at 04:03:19AM -0400, Christoph Hellwig wrote: > On Fri, Oct 08, 2010 at 04:21:31PM +1100, Dave Chinner wrote: > > From: Dave Chinner > > > > All the functionality that the inode_lock protected has now been > > wrapped up in new independent locks and/or functionality. Hence the > > inode_lock does not serve a purpose any longer and hence can now be > > removed. > > Might be worth mentioning this also updates the locking / lock order > documenation all over the place. Ok. > > > --- a/Documentation/filesystems/Locking > > +++ b/Documentation/filesystems/Locking > > @@ -114,7 +114,7 @@ alloc_inode: > > destroy_inode: > > dirty_inode: (must not sleep) > > write_inode: > > -drop_inode: !!!inode_lock!!! > > +drop_inode: !!!i_lock, sb_inode_list_lock!!! > > sb_inode_list_lock now is sb->s_inodes_lock, this also applies in a few > other places. > > > > +[mandatory] > > + inode_lock is gone, replaced by fine grained locks. See fs/inode.c > > +for details of what locks to replace inode_lock with in order to protect > > +particular things. Most of the time, a filesystem only needs ->i_lock, which > > +protects *all* the inode state and its membership on lists that was > > +previously protected with inode_lock. > > Which list membership does i_lock protect? Oops, I missed updating the documentation file. Will fix that up. > > --- a/fs/notify/inode_mark.c > > +++ b/fs/notify/inode_mark.c > > @@ -22,7 +22,7 @@ > > #include > > #include > > #include > > -#include /* for inode_lock */ > > +#include > > Do we still need writeback.h here? > > > @@ -76,7 +76,7 @@ > > #include > > #include > > #include > > -#include /* for inode_lock, oddly enough.. */ > > +#include > > Same here. I'll check them and clean it up appropriately. Cheers, Dave. -- Dave Chinner david@fromorbit.com