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

Dave Chinner <[email protected]>
Newsgroups gmane.comp.file-systems.xfs.general
Message-ID <20160907214536.GQ30056@dastard>
On Mon, Sep 05, 2016 at 05:15:29PM +0200, Christoph Hellwig wrote:
> Hi Dave,
> 
> I looked into killing the mrlock and ran into an unexpected problem.
> 
> Currently mr_writer tracks that there is someone holding a write lock,
> lockdep on the other hand checks if the calling thread has that lock.
> 
> While that generally is the right semantic, our hack to offload
> btree splits to a work item offends lockdep.  E.g. this callstack
> now asserts:

It's a semaphore, not a mutex. Semaphore locking is independent of
task context, the lock follows the object it protects, not the task
that took the lock. i.e. Lockdep is wrong to assume the "owner" of a
rw_sem will not change between lock and unlock.

> While it previously did fine.  I fear there might be other locking
> asserts in the code called from that work item as well.

Probably.

Cheers,

Dave.
-- 
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.