[PATCH v2 0/2] Addition of new tests for extsize hints

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



This test checks the behaviour of xfs/ext4 filesystems when extsize
hint is set on files with inode size as 0, non-empty
files with allocated and delalloc extents and so on. 
This test set also tests one of the scenarios where setting extsize
hints on files with delayed allocation (incorrectly) succeeds and there is 
a recent patch series[1] that got merged[2] which fixes this.

Currently this test only runs in xfs but there is a patch series[3] in review 
that adds support for the extsize hints for ext4 as well.

I have tested it on ppc64le (with page size 64k) and x86_64 (with page size 4k).
The block sizes I have tested with are 2k, 4k, 8k, 16k, 32k, 64k with extsize being 
twice of the block size or 4 * block size(if the default extsize is 2*blocksize). 
I have also tested with configurations where I added extszinherit mkfs option  
on the root. I had to enable CONFIG_TRANSPARENT_HUGEPAGE to enable block size 
greater than 4k on x86_64.

Changes since [v1]
 - Making the definition of _test_xfs_xflags_field() more compact and renamed 
   _test_xfs_xflags_field() to _test_fsx_xflags_field() since I moved it to common/rc.
 - Removed the explicit import of common/xfs from the test script.
 - Renamed the test file from generic/365 to generic/366 since generic/365 was taken.
 - Made the following functions in tests/generic/366 accept a second parameter (extsize)
     a) check_extsz_xflag_across_remount()
	 b) check_extsz_and_xflag()
	 c) read_file_extsize()
	 d) filter_extsz
	 This will help filter out any extsize that the test wants. This is required because, this 
	 version no longer assumes any particular fixed value of the default extsize.  
 - Removed the check for xflags in test_data_allocated() and test_data_delayed() test 
 - Added an extra line in output that denotes that we are checking that the extent size 
   hasn't changed if the xfs_io command fails (xflags in test_data_allocated() and test_data_delayed() test)
 - Changing the new extsize to 4*blocksize if default extsize size is 2*blocksize

[1] https://lore.kernel.org/all/20241015094509.678082-1-ojaswin@xxxxxxxxxxxxx/
[2] kernel commit - 2a492ff66673
[3] https://lore.kernel.org/linux-ext4/cover.1726034272.git.ojaswin@xxxxxxxxxxxxx/
[v1] https://lore.kernel.org/all/cover.1729624806.git.nirjhar@xxxxxxxxxxxxx/

Nirjhar Roy (2):
  common/rc,xfs/207: Adding a common helper function to check xflag bits
    on a given file
  generic: Addition of new tests for extsize hints

 common/rc             |   7 ++
 tests/generic/366     | 172 ++++++++++++++++++++++++++++++++++++++++++
 tests/generic/366.out |  26 +++++++
 tests/xfs/207         |  13 +---
 4 files changed, 207 insertions(+), 11 deletions(-)
 create mode 100755 tests/generic/366
 create mode 100644 tests/generic/366.out

-- 
2.43.5





[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