Re: [PATCH v2] xfs: add a test for number of open zones on conventional devices

Zorro Lang <[email protected]>
Newsgroups org.kernel.vger.fstests,org.kernel.vger.linux-xfs
Message-ID <20260401075952.ifuz3kqfq3g7c4gf@doltdoltdolt>
On Wed, Apr 01, 2026 at 08:18:28AM +0200, Christoph Hellwig wrote:
> On Wed, Apr 01, 2026 at 05:18:07AM +0800, Zorro Lang wrote:
> > > +
> > > +_scratch_mkfs -b size=${bsize} -r zoned=1,rgsize=${blocks}b \
> > > +	> "$seqres.full" 2>&1
> > 
> > I usually tack on "|| _fail 'mkfs failed'" after _scratch_mount if it's
> > using extra options. That way, we'll know for sure if the mkfs actually
> > failed.
> 
> Yes, that is useful here, especially if we want to support older kernels
> before the zoned device support or !CONFIG_XFS_RT kernels.

Oh, if so, we might need _require_realtime. But that's still not enough to
check mkfs.xfs and mount.xfs on old system (then notrun), we might need
more _require_* helpers for this test. What do you think?

Thanks,
Zorro

> 
> > > +_has_fs_sysfs_attr $SCRATCH_DEV zoned/nr_open_zones || \
> > > +	_notrun "This test requires /sys/fs/${FSTYP}/$SCRATCH_DEV/zoned/nr_open_zones"
> > 
> > Can this be replaced with "_require_fs_sysfs_attr" ? _require_fs_sysfs_attr also can
> > help to get the real path to the sysfs directory for the fs on a device.
> 
> No, this must happen on the scratch file system where we force the
> zoned allocator, as the attribute only exists for those.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.