Message ID | 20240103104900.464789-1-shikemeng@huaweicloud.com |
---|---|
Headers | show |
Series | More unit test for mballoc | expand |
On Wed, 03 Jan 2024 18:48:55 +0800, Kemeng Shi wrote: > This series covers more function to mark on-disk bitmap. Besides, some > code which is relevant to buddy cache is also tested. > Before more work is done, I want to be sure I'm not on a wrong > direction! > > v1->v2: > -Fix unused variable warning which is reported at > https://lore.kernel.org/lkml/202311260042.kMxL6DnL-lkp@intel.com/T/ > > [...] Applied, thanks! [1/5] ext4: Add unit test for test_free_blocks_simple commit: 6c5e0c9c21456fb561d0997fe2c4d3cf59745ba7 [2/5] ext4: Add unit test of ext4_mb_generate_buddy commit: 67d2a11b22b4d520072db62620851615df13183e [3/5] ext4: Add unit test for mb_mark_used commit: ac96b56a2fbd9e05b28488bdc5d3bd8006b61d35 [4/5] ext4: Add unit test for mb_free_blocks commit: b7098e1fa7bcf350e089af9500c4f9992a1bd6cb [5/5] ext4: Add unit test for ext4_mb_mark_diskspace_used commit: 2b81493f8eb6fc0c263dbca0064e10e4c00e0f91 Best regards,
On Wed, Jan 03, 2024 at 06:48:55PM +0800, Kemeng Shi wrote: > This series covers more function to mark on-disk bitmap. Besides, some > code which is relevant to buddy cache is also tested. > Before more work is done, I want to be sure I'm not on a wrong > direction! > > v1->v2: > -Fix unused variable warning which is reported at > https://lore.kernel.org/lkml/202311260042.kMxL6DnL-lkp@intel.com/T/ > With this patch series in linux-text, and with various debug options enabled, unit tests for ext4 fail widely and result in crashes. [ 4.798582] # Subtest: test_new_blocks_simple [ 4.803166] BUG: key 00000000000000a8 has not been registered! [ 4.803443] ------------[ cut here ]------------ ILLOPC: ffffffff9050cbf4: 0f 0b [ 4.803521] DEBUG_LOCKS_WARN_ON(1) [ 4.803720] WARNING: CPU: 0 PID: 154 at kernel/locking/lockdep.c:4895 lockdep_init_map_type+0x224/0x250 ... [ 4.833277] # Subtest: test_mb_mark_used [ 4.835875] ------------[ cut here ]------------ [ 4.836055] kernel BUG at fs/ext4/mballoc.c:2053! Guenter
on 2/26/2024 12:07 AM, Guenter Roeck wrote: > On Wed, Jan 03, 2024 at 06:48:55PM +0800, Kemeng Shi wrote: >> This series covers more function to mark on-disk bitmap. Besides, some >> code which is relevant to buddy cache is also tested. >> Before more work is done, I want to be sure I'm not on a wrong >> direction! >> >> v1->v2: >> -Fix unused variable warning which is reported at >> https://lore.kernel.org/lkml/202311260042.kMxL6DnL-lkp@intel.com/T/ >> > > With this patch series in linux-text, and with various debug options > enabled, unit tests for ext4 fail widely and result in crashes. > > [ 4.798582] # Subtest: test_new_blocks_simple > [ 4.803166] BUG: key 00000000000000a8 has not been registered! > [ 4.803443] ------------[ cut here ]------------ > ILLOPC: ffffffff9050cbf4: 0f 0b > [ 4.803521] DEBUG_LOCKS_WARN_ON(1) > [ 4.803720] WARNING: CPU: 0 PID: 154 at kernel/locking/lockdep.c:4895 lockdep_init_map_type+0x224/0x250 Not sure how this is triggerred. > ... > [ 4.833277] # Subtest: test_mb_mark_used > [ 4.835875] ------------[ cut here ]------------ > [ 4.836055] kernel BUG at fs/ext4/mballoc.c:2053! Internal functions mb_mark_used assumes group lock is held but unit test code doesn't acquire it as there is no concurrent block allocation/free in test code. Will add lock in unit test to fix this. > > Guenter > Hi Guenter, thanks for test and report this. I will appreciate it if you could tell me how to reproduce this as I need to debug the first issue and verify the fix. Thanks!