xfs
[Top] [All Lists]

Re: xfstests xfs fuzzers fail with DAX

To: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>
Subject: Re: xfstests xfs fuzzers fail with DAX
From: Dan Williams <dan.j.williams@xxxxxxxxx>
Date: Tue, 30 Aug 2016 07:53:41 -0700
Cc: linux-nvdimm <linux-nvdimm@xxxxxxxxxxx>, XFS Developers <xfs@xxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=tiOMl2pradD81jb/Y7uqUR1x52+F2sodVzUfLf7OFjk=; b=yktrb6e0DR4m1JVXhPMsuhGn0JR8SWOFOSzPBuES+frxfUlShscLInhwg1+Bz3jPST Hb0LLOxx2rZukTLrH6VQ35Oy5+hj092sSM2+xK7NYDAsRnKSpk0LS/iEHNRqOcWEztAi Ja92YlE9V53wWec1YVr/ivfLIzhrhw8n6h77ogagO3Rt6PTxhfPbF4DT8Dm7yrkUBWyE 5i2zWp2dFxMM0MIGb+lDwn2P8TyTCitmTGglVgzwrkyZCJVYPZ/UoF3oZGw/YsZhm0fa cvUrDCdB8bLFGslnCqxk8Z+LHv2xkwyLYgZ5m8veBL6N65siOi4lsP1AEJokjE+StDqo N+CA==
In-reply-to: <20160830023727.GH22760@xxxxxxxxxxxxxxxx>
References: <20160804024514.GA2906@xxxxxxxxxxxxxxxxxxxxxxxxx> <CAPcyv4g1CkMZoq+vHcyPZW3ME7Qr=6pW10BTxg2n+e+28+MFKA@xxxxxxxxxxxxxx> <20160830023727.GH22760@xxxxxxxxxxxxxxxx>
Sender: dan.j.williams@xxxxxxxxx
On Mon, Aug 29, 2016 at 7:37 PM, Darrick J. Wong
<darrick.wong@xxxxxxxxxx> wrote:
> On Mon, Aug 29, 2016 at 06:50:05PM -0700, Dan Williams wrote:
>> [ Adding Darrick on the off chance that this triggers an "aha, of
>> course it does!" ]
>
> Aha!  Of course it does!!! :)

Heh, thanks :).  And apologies to Dave for missing his earlier note
pointing out the delalloc failure, linux-nvdimm list ate the response.

>
>> Darrick these corruption tests you added to xfstests last year all
>> fail the same way with DAX enabled.  They spew:
>>
>>     "pwrite64: Structure needs cleaning"
>>
>> ...reports that are cleaned up by running without "-o dax".
>
> I think this happens because in non-dax mode, the pwrite is a buffered
> write and so long as we can create a delalloc reservation, everything
> is ok and nothing fails.  Whereas for dax we have to allocate the
> blocks for the pwrite immediately, thereby triggering the cntbt
> verifier error.
>
> Proceeding from the assumption "DAX behaves a lot like DIO", all the
> tests that rely on buffered mode semantics are going to choke if DAX
> is turned on without them knowing about it.
>
>> Alternatively you could sit back and watch me try to figure it out,
>> that should be quite entertaining... as a start I'll try to pin down a
>> stack trace when the error is returned.
>
> As for how to fix this, probably the best option is to change line 98
> to 'pwrite -W -S 0x62...' and update the output to include the
> 'structure needs cleaning' message.

I'll give it a shot.

> Or get rid of the mount option and require explicitly turning on DAX
> on a per-inode basis, which I think is where Dave is already going.

Yes, I think we can't run away from the dax mount option fast enough.
The semantics are different, so an application / administrator needs
to explicitly opt-in to DAX semantics per-inode otherwise we are
guaranteed to cause surprises.

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