On Sat, Nov 9, 2024 at 4:32 AM Baokun Li <libaokun1@xxxxxxxxxx> wrote: > > Hi Alexander, > > Thanks for the patch. > > On 2024/11/8 21:48, Alexander Mikhalitsyn wrote: > > Add a new testcase for [1] commit in ext4 online resize testsuite. > > > > Link: https://lore.kernel.org/linux-ext4/20240927133329.1015041-1-libaokun@xxxxxxxxxxxxxxx [1] > > Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@xxxxxxxxxxxxx> > > --- > > tests/ext4/032 | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/tests/ext4/032 b/tests/ext4/032 > > index 6bc3b61b..77d592f4 100755 > > --- a/tests/ext4/032 > > +++ b/tests/ext4/032 > > @@ -97,6 +97,10 @@ mkdir -p $IMG_MNT || _fail "cannot create loopback mount point" > > # Check if online resizing with bigalloc is supported by the kernel > > ext4_online_resize 4096 8192 1 > > > > +_fixed_by_kernel_commit 6121258c2b33 \ > > + "ext4: fix off by one issue in alloc_flex_gd()" > > +ext4_online_resize $(c2b 6400) $(c2b 786432) > > + Hi Baokun, > I think this test would be better placed in the loop below. Then add some > comments describing the scenario being tested. Have done. Thanks! > > There are two current scenarios for off by one: > * The above test is to expand from the first block group of a flex_bg to > the next flex_bg; > * Another scenario is to expand from the first block group of a flex_bg > to the last block group of this flex_bg. For example, > `ext4_online_resize $(c2b 6400) $(c2b 524288)` This test does not fail for me when I test without "ext4: fix off by one issue in alloc_flex_gd()" fix, so I decided not to take it. > > In addition, we need to modify the tests/ext4/032.out or the use cases > will fail due to inconsistent output. Of course, my bad, I forgot to add this file to the commit... stupid mistake. I have fixed it in v2: https://lore.kernel.org/fstests/20241111152100.152924-1-aleksandr.mikhalitsyn@xxxxxxxxxxxxx/T/#u Kind regards, Alex > > > Regards, > Baokun > > ## We perform resizing to various multiples of block group sizes to > > ## ensure that we cover maximum edge cases in the kernel code. > > for CLUSTER_SIZ in 4096 16384 65536; do > >