linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Liu Bo <bo.li.liu@oracle.com>,
	fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
	fdmanana@gmail.com
Subject: Re: [PATCH v2] fstests: generic/018: expand "write backwards sync but contiguous" to test regression in btrfs
Date: Mon, 17 Aug 2015 09:27:06 +1000	[thread overview]
Message-ID: <20150816232706.GC20596@dastard> (raw)
In-Reply-To: <55CE06F4.4000208@sandeen.net>

On Fri, Aug 14, 2015 at 10:19:16AM -0500, Eric Sandeen wrote:
> On 8/13/15 3:47 AM, Liu Bo wrote:
> > Btrfs has a problem when defraging a file which has a large fragment'ed range,
> > it'd leave the tail extent as a seperate extent instead of merging it with
> > previous extents.
> > 
> > This makes generic/018 recognize the above regression.
> 
> Sorry for the late review, but here it is ;)
....
> 3) You stop redirecting xfs_io to /dev/null, and save it to the golden output
> file instead.
> 
> Honestly, I find hundreds of extra xfs_io output lines to be rather unhelpful,
> because the old output file used to be quite easy to read, to see what's going on.

Yup, it should remain redirected to /dev/null. If writing a few
small IOs to an otherwise empty filesystem fails, then you've got
bigger problems. besides, we actually test that the writes worked by
the count of extents before defrag. If any of the writes fail, we'll
fail because the "before" extent count will be wrong.

Besides, if the pwrite() fails, then all the paths in xfs_io that
call do_pwrite() end up doing perror("pwrite64") and so it should
output errors to stderr just fine.

> Today it only redirects stdout:
> 
> $XFS_IO_PROG -f -c "pwrite -b $((4 * bsize)) 0 $((4 * bsize))" $fragfile \
> 					> /dev/null
> 
> so if a write fails, I *think* stderr will get output, and the test *should*
> fail as a result.[1]  You could add a || _fail "xfs_io failed" for good measure...

_fail calls do not belong here - catch the error message, and if
there isn't one on stderr then xfs_io need fixing...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2015-08-16 23:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-10  8:12 [PATCH] fstests: btrfs regression test for defrag tail extents Liu Bo
2015-08-10  9:17 ` Filipe David Manana
2015-08-13  3:15   ` Liu Bo
2015-08-11  2:32 ` Dave Chinner
2015-08-13  3:22   ` Liu Bo
2015-08-13  8:44 ` [PATCH] fstests: generic/018: expend "write backwards sync but contiguous" to test regression in btrfs Liu Bo
2015-08-13  8:47   ` [PATCH v2] fstests: generic/018: expand " Liu Bo
2015-08-13  9:43     ` Filipe David Manana
2015-08-13  9:44       ` Filipe David Manana
2015-08-14 15:19     ` Eric Sandeen
2015-08-16 23:27       ` Dave Chinner [this message]
2015-08-19  2:50       ` Liu Bo

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=20150816232706.GC20596@dastard \
    --to=david@fromorbit.com \
    --cc=bo.li.liu@oracle.com \
    --cc=fdmanana@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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).