xfs
[Top] [All Lists]

Re: [PATCH, RFC] xfs: remove i_iolock and use i_rwsem in the VFS inode i

To: Christoph Hellwig <hch@xxxxxx>
Subject: Re: [PATCH, RFC] xfs: remove i_iolock and use i_rwsem in the VFS inode instead
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Date: Mon, 22 Aug 2016 10:34:55 +0200
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160820063723.GA7013@xxxxxx>
References: <1470935423-12329-1-git-send-email-hch@xxxxxx> <20160811215444.GY30192@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20160818173707.GA1240@xxxxxx> <20160819132736.GH10121@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20160820063723.GA7013@xxxxxx>
User-agent: Mutt/1.5.23.1 (2014-03-12)
On Sat, Aug 20, 2016 at 08:37:23AM +0200, Christoph Hellwig wrote:
> On Fri, Aug 19, 2016 at 03:27:36PM +0200, Peter Zijlstra wrote:
> > Hurm, if you're going to directly use that maybe we should pick a better
> > name ;-)
> 
> Fine with that.
> 
> > Also, be sure to check the debug_locks variable, if that's cleared the
> > result of _lockdep_is_held() isn't reliable -- we stop tracking lock
> > state when there's an error.
> 
> I already do.  But I'm wondering if we can't simply move the 
> debug_locks check into lockdep_is_held?  It's already used directly
> in a few places, and that would also solve the whole naming issue.

Reason I didn't do that initially was that I used lock_is_held() for
both positive and negative tests (ie. assert a lock is held and a lock
is not held). Given that, you cannot pick a right return value when
!debug_locks.

Not sure we still do that, but I distinctly remember running into that
when I did as you suggest now. But that was many years ago.

<Prev in Thread] Current Thread [Next in Thread>