Skip to content

Commit 9bc6fc3

Browse files
Ye Binjankara
authored andcommitted
ext2: dump current reservation window info
There's report BUG in 'ext2_try_to_allocate_with_rsv()', although there's now dump of all reservation windows information. But there's unknown which window is being processed.So this is not helpful for locating the issue. To better analyze the problem, dump the information about reservation window that is being processed. And just bail with error instead of BUG here. Signed-off-by: Ye Bin <yebin10@huawei.com> Message-Id: <20230815112612.221145-5-yebin10@huawei.com> Signed-off-by: Jan Kara <jack@suse.cz>
1 parent 83f99de commit 9bc6fc3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fs/ext2/balloc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,8 +1133,13 @@ ext2_try_to_allocate_with_rsv(struct super_block *sb, unsigned int group,
11331133

11341134
if ((my_rsv->rsv_start > group_last_block) ||
11351135
(my_rsv->rsv_end < group_first_block)) {
1136+
ext2_error(sb, __func__,
1137+
"Reservation out of group %u range goal %d fsb[%lu,%lu] rsv[%lu, %lu]",
1138+
group, grp_goal, group_first_block,
1139+
group_last_block, my_rsv->rsv_start,
1140+
my_rsv->rsv_end);
11361141
rsv_window_dump(&EXT2_SB(sb)->s_rsv_window_root, 1);
1137-
BUG();
1142+
return -1;
11381143
}
11391144
ret = ext2_try_to_allocate(sb, group, bitmap_bh, grp_goal,
11401145
&num, &my_rsv->rsv_window);

0 commit comments

Comments
 (0)