All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eryu Guan <eguan@redhat.com>
Cc: ocfs2-devel@oss.oracle.com, fstests@vger.kernel.org
Subject: Re: [PATCH 4/7] reflink: fix space consumption tests
Date: Mon, 12 Dec 2016 15:03:53 -0800	[thread overview]
Message-ID: <20161212230352.GF25841@birch.djwong.org> (raw)
In-Reply-To: <20161212102539.GA29149@eguan.usersys.redhat.com>

On Mon, Dec 12, 2016 at 06:25:39PM +0800, Eryu Guan wrote:
> On Sun, Dec 11, 2016 at 01:53:10PM -0800, Darrick J. Wong wrote:
> > Some of the tests try to check that we can't COW when we're out of
> > space, but some tricky filesystems make this hard because writing N
> > blocks doesn't increase used blocks by N....
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> >  common/populate   |   14 ++++++++++++++
> >  tests/generic/171 |    5 ++---
> >  tests/generic/173 |    5 ++---
> >  tests/generic/174 |    5 ++---
> >  tests/generic/282 |    3 +--
> >  5 files changed, 21 insertions(+), 11 deletions(-)
> > 
> > 
> > diff --git a/common/populate b/common/populate
> > index d0003c5..9811d21 100644
> > --- a/common/populate
> > +++ b/common/populate
> > @@ -30,6 +30,20 @@ _require_xfs_db_blocktrash_z_command() {
> >  	$XFS_DB_PROG -x -f -c 'blocktrash -z' "${TEST_DEV}" | grep -q 'nothing on stack' || _notrun "blocktrash -z not supported"
> >  }
> >  
> > +# Eat free space until we can't anymore.
> > +_consume_free_space() {
> > +	dir=$1
> > +
> > +	old_nr_free=0
> > +	nr_free=$(stat -f -c '%f' $dir)
> > +	x=0
> > +	while [ $nr_free -gt 0 ] && [ $old_nr_free != $nr_free ]; do
> > +		$XFS_IO_PROG -f -c "pwrite -b 4194304 0 $((blksz * nr_free))" $dir/eat_my_space.$((x++))
> 
> blksz not defined in the function.
> 
> Xiaoguang Wang did something similar back in Nov. and I'm still queuing
> his patch. (His 1/2 patch conflicts with your scrub/repair patchset and
> it might be easier for you to let your patches go first.)
> 
> generic: make 17[1-4] work well when btrfs compression is enabled
> https://patchwork.kernel.org/patch/9408451/
> 
> Does this patch work for you? If so, perhaps you only need to update
> generic/282 using the "_fill_fs" helper?

Aha!  I had this feeling in the back of my head that someone was
already trying to push a helper function.

At this point XFS online scrub/repair is slipping to 4.11 anyway so you
may as well take Xioguang's patches and I'll just rebase all my stuff
off of that.

--D

> 
> Thanks,
> Eryu
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Darrick J. Wong <darrick.wong@oracle.com>
To: Eryu Guan <eguan@redhat.com>
Cc: ocfs2-devel@oss.oracle.com, fstests@vger.kernel.org
Subject: [Ocfs2-devel] [PATCH 4/7] reflink: fix space consumption tests
Date: Mon, 12 Dec 2016 15:03:53 -0800	[thread overview]
Message-ID: <20161212230352.GF25841@birch.djwong.org> (raw)
In-Reply-To: <20161212102539.GA29149@eguan.usersys.redhat.com>

On Mon, Dec 12, 2016 at 06:25:39PM +0800, Eryu Guan wrote:
> On Sun, Dec 11, 2016 at 01:53:10PM -0800, Darrick J. Wong wrote:
> > Some of the tests try to check that we can't COW when we're out of
> > space, but some tricky filesystems make this hard because writing N
> > blocks doesn't increase used blocks by N....
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> >  common/populate   |   14 ++++++++++++++
> >  tests/generic/171 |    5 ++---
> >  tests/generic/173 |    5 ++---
> >  tests/generic/174 |    5 ++---
> >  tests/generic/282 |    3 +--
> >  5 files changed, 21 insertions(+), 11 deletions(-)
> > 
> > 
> > diff --git a/common/populate b/common/populate
> > index d0003c5..9811d21 100644
> > --- a/common/populate
> > +++ b/common/populate
> > @@ -30,6 +30,20 @@ _require_xfs_db_blocktrash_z_command() {
> >  	$XFS_DB_PROG -x -f -c 'blocktrash -z' "${TEST_DEV}" | grep -q 'nothing on stack' || _notrun "blocktrash -z not supported"
> >  }
> >  
> > +# Eat free space until we can't anymore.
> > +_consume_free_space() {
> > +	dir=$1
> > +
> > +	old_nr_free=0
> > +	nr_free=$(stat -f -c '%f' $dir)
> > +	x=0
> > +	while [ $nr_free -gt 0 ] && [ $old_nr_free != $nr_free ]; do
> > +		$XFS_IO_PROG -f -c "pwrite -b 4194304 0 $((blksz * nr_free))" $dir/eat_my_space.$((x++))
> 
> blksz not defined in the function.
> 
> Xiaoguang Wang did something similar back in Nov. and I'm still queuing
> his patch. (His 1/2 patch conflicts with your scrub/repair patchset and
> it might be easier for you to let your patches go first.)
> 
> generic: make 17[1-4] work well when btrfs compression is enabled
> https://patchwork.kernel.org/patch/9408451/
> 
> Does this patch work for you? If so, perhaps you only need to update
> generic/282 using the "_fill_fs" helper?

Aha!  I had this feeling in the back of my head that someone was
already trying to push a helper function.

At this point XFS online scrub/repair is slipping to 4.11 anyway so you
may as well take Xioguang's patches and I'll just rebase all my stuff
off of that.

--D

> 
> Thanks,
> Eryu
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-12-12 23:04 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-11 21:52 [PATCH 0/7] xfstests: misc reflink test fixes Darrick J. Wong
2016-12-11 21:52 ` [Ocfs2-devel] " Darrick J. Wong
2016-12-11 21:52 ` [PATCH 1/7] ocfs2: test reflinking to inline data files Darrick J. Wong
2016-12-11 21:52   ` [Ocfs2-devel] " Darrick J. Wong
2016-12-12  9:01   ` Eryu Guan
2016-12-12 18:09     ` Darrick J. Wong
2016-12-12 18:09       ` [Ocfs2-devel] " Darrick J. Wong
2016-12-13  3:20       ` Eryu Guan
2016-12-13  7:11         ` Darrick J. Wong
2016-12-13  7:11           ` [Ocfs2-devel] " Darrick J. Wong
2016-12-13 21:35           ` Darrick J. Wong
2016-12-13 21:35             ` [Ocfs2-devel] " Darrick J. Wong
2016-12-14  7:32             ` Eric Ren
2016-12-14  7:32               ` [Ocfs2-devel] " Eric Ren
2016-12-11 21:52 ` [PATCH 2/7] ocfs2/reflink: fix file block size reporting Darrick J. Wong
2016-12-11 21:52   ` [Ocfs2-devel] " Darrick J. Wong
2016-12-12  9:48   ` Eryu Guan
2016-12-12 23:08     ` Darrick J. Wong
2016-12-12 23:08       ` [Ocfs2-devel] " Darrick J. Wong
2016-12-11 21:53 ` [PATCH 3/7] reflink: fix quota tests to work properly Darrick J. Wong
2016-12-11 21:53   ` [Ocfs2-devel] " Darrick J. Wong
2016-12-12 10:06   ` Eryu Guan
2016-12-12 23:08     ` Darrick J. Wong
2016-12-12 23:08       ` [Ocfs2-devel] " Darrick J. Wong
2016-12-11 21:53 ` [PATCH 4/7] reflink: fix space consumption tests Darrick J. Wong
2016-12-11 21:53   ` [Ocfs2-devel] " Darrick J. Wong
2016-12-12 10:25   ` Eryu Guan
2016-12-12 23:03     ` Darrick J. Wong [this message]
2016-12-12 23:03       ` [Ocfs2-devel] " Darrick J. Wong
2016-12-13  3:22       ` Eryu Guan
2016-12-11 21:53 ` [PATCH 5/7] reflink: make error reporting consistent Darrick J. Wong
2016-12-11 21:53   ` [Ocfs2-devel] " Darrick J. Wong
2016-12-12 10:47   ` Eryu Guan
2016-12-12 23:06     ` Darrick J. Wong
2016-12-12 23:06       ` [Ocfs2-devel] " Darrick J. Wong
2016-12-11 21:53 ` [PATCH 6/7] reflink: don't test disjoint block sharing sets Darrick J. Wong
2016-12-11 21:53   ` [Ocfs2-devel] " Darrick J. Wong
2016-12-11 21:53 ` [PATCH 7/7] xfs/ext4: check negative inode size Darrick J. Wong
2016-12-11 21:53   ` [Ocfs2-devel] " Darrick J. Wong
2016-12-12 11:07   ` Eryu Guan
2016-12-13 21:49     ` Darrick J. Wong
2016-12-13 21:49       ` [Ocfs2-devel] " Darrick J. Wong

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=20161212230352.GF25841@birch.djwong.org \
    --to=darrick.wong@oracle.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=ocfs2-devel@oss.oracle.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.