linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Addition of new tests for extsize hints
@ 2024-11-21  5:09 Nirjhar Roy
  2024-11-21  5:09 ` [PATCH v3 1/3] common/rc,xfs/207: Add a common helper function to check xflag bits Nirjhar Roy
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Nirjhar Roy @ 2024-11-21  5:09 UTC (permalink / raw)
  To: fstests; +Cc: linux-ext4, linux-xfs, ritesh.list, ojaswin, djwong, zlang,
	nirjhar

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 [v2]
 - Renamed _test_fsx_xflags_field() to _test_fsxattr_xflag().
 - Changed the definition of _test_fsx_xflags_field (now renamed to _test_fsxattr_xflag)
   to accept xflag names (like extsize, cowextsize) instead of single characters (like 'e') and 
   modified the callers of this function accordingly (in xfs/207 and generic/366)
 - Some changes in the comments in the setup() function of tests/generic/366.
 - Added another helper function _require_scratch_extsize(). 
 - Replaced the usage of _require_scratch() with _require_scratch_extsize() in tests/generic/366.
 - Fixed some indentation issues in the test scripts(xfs/207, generic/366) and the commit messages.

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 (in test_data_allocated() and test_data_delayed() test).
 - Changed the new extsize to 4*blocksize if default extsize size is 2*blocksize to make 
   sure that the new extsize is not the same as the default extsize so that we can observe it changing.

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

Nirjhar Roy (3):
  common/rc,xfs/207: Add a common helper function to check xflag bits
  common/rc: Add a new _require_scratch_extsize helper function
  generic: Addition of new tests for extsize hints

 common/rc             |  24 ++++++
 tests/generic/366     | 175 ++++++++++++++++++++++++++++++++++++++++++
 tests/generic/366.out |  26 +++++++
 tests/xfs/207         |  15 +---
 4 files changed, 229 insertions(+), 11 deletions(-)
 create mode 100755 tests/generic/366
 create mode 100644 tests/generic/366.out

-- 
2.43.5


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-11-22 19:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-21  5:09 [PATCH v3 0/3] Addition of new tests for extsize hints Nirjhar Roy
2024-11-21  5:09 ` [PATCH v3 1/3] common/rc,xfs/207: Add a common helper function to check xflag bits Nirjhar Roy
2024-11-21 17:20   ` Darrick J. Wong
2024-11-21 18:30     ` Nirjhar Roy
2024-11-21  5:09 ` [PATCH v3 2/3] common/rc: Add a new _require_scratch_extsize helper function Nirjhar Roy
2024-11-21  7:53   ` Ritesh Harjani
2024-11-21 18:33     ` Nirjhar Roy
2024-11-21 18:52       ` Ritesh Harjani
2024-11-22 16:04         ` Darrick J. Wong
2024-11-22 18:07           ` Nirjhar Roy
2024-11-22 18:44             ` Darrick J. Wong
2024-11-22 19:06               ` Nirjhar Roy
2024-11-21  5:09 ` [PATCH v3 3/3] generic: Addition of new tests for extsize hints Nirjhar Roy
2024-11-21 17:27   ` Darrick J. Wong
2024-11-21 18:34     ` Nirjhar Roy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).