lkml.org 
[lkml]   [2019]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 28/28] xfs: rework unreferenced inode lookups
On Fri, Nov 15, 2019 at 09:16:02AM +1100, Dave Chinner wrote:
> > Can we tie these into the proper locking interface using flags? For
> > example, something like xfs_ilock(ip, XFS_ILOCK_EXCL|XFS_ILOCK_NONOWNER)
> > or xfs_ilock(ip, XFS_ILOCK_EXCL_NONOWNER) perhaps?
>
> I'd prefer not to make this part of the common locking interface -
> it's a one off special use case, not something we want to progate
> elsewhere into the code.
>
> Now that I think over it, I probably should have tagged this with
> patch with [RFC]. I think we should just get rid of the mrlock
> wrappers rather than add more, and that would simplify this a lot.

Yes, killing off the mrlock wrappers would be very helpful. The only
thing we use them for is asserts on the locking state. We could either
switch to lockdep_assert_held*, or just open code the write locked bit.
While it is a little more ugly I'd tend towards the latter given that
the locking asserts are too useful to require lockdep builds with their
performance impact.

\
 
 \ /
  Last update: 2019-11-15 14:13    [W:0.150 / U:3.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site