From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [PATCH 2/2] xfs: fix splice/direct-IO deadlock
Date: Thu, 29 Nov 2012 08:33:14 +1100 [thread overview]
Message-ID: <20121128213314.GW6434@dastard> (raw)
In-Reply-To: <20121128160736.GA14888@infradead.org>
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:
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > 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
next prev parent reply other threads:[~2012-11-28 21:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 2:12 [PATCH 0/2] splice: fix direct IO/splice deadlock Dave Chinner
2012-11-28 2:12 ` [PATCH 1/2] vfs: split generic splice code from i_mutex locking Dave Chinner
2012-11-28 2:12 ` [PATCH 2/2] xfs: fix splice/direct-IO deadlock Dave Chinner
2012-11-28 16:07 ` Christoph Hellwig
2012-11-28 21:33 ` Dave Chinner [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-08-08 6:45 [PATCH 0/2] splice: i_mutex vs splice write deadlock V2 Dave Chinner
2011-08-08 6:45 ` [PATCH 2/2] xfs: fix splice/direct-IO deadlock Dave Chinner
2011-08-10 10:17 ` Christoph Hellwig
2011-07-18 4:04 [PATCH 0/2] splice: i_mutex vs splice write deadlock Dave Chinner
2011-07-18 4:04 ` [PATCH 2/2] xfs: fix splice/direct-IO deadlock Dave Chinner
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=20121128213314.GW6434@dastard \
--to=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--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).