Message ID | 20240611085853.200102-1-tytso@mit.edu (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] ext4/045: skip test if the block size is 1k | expand |
On Tue, Jun 11, 2024 at 04:58:52AM -0400, Theodore Ts'o wrote: > If the file system is 1k, this test will fail because with dir_index > enabled, the directory tree will get too deep, and the kernel will > return ENOSPC and log the EXT4-fs warning "Directory (ino: NNN) index > full, reach max htree level: 2". So if the blocksize is less than 2k, > _notrun this test. Didn't ext4 recently gain support for 3-level htrees? --D > Signed-off-by: Theodore Ts'o <tytso@mit.edu> > --- > tests/ext4/045 | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/tests/ext4/045 b/tests/ext4/045 > index 4f0ad4aa7..5ae7a45b5 100755 > --- a/tests/ext4/045 > +++ b/tests/ext4/045 > @@ -44,6 +44,10 @@ workout() > > _scratch_mkfs "-O extent,dir_nlink,dir_index -I 256" >> $seqres.full 2>&1 > _scratch_mount > + blocksize=$(_get_block_size $SCRATCH_MNT) > + if [ "$blocksize" -lt 2048 ]; then > + _notrun "blocksize $blocksize, too small" > + fi > > # create directories > mkdir -p $3 2> /dev/null > -- > 2.43.0 > >
On Tue, Jun 11, 2024 at 07:27:54AM -0700, Darrick J. Wong wrote: > On Tue, Jun 11, 2024 at 04:58:52AM -0400, Theodore Ts'o wrote: > > If the file system is 1k, this test will fail because with dir_index > > enabled, the directory tree will get too deep, and the kernel will > > return ENOSPC and log the EXT4-fs warning "Directory (ino: NNN) index > > full, reach max htree level: 2". So if the blocksize is less than 2k, > > _notrun this test. > > Didn't ext4 recently gain support for 3-level htrees? Ext4 has support for a while, but it's an optional feature which is not enabled by default. I suppose we could try to set the feature, and skip the test if the kernel doesn't support it. (Or decide that no one cares about RHEL7, and just YOLO, since who else still cares about kernels older than 4.13? :-) I'm just not sure whether it's worth the extra complexity to do it, but for those people who care about code coverage statistics, it would help a tiny amount.... - Ted
diff --git a/tests/ext4/045 b/tests/ext4/045 index 4f0ad4aa7..5ae7a45b5 100755 --- a/tests/ext4/045 +++ b/tests/ext4/045 @@ -44,6 +44,10 @@ workout() _scratch_mkfs "-O extent,dir_nlink,dir_index -I 256" >> $seqres.full 2>&1 _scratch_mount + blocksize=$(_get_block_size $SCRATCH_MNT) + if [ "$blocksize" -lt 2048 ]; then + _notrun "blocksize $blocksize, too small" + fi # create directories mkdir -p $3 2> /dev/null
If the file system is 1k, this test will fail because with dir_index enabled, the directory tree will get too deep, and the kernel will return ENOSPC and log the EXT4-fs warning "Directory (ino: NNN) index full, reach max htree level: 2". So if the blocksize is less than 2k, _notrun this test. Signed-off-by: Theodore Ts'o <tytso@mit.edu> --- tests/ext4/045 | 4 ++++ 1 file changed, 4 insertions(+)