Re: [PATCH] ext4/054,ext4/055: don't run when using DAX

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Tue, Apr 26, 2022 at 08:52:09PM -0400, Theodore Ts'o wrote:
> The ext4/054 and ext4/055 tests create a scratch file system with a 1k
> block size.  This is not compatible with mounting with the DAX option,
> which requires a block size equal to the page size (which is 4k on
> x86).
> 
> Also, the ext4/054 test doesn't use the test device, so remove the
> _require_test declaration.
> 
> Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
> ---

Hi Ted,

Thanks for point out this issue. I got a little question about this patch,
feel free to correct me if that's wrong.

"The DAX code currently only supports files with a block size equal to your
kernel's PAGE_SIZE" [1], so I suppose any cases with smaller blocksize (< pagesize)
should "_exclude_scratch_mount_option dax".

And if this supposition is right, we'd better do "skipping dax testing if blocksize
is less than pagesize" in a common helper. Good news is we have _scratch_mkfs_blocksized.
So how about do:
  if [ $blocksize < $pagesize ];then
      _exclude_scratch_mount_option dax
  fi
in _scratch_mkfs_blocksized? then let ext4/054 and ext4/055 turn to use _scratch_mkfs_blocksized.

Thanks,
Zorro


[1]
https://www.kernel.org/doc/Documentation/filesystems/dax.txt

>  tests/ext4/054 | 2 +-
>  tests/ext4/055 | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/ext4/054 b/tests/ext4/054
> index 9a11719f..6c722f32 100755
> --- a/tests/ext4/054
> +++ b/tests/ext4/054
> @@ -19,8 +19,8 @@ _begin_fstest auto quick dangerous_fuzzers
>  
>  # real QA test starts here
>  _supported_fs ext4
> -_require_test
>  _require_scratch_nocheck
> +_exclude_scratch_mount_option dax
>  _require_xfs_io_command "falloc"
>  _require_xfs_io_command "pwrite"
>  _require_xfs_io_command "fsync"
> diff --git a/tests/ext4/055 b/tests/ext4/055
> index 8f466f1b..1ae42b89 100755
> --- a/tests/ext4/055
> +++ b/tests/ext4/055
> @@ -17,8 +17,9 @@
>  _begin_fstest auto quota
>  
>  # real QA test starts here
> -_require_scratch_nocheck
>  _supported_fs ext4
> +_require_scratch_nocheck
> +_exclude_scratch_mount_option dax
>  _require_user fsgqa
>  _require_user fsgqa2
>  _require_command "$DEBUGFS_PROG" debugfs
> -- 
> 2.31.0
> 




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux