| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: splice read/write pipe lock ordering issues (was Re: XFS lockdep with Linux v3.17-5503-g35a9ad8af0bb) |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Fri, 17 Oct 2014 02:38:36 -0700 |
| Cc: | Josh Boyer <jwboyer@xxxxxxxxxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, Eric Sandeen <sandeen@xxxxxxxxxx>, "Linux-Kernel@Vger. Kernel. Org" <linux-kernel@xxxxxxxxxxxxxxx>, viro@xxxxxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20141016221434.GF7169@dastard> |
| References: | <CA+5PVA4FqAUXbtTtC-hZnAaw=869kfrAjM1vRrqcP=zgveAKJg@xxxxxxxxxxxxxx> <20141016221434.GF7169@dastard> |
| User-agent: | Mutt/1.5.23 (2014-03-12) |
On Fri, Oct 17, 2014 at 09:14:34AM +1100, Dave Chinner wrote: > That smells like a splice architecture bug. splice write puts the > pipe lock outside the inode locks, but splice read puts the pipes > locks *inside* the inode locks. > > The recent commit 8d02076 "(->splice_write() via ->write_iter()") > which went into 3.16 will be what is causing this. It replaced a > long standing splice lock inversion problem (XFS iolock vs i_mutex > http://oss.sgi.com/archives/xfs/2011-08/msg00122.html) by moving > to a ->write_iter call under the pipe_lock. > > Only XFS reports this issue because XFS is the only filesystem that > serialises splice reads against truncate, concurrent writes into the > same region, extent manipulation functions via fallocate() (e.g. > hole punch), etc. and it does so via the inode iolock that it takes > in shared (read) mode during xfs_file_splice_read(). Actually ocfs2 and nfs will have the same issue. |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 1/2] xfs_vn_rename by xfs_vn_rename2, Christoph Hellwig |
|---|---|
| Next by Date: | Please I need your help!, Armand Gami |
| Previous by Thread: | splice read/write pipe lock ordering issues (was Re: XFS lockdep with Linux v3.17-5503-g35a9ad8af0bb), Dave Chinner |
| Next by Thread: | Re: [PATCH] xfs: fix deadlock on failure path in xfs_setattr_nonsize(), Brian Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |