Thread (5 messages) 5 messages, 2 authors, 2012-11-28

Re: [PATCH 2/2] xfs: fix splice/direct-IO deadlock

From: Dave Chinner <david@fromorbit.com>
Date: 2012-11-28 21:33:17
Also in: linux-fsdevel

On Wed, Nov 28, 2012 at 11:07:36AM -0500, Christoph Hellwig wrote:
On Wed, Nov 28, 2012 at 01:12:48PM +1100, Dave Chinner wrote:
quoted
From: Dave Chinner <redacted>

lockdep reports splice vs direct-io write lock inversions due to
generic_file_splice_write() taking the inode->i_mutex inside
XFS_IOLOCK_EXCL context. These lock contexts are inverted, hence can
deadlock.  Remove the XFS_IOLOCK_EXCL locking context from the outer
function and drive it inwards to the actor function that only locks
the inode when the lock is really needed,
punctuation?

Otherwise the patch looks fine, but I'd love to understand why the
generic code thes te I_MUTEX_CHILD annotation and we can get away
without it.

Also can you add a testcase for this to xfstests?
I've had trouble reproducing it reliably. The only cases I've seen
it occur are some custom FIO workloads. I'll try again to see if I
can come up with something that reliably hits it...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help