Re: [PATCH REPOST blktests v2 3/9] common-xfs: Make size argument optional for _xfs_run_fio_verify_io

From: Shinichiro Kawasaki
Date: Wed May 03 2023 - 00:05:06 EST


On May 02, 2023 / 15:23, Daniel Wagner wrote:
> > --- a/tests/nvme/035
> > > +++ b/tests/nvme/035
> > > @@ -32,7 +32,7 @@ test_device() {
> > > port=$(_nvmet_passthru_target_setup "${subsys}")
> > > nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${subsys}")
> > >
> > > - _xfs_run_fio_verify_io "${nsdev}" "900m"
> > > + _xfs_run_fio_verify_io "${nsdev}"
> >
> > On the other hand, this change for nvme/035 does not look good. It runs the
> > test on TEST_DEV, which may take very long time without TIMEOUT config.
>
> I'll add the nvme_img_size argument here instead (nvme: Make test image size
> configurable)

If TEST_DEV has the size same as nvme_img_size, xfs log data will consume some
part of the TEST_DEV, then _xfs_run_fio_verify_io with nvme_img_size will fail.

I think the size argument of _xfs_run_fio_verify_io should be,

min(size of TEST_DEV, nvm_img_size) - log data size of xfs

But I'm not sure if we can do this calculation correctly.

If the calculation is not possible, it would be the better to leave the hard
coded constants (1GB for TEST_DEV size and 900mb as fio I/O size) in this test
case, because nvme/035 is rather unique in the nvme group, which uses TEST_DEV.