public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Zorro Lang <zlang@kernel.org>
Cc: fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs/157: mkfs does not need a specific fssize
Date: Thu, 31 Oct 2024 15:08:21 -0700	[thread overview]
Message-ID: <20241031220821.GA2386201@frogsfrogsfrogs> (raw)
In-Reply-To: <20241031193552.1171855-1-zlang@kernel.org>

On Fri, Nov 01, 2024 at 03:35:52AM +0800, Zorro Lang wrote:
> The xfs/157 doesn't need to do a "sized" mkfs, the image file is
> 500MiB, don't need to do _scratch_mkfs_sized with a 500MiB fssize
> argument, a general _scratch_mkfs is good enough.
> 
> Besides that, if we do:
> 
>   MKFS_OPTIONS="-L oldlabel $MKFS_OPTIONS" _scratch_mkfs_sized $fs_size
> 
> the _scratch_mkfs_sized trys to keep the $fs_size, when mkfs fails
> with incompatible $MKFS_OPTIONS options, likes this:
> 
>   ** mkfs failed with extra mkfs options added to "-L oldlabel -m rmapbt=1" by test 157 **
>   ** attempting to mkfs using only test 157 options: -d size=524288000 -b size=4096 **
> 
> But if we do:
> 
>   _scratch_mkfs -L oldlabel
> 
> the _scratch_mkfs trys to keep the "-L oldlabel", when mkfs fails
> with incompatible $MKFS_OPTIONS options, likes this:
> 
>   ** mkfs failed with extra mkfs options added to "-m rmapbt=1" by test 157 **
>   ** attempting to mkfs using only test 157 options: -L oldlabel **
> 
> that's actually what we need.
> 
> Signed-off-by: Zorro Lang <zlang@kernel.org>
> ---
> 
> This test started to fail since 2f7e1b8a6f09 ("xfs/157,xfs/547,xfs/548: switch to
> using _scratch_mkfs_sized") was merged.
> 
>   FSTYP         -- xfs (non-debug)
>   PLATFORM      -- Linux/x86_64
>   MKFS_OPTIONS  -- -f -m rmapbt=1 /dev/sda3
>   MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 /dev/sda3 /mnt/scratch
> 
>   xfs/157 7s ... - output mismatch (see /root/git/xfstests/results//xfs/157.out.bad)
>       --- tests/xfs/157.out       2024-11-01 01:05:03.664543576 +0800
>       +++ /root/git/xfstests/results//xfs/157.out.bad     2024-11-01 02:56:47.994007900 +0800
>       @@ -6,10 +6,10 @@
>        label = "oldlabel"
>        label = "newlabel"
>        S3: Check that setting with rtdev works
>       -label = "oldlabel"
>       +label = ""
>        label = "newlabel"
>        S4: Check that setting with rtdev + logdev works
>       ...
>       (Run 'diff -u /root/git/xfstests/tests/xfs/157.out /root/git/xfstests/results//xfs/157.out.bad'  to see the entire diff)
>   Ran: xfs/157
>   Failures: xfs/157
>   Failed 1 of 1 tests
> 
> Before that change, the _scratch_mkfs can drop "rmapbt=1" option from $MKFS_OPTIONS,
> only keep the "-L label" option. That's why this test never failed before.
> 
> Now it fails on xfs, if MKFS_OPTIONS contains "-m rmapbt=1", the reason as I
> explained above.
> 
> Thanks,
> Zorro
> 
>  tests/xfs/157 | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tests/xfs/157 b/tests/xfs/157
> index 9b5badbae..459c6de7c 100755
> --- a/tests/xfs/157
> +++ b/tests/xfs/157
> @@ -66,8 +66,7 @@ scenario() {
>  }
>  
>  check_label() {
> -	MKFS_OPTIONS="-L oldlabel $MKFS_OPTIONS" _scratch_mkfs_sized $fs_size \
> -		>> $seqres.full
> +	_scratch_mkfs -L oldlabel >> $seqres.full 2>&1

Hans Holmberg discovered that this mkfs fails if the SCRATCH_RTDEV is
very large and SCRATCH_DEV is set to the 500M fake_datafile because the
rtbitmap is larger than the datadev.

I wonder if there's a way to pass the -L argument through in the
"attempting to mkfs using only" case?

--D

>  	_scratch_xfs_db -c label
>  	_scratch_xfs_admin -L newlabel "$@" >> $seqres.full
>  	_scratch_xfs_db -c label
> -- 
> 2.45.2
> 
> 

  reply	other threads:[~2024-10-31 22:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-31 19:35 [PATCH] xfs/157: mkfs does not need a specific fssize Zorro Lang
2024-10-31 22:08 ` Darrick J. Wong [this message]
2024-11-01  5:48   ` Zorro Lang
2024-11-01 21:49     ` Darrick J. Wong
2024-11-04  7:50       ` Christoph Hellwig
2024-11-04 13:04         ` Zorro Lang
2024-11-04 23:34           ` Darrick J. Wong
2024-11-05  6:58             ` Dave Chinner
2024-11-05 15:02               ` Christoph Hellwig
2024-11-05 15:47                 ` Darrick J. Wong
2024-11-07  5:40                   ` Dave Chinner
2024-11-07 10:10                     ` Zorro Lang
2024-11-07 23:53                       ` Darrick J. Wong
2024-11-14 23:43                       ` Darrick J. Wong
2024-11-05  6:58 ` Dave Chinner

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=20241031220821.GA2386201@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --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