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@xxxxxxxxx/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!