public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Harshad Shirwadkar <harshads@google.com>
Cc: Amir Goldstein <amir73il@gmail.com>, fstests <fstests@vger.kernel.org>
Subject: Re: [PATCH v3] ext4/030: Ext4 online resize with bigalloc tests.
Date: Sun, 7 Jan 2018 23:31:06 +0800	[thread overview]
Message-ID: <20180107153106.GO5123@eguan.usersys.redhat.com> (raw)
In-Reply-To: <CAMCMpYLZNNwFUBYCUUp8NLtt7_5ui=Kv=RaOGweDv9BGWaPGsA@mail.gmail.com>

On Fri, Jan 05, 2018 at 01:21:30PM -0800, Harshad Shirwadkar wrote:
> On Thu, Jan 4, 2018 at 12:20 AM, Eryu Guan <eguan@redhat.com> wrote:
> > On Thu, Jan 04, 2018 at 10:09:08AM +0200, Amir Goldstein wrote:
> >> On Thu, Jan 4, 2018 at 3:18 AM, harshads <harshads@google.com> wrote:
> >> > Add tests to verify Ext4 online resizing feature with bigalloc feature
> >> > enabled. We test various resizing scenarios with different cluster
> >> > sizes.
> >> >
> >> > Signed-off-by: Harshad Shirwadkar <harshads@google.com>
> >> > ---
> >> >  common/rc          |  23 ++++++++
> >> >  tests/ext4/030     | 158 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> >> >  tests/ext4/030.out | 148 +++++++++++++++++++++++++++++++++++++++++++++++++
> >> >  tests/ext4/group   |   1 +
> >> >  4 files changed, 330 insertions(+)
> >> >  create mode 100755 tests/ext4/030
> >> >  create mode 100644 tests/ext4/030.out
> >> >
> >> > diff --git a/common/rc b/common/rc
> >> > index 9216efdb..052dadae 100644
> >> > --- a/common/rc
> >> > +++ b/common/rc
> >> > @@ -1845,6 +1845,29 @@ _require_scratch_ext4_feature()
> >> >      _scratch_unmount
> >> >  }
> >> >
> >> > +# Check whether the specified feature whether it is supported by
> >> > +# mkfs.ext4 and the kernel by using a sparse file image.
> >> > +_require_ext4_feature()
> >>
> >> 1. please explain why this loop variant is needed
> 
> As discussed on a previous thread, the loop variant will avoid the
> need to mkfs twice on scratch device (once in rule and once in test).
> Also, this particular test doesn't need scratch device at all. So, if
> I decide to use _require_scratch_ext4_feature, I will have to do
> _require_scratch just for the rule even though the actual test doesn't
> need scratch. So, having loop variant helps.

Hmm, as the _require_scratch_ext4_feature helper is already there and
already does mkfs twice (with a very small fs size, so the additional
mkfs won't add much time), I think it'd be much simpler to just use
_require_scratch and _require_scratch_feature and create all the test
images on $SCRATCH_DEV, a loop device variant doesn't seem that
necessary to me.

Thanks,
Eryu

> 
> >> 2. it would be great if you could also change callers to
> >> _require_scratch_ext4_feature
> >>     to use _require_scratch_feature and plug
> >> _require_scratch_ext4_feature in there
> 
> Okay, that sounds good.
> 
> >> 3. probably best to post this as a separate patch from the test itself
> 
> Okay.
> 
> >
> > I haven't went through the whole patch yet, just want to point out that
> > the _require_scratch_ext4_feature helper has been added in commit
> > be341e36fd02 ("common: rework _require_ext4_mkfs_feature"), but not
> > enabled in the more generic _require_scratch_feature helper yet.
> >
> > It'd be good to plug the ext4 helper to the generic helper in a separate
> > patch, as Amir suggested, and perhaps converting all existing callers of
> > the ext4 helper to the generic helper.
> >
> > Thanks,
> > Eryu
> >
> >>
> >> > +{
> >> > +    if [ -z "$1" ]; then
> >> > +        echo "Usage: _require_loop_ext4_feature feature"
> >>
> >> So which is it, _require_loop_ext4_feature or _require_ext4_feature?
> >> First one sounds better to me, given that you explain why the loop
> >> variant is needed.
> >> If it is needed, will it be useful to have for other fs?
> >> Then better implement _require_loop_feature and make ext4
> >> a specific case.
> 
> Thanks for pointing this out. I agree that _require_loop_ext4_feature
> is better. Sure, I'll add a _require_loop_feature. Alright, I'll do
> _require_loop stuff in a different patch.
> 
> - Harshad.
> 
> >>
> >> Cheers,
> >> Amir.

  reply	other threads:[~2018-01-07 15:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01  0:11 [PATCH] ext4/030: Ext4 online resize tests harshads
2017-11-01  1:16 ` Dave Chinner
2017-12-05  3:43 ` [PATCH v2] " harshads
2017-12-05  4:42   ` Eryu Guan
2018-01-04  1:18 ` [PATCH v3] ext4/030: Ext4 online resize with bigalloc tests harshads
2018-01-04  8:09   ` Amir Goldstein
2018-01-04  8:20     ` Eryu Guan
2018-01-05 21:21       ` Harshad Shirwadkar
2018-01-07 15:31         ` Eryu Guan [this message]
2018-01-08  2:56           ` Harshad Shirwadkar
2018-01-08  4:18   ` [PATCH v4] " harshads
2018-01-11  7:07     ` Eryu Guan
2018-01-23  5:29       ` Harshad Shirwadkar
2018-01-23 21:53       ` [PATCH v4] ext4: " harshads
2018-01-24  6:37         ` Eryu Guan
2018-01-24 22:58           ` [PATCH v5] " harshads
2018-01-25  5:00             ` 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=20180107153106.GO5123@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=harshads@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox