xfs
[Top] [All Lists]

Re: xfs_file_splice_read: possible circular locking dependency detected

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: xfs_file_splice_read: possible circular locking dependency detected
From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Date: Fri, 9 Sep 2016 03:26:28 +0100
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, CAI Qian <caiqian@xxxxxxxxxx>, linux-xfs <linux-xfs@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160909015324.GD30056@dastard>
References: <723420070.1340881.1472835555274.JavaMail.zimbra@xxxxxxxxxx> <1832555471.1341372.1472835736236.JavaMail.zimbra@xxxxxxxxxx> <20160903003919.GI30056@dastard> <1450936953.949798.1473348551588.JavaMail.zimbra@xxxxxxxxxx> <20160908175632.GH2356@xxxxxxxxxxxxxxxxxx> <CA+55aFzg+Q0DzFNBR9TeL13_yfrfFwHu9OrZe--Zpje0EeN4Cw@xxxxxxxxxxxxxx> <20160908213835.GY30056@dastard> <20160908235521.GL2356@xxxxxxxxxxxxxxxxxx> <20160909015324.GD30056@dastard>
Sender: Al Viro <viro@xxxxxxxxxxxxxxxx>
User-agent: Mutt/1.6.1 (2016-04-27)
On Fri, Sep 09, 2016 at 11:53:24AM +1000, Dave Chinner wrote:
 
> This isn't specific to splice - it's the same issue for all page
> cache lookup and validation checks. This issue is one of the reasons
> why XFS has a MMAPLOCK similar to the IOLOCK - we can't take the
> IOLOCK in the page fault path, but we still need to protect page
> faults against racing page invalidations within EOF from operations
> like hole punch.

Point taken.  The window is between grabbing the pages and ->readpage()
calls, though, so converting to ->read_iter() ought to deal with the
entire class of problems...
 
[snip]

> Sounds reasonable, but the iter stuff makes my head hurt so I
> haven't thought about it that deeply yet.

O_DIRECT requires a bit of care, but it seems to be doable.

<Prev in Thread] Current Thread [Next in Thread>