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

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).

Version 2:
- add a new function to take an actor to do the work of splicing the
  data to the file. Convert generic_file_splice_write to use this,
  and make XFS call it with a different actor fuction that avoids
  the i_mutex.

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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-08  6:45 [PATCH 0/2] splice: i_mutex vs splice write deadlock V2 Dave Chinner
2011-08-08  6:45 ` [PATCH 1/2] vfs: split generic splice code from i_mutex locking Dave Chinner
2011-08-09 11:36   ` Jan Kara
2011-08-10 10:12   ` Christoph Hellwig
2011-08-08  6:45 ` [PATCH 2/2] xfs: fix splice/direct-IO deadlock Dave Chinner
2011-08-10 10:17   ` Christoph Hellwig
2011-08-10 10:19 ` [PATCH 0/2] splice: i_mutex vs splice write deadlock V2 Christoph Hellwig

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).