Re: [PATCH 2/2] xfs: Add test for mkfs with smaller zone capacity

Carlos Maiolino
2025-11-25T13:01:22Z

On Mon, Nov 24, 2025 at 05:31:03PM +0000, Johannes Thumshirn wrote:
> On 11/24/25 4:27 PM, Carlos Maiolino wrote:
> > On Fri, Nov 21, 2025 at 06:51:31AM +0000, Johannes Thumshirn wrote:
> >> On 11/20/25 5:09 PM, cem@kernel.org wrote:
> >>> From: Carlos Maiolino <cem@kernel.org>
> >>>
> >>> Add a regression test for initializing zoned block devices with
> >>> sequential zones with a capacity smaller than the conventional
> >>> zones capacity.
> >>
> >> Hi Carlos,
> >>
> >> Two quick questions:
> >>
> >> 1) Is there a specific reason this is a xfs only test? I think checking
> >> this on btrfs and f2fs would make sense as well, like with generic/781.
> > I wrote this mostly as a regression test for xfs's mkfs, but yeah, I don't
> > think there is any reason for this to be xfs-specific.
> >
> >> 2)  I would also mount the FS and perform some IO on it.
> > I'm not sure about this. Do you have any purpose in mind? This is
> > specifically to test mkfs is able to properly format the filesystem, not
> > to try the kernel module per-se.
> > One could argue that something 'could' go wrong in the mkfs that might
> > be found out only via some IO, but that would require much more than
> > just 'some IO'.
>
>
> Yep that's what I had in mind.
>
>
> > I do think a mount/unmount might add some value to the test, but I fail
> > to see why issuing a random amount of I/O would prove the correctness of
> > mkfs properly dealing with small capacities.
>
>
> fstests does a fsck after each test, doesn't it? So that should be
> sufficient as well.
>

I particularly don't agree with mounting/unmounting the FS here, that
extends the test to more than it is supposed to test, i.e. ensuring mkfs
can initialize the filesystem.
Although I agree running fsck on it to certify nothing obviously wrong
happened with mkfs.

I think I've got another bug though which I started to investigate a few
minutes ago. Reason why I think we should split mkfs and mount/unmount
testing into two different tests.

Anyway, I'll see what's going on an update this test appropriately for a
new version.

Thanks for the reviews.