linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] splice: i_mutex vs splice write deadlock
@ 2011-07-18  4:04 Dave Chinner
  2011-07-18  4:04 ` [PATCH 1/2] vfs: split generic splice code from i_mutex locking Dave Chinner
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Dave Chinner @ 2011-07-18  4:04 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: linux-kernel, xfs

generic_file_splice_write() takes the inode->i_mutex after the
filesystem has taken whatever locks it needs to ensure sanity.
however, this typically violates the locking order of filesystems
with their own locks in that the order is usually i_mutex ->
filesystem lock.

XFS is such a case, and generic_file_splice_write() is generating
lockdep warnings because of lock inversions between the
inode->i_mutex and the XFS_I(inode)->i_iolock. There is also a
reported case of fio causing a deadlock when it mixes IO types
(e.g. splice vs direct IO).

This patch set introduces generic_file_splice_write_unlocked() and
factors the code such that __generic_file_splice_write() will only
lock the i_mutex if called from the locked variant. The second patch
modifies XFS to use the new function.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-19  4:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-18  4:04 [PATCH 0/2] splice: i_mutex vs splice write deadlock Dave Chinner
2011-07-18  4:04 ` [PATCH 1/2] vfs: split generic splice code from i_mutex locking Dave Chinner
2011-07-18  4:04 ` [PATCH 2/2] xfs: fix splice/direct-IO deadlock Dave Chinner
2011-07-19  3:10 ` [PATCH 0/2] splice: i_mutex vs splice write deadlock Christoph Hellwig
2011-07-19  4:07   ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).