linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] generic/158,304: filter dedupe error message
Date: Wed, 4 Jan 2017 11:27:14 +0800	[thread overview]
Message-ID: <20170104032714.GM1859@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20170103200149.GB14031@birch.djwong.org>

On Tue, Jan 03, 2017 at 12:01:49PM -0800, Darrick J. Wong wrote:
> On Fri, Dec 30, 2016 at 12:08:54PM +0800, Eryu Guan wrote:
> > Kernel commit 22725ce4e4a0 ("vfs: fix isize/pos/len checks for reflink &
> > dedupe") added more checks on reflink and dedupe, rejected dedupe past
> > EOF early and explicitly, and causes generic/158 and generic/304 to fail.
> > 
> >   Try dedupe from past EOF
> >  -dedupe: Invalid argument
> >  +XFS_IOC_FILE_EXTENT_SAME: Invalid argument
> >   Try dedupe to past EOF, destination offset beyond EOF
> > 
> > Fix it by replacing fs-specific ioctl in error message to "dedupe".
> > 
> > Signed-off-by: Eryu Guan <eguan@redhat.com>
> > ---
> >  common/reflink        | 7 +++++++
> >  tests/generic/158     | 7 +++++--
> >  tests/generic/158.out | 4 ++--
> >  tests/generic/304     | 9 ++++++---
> >  tests/generic/304.out | 2 +-
> >  5 files changed, 21 insertions(+), 8 deletions(-)
> > 
> > diff --git a/common/reflink b/common/reflink
> > index 64ee04f..7306efd 100644
> > --- a/common/reflink
> > +++ b/common/reflink
> > @@ -241,6 +241,13 @@ _dedupe_range() {
> >  	$XFS_IO_PROG $xfs_io_args -f -c "dedupe $file1 $offset1 $offset2 $len" "$file2"
> >  }
> >  
> > +# Filter fs-specific ioctl in error message to "dedupe"
> > +# e.g. replace XFS_IOC_FILE_EXTENT_SAME with dedupe
> > +_filter_dedupe()
> > +{
> > +	sed -e 's/XFS_IOC_FILE_EXTENT_SAME/dedupe/g'
> > +}
> 
> I sent a patch to the xfs list last month ("xfs_io: prefix dedupe
> command error messages consistently") changing all the error message
> prefixes to "XFS_IOC_FILE_EXTENT_SAME".  Was going to send a patch to
> fix up xfstests too... but evidently didn't.

Ah, didn't notict that patch.. Or I did saw the patch but failed to link
it with this test failure :)

> 
> If you change the sed command to 's/dedupe:/XFS_IOC_FILE_EXTENT_SAME:/g'
> that'll suffice, I think.

Will do. Thanks!

Eryu

      reply	other threads:[~2017-01-04  3:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-30  4:08 [PATCH] generic/158,304: filter dedupe error message Eryu Guan
2017-01-03 20:01 ` Darrick J. Wong
2017-01-04  3:27   ` Eryu Guan [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=20170104032714.GM1859@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@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).