[Patch 1/2]: ext3 reservation window size increase incorrectly fix

From: Mingming Cao
Date: Tue Sep 14 2004 - 19:23:05 EST


Two ext3 reservation bug fixes.

In current reservation code (with or without the recent red-black tree
changes), when an existing old reservation is re-used as the new window
without adjusting it's position in the current per-filesystem tree, we
just need to update window's start and end block value, without any
remove/insert business. But we missed the the allocation hit ratio bit,
it is not reset.

Since this is the magic number used to determine whether the window size
should be doubled next time, this will cause the window size increase
incorrectly or too quickly.

Patch applies to 2.6.9-rc1-mm5, tested.

---

linux-2.6.9-rc1-mm5-ming/fs/ext3/balloc.c | 1 +
1 files changed, 1 insertion(+)

diff -puN fs/ext3/balloc.c~ext3_reservation_window_hit_ratio_fix fs/ext3/balloc.c
--- linux-2.6.9-rc1-mm5/fs/ext3/balloc.c~ext3_reservation_window_hit_ratio_fix 2004-09-14 00:30:41.667359608 -0700
+++ linux-2.6.9-rc1-mm5-ming/fs/ext3/balloc.c 2004-09-14 00:34:19.170294136 -0700
@@ -945,6 +945,7 @@ found_rsv_window:
}
my_rsv->rsv_start = reservable_space_start;
my_rsv->rsv_end = my_rsv->rsv_start + size - 1;
+ atomic_set(&my_rsv->rsv_alloc_hit, 0);
if (my_rsv != prev_rsv) {
rsv_window_add(sb, my_rsv);
}

_



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/