From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Josh Boyer <jwboyer@fedoraproject.org>,
linux-fsdevel@vger.kernel.org, Eric Sandeen <sandeen@redhat.com>,
"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
viro@ZenIV.linux.org.uk, xfs@oss.sgi.com
Subject: Re: splice read/write pipe lock ordering issues (was Re: XFS lockdep with Linux v3.17-5503-g35a9ad8af0bb)
Date: Fri, 17 Oct 2014 02:38:36 -0700 [thread overview]
Message-ID: <20141017093836.GB9146@infradead.org> (raw)
In-Reply-To: <20141016221434.GF7169@dastard>
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 parent reply other threads:[~2014-10-17 9:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CA+5PVA4FqAUXbtTtC-hZnAaw=869kfrAjM1vRrqcP=zgveAKJg@mail.gmail.com>
2014-10-16 22:14 ` splice read/write pipe lock ordering issues (was Re: XFS lockdep with Linux v3.17-5503-g35a9ad8af0bb) Dave Chinner
2014-10-17 9:38 ` Christoph Hellwig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141017093836.GB9146@infradead.org \
--to=hch@infradead.org \
--cc=david@fromorbit.com \
--cc=jwboyer@fedoraproject.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=viro@ZenIV.linux.org.uk \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).