[PATCH] reiserfs: fix is_reusable bitmap check to not traverse the bitmap info array
There is a check in is_reusable to determine if a particular block is a bitmap block. It verifies this by going through the array of bitmap block buffer heads and comparing the block number to each one. Bitmap blocks are at defined locations on the disk in both old and current formats. Simply checking against the known good values is enough. This is a trivial optimization for a non-production codepath, but this is the first in a series of patches that will ultimately remove the buffer heads from that array. 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>
This commit is contained in:
committed by
Linus Torvalds
parent
8ef386092d
commit
e1fabd3ccf
@@ -1818,6 +1818,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
|
||||
if (is_reiserfs_3_5(rs)
|
||||
|| (is_reiserfs_jr(rs) && SB_VERSION(s) == REISERFS_VERSION_1))
|
||||
set_bit(REISERFS_3_5, &(sbi->s_properties));
|
||||
else if (old_format)
|
||||
set_bit(REISERFS_OLD_FORMAT, &(sbi->s_properties));
|
||||
else
|
||||
set_bit(REISERFS_3_6, &(sbi->s_properties));
|
||||
|
||||
|
Reference in New Issue
Block a user