All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Eryu Guan <eguan@redhat.com>
Cc: xfs-oss <xfs@oss.sgi.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>,
	Koen De Wit <koen.de.wit@oracle.com>
Subject: Re: [PATCH] xfstests: btrfs/308: simple sparse copy testcase for btrfs
Date: Thu, 23 May 2013 23:21:24 -0500	[thread overview]
Message-ID: <519EEAC4.606@redhat.com> (raw)
In-Reply-To: <20130524030903.GL2460@eguan-t400.nay.redhat.com>

On 5/23/13 10:09 PM, Eryu Guan wrote:
> On Thu, May 23, 2013 at 11:36:32AM -0500, Eric Sandeen wrote:
>> From: Koen De Wit <koen.de.wit@oracle.com>
>>
>> # Tests file clone functionality of btrfs ("reflinks"):
>> #   - Reflink a file
>> #   - Reflink the reflinked file
>> #   - Modify the original file
>> #   - Modify the reflinked file
>>
>> [sandeen: add helpers, make several mostly-cosmetic
>>  changes to the original testcase]
>>
>> Signed-off-by: Koen De Wit <koen.de.wit@oracle.com>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> ---
>>
>> Originally submitted as test 297
>>
>> diff --git a/common/rc b/common/rc
>> index fe6bbfc..4560715 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -2098,6 +2098,27 @@ _require_dumpe2fs()
>>  	fi
>>  }
>>  
>> +_require_cp_reflink()
>> +{
>> +	cp --help | grep -q reflink || \
>> +		_notrun "This test requires a cp with --reflink support."
>> +}
>> +
>> +# Given 2 files, verify that they have the same mapping but different
>> +# inodes - i.e. an undisturbed reflink
>> +# Silent if so, make noise if not
>> +_verify_reflink()
>> +{
>> +	# not a hard link or symlink?
>> +	cmp -s	<(stat -c '%i' $1) <(stat -c '%i' $2) \
>> +		&& echo "$1 and $2 are not reflinks: same inode number"
>> +
>> +	# same mapping?
>> +	diff -u	<($XFS_IO_PROG -F -c "fiemap" $1 | grep -v $1) \
>> +		<($XFS_IO_PROG -F -c "fiemap" $2 | grep -v $2) \
>> +		|| echo "$1 and $2 are not reflinks: different extents"
> 
> I'm not sure if "-F" is still needed after commit
> 96fce07 xfstests: automatically add -F to xfs_io on non-xfs

Right, it's not, oops.  :( Old habits (and old patch, TBH)

I can fix & resend all of them I guess.

Thanks,
-Eric


WARNING: multiple messages have this Message-ID (diff)
From: Eric Sandeen <sandeen@redhat.com>
To: Eryu Guan <eguan@redhat.com>
Cc: Koen De Wit <koen.de.wit@oracle.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>,
	xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfstests: btrfs/308: simple sparse copy testcase for btrfs
Date: Thu, 23 May 2013 23:21:24 -0500	[thread overview]
Message-ID: <519EEAC4.606@redhat.com> (raw)
In-Reply-To: <20130524030903.GL2460@eguan-t400.nay.redhat.com>

On 5/23/13 10:09 PM, Eryu Guan wrote:
> On Thu, May 23, 2013 at 11:36:32AM -0500, Eric Sandeen wrote:
>> From: Koen De Wit <koen.de.wit@oracle.com>
>>
>> # Tests file clone functionality of btrfs ("reflinks"):
>> #   - Reflink a file
>> #   - Reflink the reflinked file
>> #   - Modify the original file
>> #   - Modify the reflinked file
>>
>> [sandeen: add helpers, make several mostly-cosmetic
>>  changes to the original testcase]
>>
>> Signed-off-by: Koen De Wit <koen.de.wit@oracle.com>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> ---
>>
>> Originally submitted as test 297
>>
>> diff --git a/common/rc b/common/rc
>> index fe6bbfc..4560715 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -2098,6 +2098,27 @@ _require_dumpe2fs()
>>  	fi
>>  }
>>  
>> +_require_cp_reflink()
>> +{
>> +	cp --help | grep -q reflink || \
>> +		_notrun "This test requires a cp with --reflink support."
>> +}
>> +
>> +# Given 2 files, verify that they have the same mapping but different
>> +# inodes - i.e. an undisturbed reflink
>> +# Silent if so, make noise if not
>> +_verify_reflink()
>> +{
>> +	# not a hard link or symlink?
>> +	cmp -s	<(stat -c '%i' $1) <(stat -c '%i' $2) \
>> +		&& echo "$1 and $2 are not reflinks: same inode number"
>> +
>> +	# same mapping?
>> +	diff -u	<($XFS_IO_PROG -F -c "fiemap" $1 | grep -v $1) \
>> +		<($XFS_IO_PROG -F -c "fiemap" $2 | grep -v $2) \
>> +		|| echo "$1 and $2 are not reflinks: different extents"
> 
> I'm not sure if "-F" is still needed after commit
> 96fce07 xfstests: automatically add -F to xfs_io on non-xfs

Right, it's not, oops.  :( Old habits (and old patch, TBH)

I can fix & resend all of them I guess.

Thanks,
-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-05-24  4:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-23 16:36 [PATCH] xfstests: btrfs/308: simple sparse copy testcase for btrfs Eric Sandeen
2013-05-23 16:36 ` Eric Sandeen
2013-05-23 23:39 ` Dave Chinner
2013-05-23 23:39   ` Dave Chinner
2013-05-24  3:09 ` Eryu Guan
2013-05-24  3:09   ` Eryu Guan
2013-05-24  4:21   ` Eric Sandeen [this message]
2013-05-24  4:21     ` Eric Sandeen
2013-05-24 17:34 ` [PATCH V2] xfstests: btrfs/306: " Eric Sandeen
2013-05-24 17:34   ` Eric Sandeen

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=519EEAC4.606@redhat.com \
    --to=sandeen@redhat.com \
    --cc=eguan@redhat.com \
    --cc=koen.de.wit@oracle.com \
    --cc=linux-btrfs@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.