All of lore.kernel.org
 help / color / mirror / Atom feed
* [QUESTION] BUG_ON in ext4_mb_simple_scan_group
@ 2020-04-16 14:19 yangerkun
  2020-04-16 18:33 ` Ritesh Harjani
  0 siblings, 1 reply; 8+ messages in thread
From: yangerkun @ 2020-04-16 14:19 UTC (permalink / raw)
  To: tytso, jack, dmonakhov, adilger, bob.liu, wshilong, zhangyi (F)
  Cc: linux-ext4

Nowadays, we trigger the a bug that has been reported before[1](trigger 
the bug with read block bitmap error before). After search the patch,
I found some related patch which has not been included in our kernel.

eb5760863fc2 ext4: mark block bitmap corrupted when found instead of BUGON
736dedbb1a7d ext4: mark block bitmap corrupted when found
206f6d552d0c ext4: mark inode bitmap corrupted when found
db79e6d1fb1f ext4: add new ext4_mark_group_bitmap_corrupted() helper
0db9fdeb347c ext4: fix wrong return value in ext4_read_inode_bitmap()

Maybe this patch can fix the problem, but I am a little confused with
the explain from Ted described in the mail:

 > What probably happened is that the page containing actual allocation
 > bitmap was pushed out of memory due to memory pressure.  However, the
 > buddy bitmap was still cached in memory.  That's actually quite
 > possible since the buddy bitmap will often be referenced more
 > frequently than the allocation bitmap (for example, while searching
 > for free space of a specific size, and then having that block group
 > skipped when it's not available).

 > Since there was an I/O error reading the allocation bitmap, the buffer
 > is not valid.  So it's not surprising that the BUG_ON(k >= max) is
 > getting triggered.

(Our machine: x86, 4K page size, 4K block size)

After check the related code, we found that once we get a IO error from 
ext4_wait_block_bitmap, ext4_mb_init_cache will return directly with a 
error number, so the latter ext4_mb_simple_scan_group may never been 
called! So any other scene will trigger this BUG_ON?

Thanks,
Kun.

-----
[1] https://www.spinics.net/lists/linux-ext4/msg60329.html


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

end of thread, other threads:[~2020-04-30 22:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16 14:19 [QUESTION] BUG_ON in ext4_mb_simple_scan_group yangerkun
2020-04-16 18:33 ` Ritesh Harjani
2020-04-17  2:06   ` zhangyi (F)
2020-04-17  3:26     ` Ritesh Harjani
2020-04-17  9:50       ` Jan Kara
2020-04-17 12:01       ` zhangyi (F)
2020-04-17 12:29         ` Ritesh Harjani
2020-04-30 22:25         ` Ritesh Harjani

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.