lkml.org 
[lkml]   [2006]   [Aug]   [24]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 24 Aug 2006 15:46:18 +1000
FromNathan Scott <>
SubjectRe: [PATCH 1/2] Add new spin_lock for i_flags of xfs_inode [try #2]
On Thu, Aug 24, 2006 at 03:42:45PM +1000, Nathan Scott wrote:
> On Wed, Aug 23, 2006 at 09:38:17PM -0700, Andrew Morton wrote:
> > On Wed, 23 Aug 2006 20:12:51 +0900
> > Masayuki Saito <m-saito@tnes.nec.co.jp> wrote:
> > 
> > > It is the problem that i_flags of xfs_inode has no consistent
> > > locking protection.
> > > 
> > > For the reason, I define a new spin_lock(i_flags_lock) for i_flags
> > > of xfs_inode.  And I add this spin_lock for appropriate places.
> > 
> > You could simply use inode.i_lock for this.  i_lock is a general-purpose
> > per-inode lock.  Its mandate is "use it for whatever you like, but it must
> > always be `innermost'"
> 
> Sounds spot on for our needs here, and has the added benefit of
> not increasing the size of the inode (as well as not adding to
> our locking complexity).  Thanks!

Oh, except that the generic inode has a different lifecycle to the
xfs_inode_t, which is going to prevent using this.  Doh.  I had also
looked at the other xfs_inode locks before, but not seen an easy way
to piggyback on those... perhaps a way could be found though.

cheers.

-- 
Nathan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-24 07:49    [from the cache]
©2003-2008