linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-nvdimm <linux-nvdimm@ml01.01.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	XFS Developers <xfs@oss.sgi.com>
Subject: Re: xfstests xfs fuzzers fail with DAX
Date: Tue, 30 Aug 2016 09:39:53 -0700	[thread overview]
Message-ID: <20160830163953.GA26710@birch.djwong.org> (raw)
In-Reply-To: <CAPcyv4hK9z7uqYEykk5Xq=+e6wGiai5wibGy7Xks9GzC--R9Dg@mail.gmail.com>

On Tue, Aug 30, 2016 at 09:25:45AM -0700, Dan Williams wrote:
> On Tue, Aug 30, 2016 at 7:53 AM, Dan Williams <dan.j.williams@intel.com> wrote:
> > On Mon, Aug 29, 2016 at 7:37 PM, Darrick J. Wong
> > <darrick.wong@oracle.com> 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.
> 
> So, that did not modulate the failure or the passing case.  However,
> using -d at line 122 makes the no-dax case fail the same as the dax
> case.
> 
> Would a change like this be acceptable in the interim while we figure
> out which tests are delalloc sensitive, or did I just invalidate the
> test?
> 
> diff --git a/tests/xfs/086 b/tests/xfs/086
> index 143915bafaa1..26607c7a4697 100755
> --- a/tests/xfs/086
> +++ b/tests/xfs/086
> @@ -96,7 +96,7 @@ _scratch_mount
> 
>  echo "+ modify files"
>  for x in `seq 1 64`; do
> -       $XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}"
> "${TESTFILE}.${x}" >> $seqres.full
> +       $XFS_IO_PROG -f -c "pwrite -d -S 0x62 0 ${blksz}"
> "${TESTFILE}.${x}" >> $seqres.full
>  done
>  umount "${SCRATCH_MNT}"
> 
> @@ -119,7 +119,7 @@ echo "broken: ${broken}"
>  # Try appending again, now that we've fixed the fs
>  echo "+ modify files (2)"
>  for x in `seq 1 64`; do
> -       $XFS_IO_PROG -f -c "pwrite -S 0x62 ${blksz} ${blksz}"
> "${TESTFILE}.${x}" >> $seqres.fu
> +       $XFS_IO_PROG -f -c "pwrite -d -S 0x62 ${blksz} ${blksz}"
> "${TESTFILE}.${x}" >> $seqres
>  done
>  umount "${SCRATCH_MNT}"
> 
> diff --git a/tests/xfs/086.out b/tests/xfs/086.out
> index 6c053f42deea..e2ec84e6b90f 100644
> --- a/tests/xfs/086.out
> +++ b/tests/xfs/086.out
> @@ -16,5 +16,5 @@ broken: 1
>  + mount image
>  + chattr -R -i
>  + check files (2)
> -broken: 0
> +broken: 1

There shouldn't be any brokenness left over at this point in the test.

--D

>  + check fs (2)

      reply	other threads:[~2016-08-30 16:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04  2:45 xfstests xfs fuzzers fail with DAX Xiong Zhou
2016-08-30  1:50 ` Dan Williams
2016-08-30  2:37   ` Darrick J. Wong
2016-08-30 14:53     ` Dan Williams
2016-08-30 16:25       ` Dan Williams
2016-08-30 16:39         ` Darrick J. Wong [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=20160830163953.GA26710@birch.djwong.org \
    --to=darrick.wong@oracle.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@ml01.01.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).