From: Dave Chinner <david@fromorbit.com>
To: Liu Bo <bo.li.liu@oracle.com>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] fstest: btrfs: test single 4k extent after subpagesize buffered writes
Date: Fri, 18 Mar 2016 08:07:15 +1100 [thread overview]
Message-ID: <20160317210715.GI11812@dastard> (raw)
In-Reply-To: <20160317041357.GB29904@localhost.localdomain>
On Wed, Mar 16, 2016 at 09:13:57PM -0700, Liu Bo wrote:
> On Tue, Mar 15, 2016 at 02:39:41PM +1100, Dave Chinner wrote:
> > On Mon, Mar 07, 2016 at 04:27:59PM -0800, Liu Bo wrote:
> > > This is to test if COW enabled btrfs can end up with single 4k extents
> > > when doing subpagesize buffered writes.
> > >
> > > Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
> > > ---
> > ....
> > > +_scratch_mkfs >> $seqres.full 2>&1
> > > +_scratch_mount
> > > +
> > > +default_expire=`cat /proc/sys/vm/dirty_expire_centisecs`
> > > +echo 50 > /proc/sys/vm/dirty_expire_centisecs
> >
> > why?
>
> Setting it to 50 is to flush dirty pages more frequently so that it's
> more likely to reproduce this bug.
Explainations should be in comments.
....
> > > + $XFS_IO_PROG -c "pwrite $toff $tlen" $tfile > /dev/null 2>&1
> > > + toff=$((toff + tlen))
> > > +done
> > > +
> > > +sync
> > > +
> > > +# check for single PAGESIZE extent
> > > +$XFS_IO_PROG -c "fiemap -v" $tfile >> $seqres.full 2>&1
> > > +$XFS_IO_PROG -c "fiemap -v" $tfile | awk '{if ($4 == 8) print $4}'
> >
> > Assumes page size is 4k. Also assumes that no individual extent in
> > the file is 4k. Likely broken.
>
> My miss, will try to come up with a way to tell awk PAGE_SIZE, maybe call getpagesize() ?
> (if you already how to do it, please do me a favor :-) )
awk -v pgsize=$page_size \
'{ cnt = pgsize/512; if ($4 == pgsize) print $4; }
Assuming that fiemap is reporting in 512 byte block size, not sector
sizes...
> > > --- /dev/null
> > > +++ b/tests/btrfs/027.out
> > > @@ -0,0 +1 @@
> > > +QA output created by 027
> >
> > So are we expecting no output or not?
>
> We don't expect any 4k single extent if btrfs is doing correctly, so I leave the output empty.
Convention is that we echo a line to the golden output file to
document the test is expected to give no output. That's why you see
echo "Silence is golden"
in many tests...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2016-03-17 21:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 23:47 [PATCH] fstest: btrfs: test single 4k extent after subpagesize buffered writes Liu Bo
2016-03-08 0:27 ` [PATCH v2] " Liu Bo
2016-03-15 3:39 ` Dave Chinner
2016-03-17 4:13 ` Liu Bo
2016-03-17 4:24 ` Eryu Guan
2016-03-17 22:23 ` Liu Bo
2016-03-17 21:07 ` Dave Chinner [this message]
2016-03-17 21:31 ` Liu Bo
2016-03-17 22:56 ` Liu Bo
2016-03-22 4:00 ` Eryu Guan
2016-03-22 22:12 ` Liu Bo
2016-03-23 11:53 ` Eryu Guan
2016-03-24 4:52 ` Liu Bo
2016-03-29 2:13 ` Liu Bo
2016-03-24 4:55 ` [PATCH v3] " Liu Bo
2016-03-24 8:31 ` Eryu Guan
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=20160317210715.GI11812@dastard \
--to=david@fromorbit.com \
--cc=bo.li.liu@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/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).