summaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/resize.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2006-09-30 23:28:43 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 00:39:27 -0700
commit6f01046b35d940079822827498a7dd6d3eec8c6b (patch)
treee65426389691c9d3e7d4f29da73725d15ee8e2f6 /fs/reiserfs/resize.c
parent0b3dc17bc0c0997bde9f5d7691ec0cae24258cf7 (diff)
downloadblackbird-op-linux-6f01046b35d940079822827498a7dd6d3eec8c6b.tar.gz
blackbird-op-linux-6f01046b35d940079822827498a7dd6d3eec8c6b.zip
[PATCH] reiserfs: reorganize bitmap loading functions
This patch moves the bitmap loading code from super.c to bitmap.c The code is also restructured somewhat. The only difference between new format bitmaps and old format bitmaps is where they are. That's a two liner before loading the block to use the correct one. There's no need for an entirely separate code path. The load path is generally the same, with the pattern being to throw out a bunch of requests and then wait for them, then cache the metadata from the contents. Again, like the previous patches, the purpose is to set up for later ones. Update: There was a bug in the previously posted version of this that resulted in corruption. The problem was that bitmap 0 on new format file systems must be treated specially, and wasn't. A stupid bug with an easy fix. This is hopefully the last fix for the disaster that is the reiserfs bitmap patch set. If a bitmap block was full, first_zero_hint would end up at zero since it would never be changed from it's zeroed out value. This just sets it beyond the end of the bitmap block. If any bits are freed, it will be reset to a valid bit. When info->free_count = 0, then we already know it's full. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Cc: <reiserfs-dev@namesys.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/reiserfs/resize.c')
-rw-r--r--fs/reiserfs/resize.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/reiserfs/resize.c b/fs/reiserfs/resize.c
index 958b75978994..90d39fd3096f 100644
--- a/fs/reiserfs/resize.c
+++ b/fs/reiserfs/resize.c
@@ -132,6 +132,7 @@ int reiserfs_resize(struct super_block *s, unsigned long block_count_new)
get_bh(bh);
memset(bh->b_data, 0, sb_blocksize(sb));
reiserfs_test_and_set_le_bit(0, bh->b_data);
+ reiserfs_cache_bitmap_metadata(s, bh, bitmap + i);
set_buffer_uptodate(bh);
mark_buffer_dirty(bh);
OpenPOWER on IntegriCloud