public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: Zorro Lang <zlang@kernel.org>
Cc: fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: test xfs_growfs with too-small size expansion
Date: Mon, 29 Jan 2024 15:02:47 +1100	[thread overview]
Message-ID: <20240129150247.54c7a27a@echidna> (raw)
In-Reply-To: <20240128155653.1533493-1-zlang@kernel.org>

Looks fine.
Reviewed-by: David Disseldorp <ddiss@suse.de>

A couple of minor comments below...

On Sun, 28 Jan 2024 23:56:53 +0800, Zorro Lang wrote:

> This's a regression test of 84712492e6da ("xfs: short circuit
> xfs_growfs_data_private() if delta is zero").
> 
> If try to do growfs with "too-small" size expansion, might lead to a
> delta of "0" in xfs_growfs_data_private(), then end up in the shrink
> case and emit the EXPERIMENTAL warning even if we're not changing
> anything at all.
> 
> Signed-off-by: Zorro Lang <zlang@redhat.com>
> ---
>  tests/xfs/999     | 53 +++++++++++++++++++++++++++++++++++++++++++++++
>  tests/xfs/999.out |  2 ++
>  2 files changed, 55 insertions(+)
>  create mode 100755 tests/xfs/999
>  create mode 100644 tests/xfs/999.out
> 
> diff --git a/tests/xfs/999 b/tests/xfs/999
> new file mode 100755
> index 00000000..09192ba3
> --- /dev/null
> +++ b/tests/xfs/999
> @@ -0,0 +1,53 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2024 Red Hat, Inc.  All Rights Reserved.
> +#
> +# FS QA Test No. 999

I'll assume 999 is just a placeholder...

> +#
> +# Test xfs_growfs with "too-small" size expansion, which lead to a delta of "0"
> +# in xfs_growfs_data_private. This's a regression test of 84712492e6da ("xfs:
> +# short circuit xfs_growfs_data_private() if delta is zero").
> +#
> +. ./common/preamble
> +_begin_fstest auto quick growfs
> +
> +_cleanup()
> +{
> +	local dev
> +        $UMOUNT_PROG $LOOP_MNT 2>/dev/null
> +	dev=$(losetup -j testfile | cut -d: -f1)
> +	losetup -d $dev 2>/dev/null
> +        rm -rf $LOOP_IMG $LOOP_MNT
> +        cd /
> +        rm -f $tmp.*

nit: tabs and spaces mixed above

> +}
> +
> +# real QA test starts here
> +_supported_fs xfs
> +_fixed_by_kernel_commit 84712492e6da \
> +	"xfs: short circuit xfs_growfs_data_private() if delta is zero"
> +_require_test
> +_require_loop
> +_require_xfs_io_command "truncate"

nit: it doesn't seem common for growfs, but you might want to add a:
  _require_command "$XFS_GROWFS_PROG" xfs_growfs

  reply	other threads:[~2024-01-29  4:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-28 15:56 [PATCH] xfs: test xfs_growfs with too-small size expansion Zorro Lang
2024-01-29  4:02 ` David Disseldorp [this message]
2024-02-02 12:23   ` Zorro Lang

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=20240129150247.54c7a27a@echidna \
    --to=ddiss@suse.de \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zlang@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