Currently, the bitmap code uses half of the hinting data gathered and cached and wastes the other half. We'll skip completely full bitmaps, but start scanning in bitmaps at locations where if we consulted the zero bit hint, we'd know there aren't any free bits available. This patch uses the first zero hint to bump the beginning of the search window to where we know there is at least one zero bit. Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx> --- fs/reiserfs/bitmap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/fs/reiserfs/bitmap.c 2007-06-11 14:49:32.000000000 -0400 +++ b/fs/reiserfs/bitmap.c 2007-06-11 14:50:10.000000000 -0400 @@ -166,7 +166,10 @@ static int scan_bitmap_block(struct reis return 0; // No free blocks in this bitmap } - /* search for a first zero bit -- beggining of a window */ + if (*beg < bi->first_zero_hint) + *beg = bi->first_zero_hint; + + /* search for a first zero bit -- beginning of a window */ *beg = reiserfs_find_next_zero_le_bit ((unsigned long *)(bh->b_data), boundary, *beg); -- Jeff Mahoney SUSE Labs - To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html