The patch titled ext3: turn on reservation dump on block allocation errors has been added to the -mm tree. Its filename is ext3-turn-on-reservation-dump-on-block-allocation-errors.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: ext3: turn on reservation dump on block allocation errors From: Mingming Cao <cmm@xxxxxxxxxx> In the past there were a few kernel panics related to block reservation tree operations failure (insert/remove etc). It would be very useful to get the block allocation reservation map info when such error happens. Signed-off-by: Mingming Cao <cmm@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/ext3/balloc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff -puN fs/ext3/balloc.c~ext3-turn-on-reservation-dump-on-block-allocation-errors fs/ext3/balloc.c --- a/fs/ext3/balloc.c~ext3-turn-on-reservation-dump-on-block-allocation-errors +++ a/fs/ext3/balloc.c @@ -111,7 +111,7 @@ error_out: * we could easily switch to that without changing too much * code. */ -#if 0 +#if 1 static void __rsv_window_dump(struct rb_root *root, int verbose, const char *fn) { @@ -129,7 +129,7 @@ restart: rsv = list_entry(n, struct ext3_reserve_window_node, rsv_node); if (verbose) printk("reservation window 0x%p " - "start: %d, end: %d\n", + "start: %lu, end: %lu\n", rsv, rsv->rsv_start, rsv->rsv_end); if (rsv->rsv_start && rsv->rsv_start >= rsv->rsv_end) { printk("Bad reservation %p (start >= end)\n", @@ -236,8 +236,10 @@ void ext3_rsv_window_add(struct super_bl p = &(*p)->rb_left; else if (start > this->rsv_end) p = &(*p)->rb_right; - else + else { + rsv_window_dump(root, 1); BUG(); + } } rb_link_node(node, parent, p); @@ -1133,8 +1135,10 @@ ext3_try_to_allocate_with_rsv(struct sup *count-my_rsv->rsv_end + grp_goal - 1); if ((my_rsv->rsv_start >= group_first_block + EXT3_BLOCKS_PER_GROUP(sb)) - || (my_rsv->rsv_end < group_first_block)) + || (my_rsv->rsv_end < group_first_block)) { + rsv_window_dump(&EXT3_SB(sb)->s_rsv_window_root, 1); BUG(); + } ret = ext3_try_to_allocate(sb, handle, group, bitmap_bh, grp_goal, &num, &my_rsv->rsv_window); if (ret >= 0) { _ Patches currently in -mm which might be from cmm@xxxxxxxxxx are ext3-filesystem-bogus-enospc-with-reservation-fix.patch ext3-and-jbd-cleanup-remove-whitespace.patch fix-ext3-mounts-at-16t.patch ext3-turn-on-reservation-dump-on-block-allocation-errors.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html