• Jeff Mahoney's avatar
    [PATCH] reiserfs: reorganize bitmap loading functions · 6f01046b
    Jeff Mahoney authored
    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: default avatarJeff Mahoney <jeffm@suse.com>
    Cc: <reiserfs-dev@namesys.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    6f01046b
resize.c 6.04 KB