GFS2: Don't withdraw on partial rindex entries
authorBenjamin Marzinski <bmarzins@redhat.com>
Mon, 25 Jan 2010 17:23:24 +0000 (11:23 -0600)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 1 Feb 2010 09:59:54 +0000 (09:59 +0000)
ince gfs2 writes the rindex file a block at a time, and releases the
exclusive lock after each block, it is possible that another process
will grab the lock in the middle of the write.  Since rindex entries are
not an even divisor of blocks, that other process may see partial
entries.  On grows, this is fine.  The process can simply ignore the the
partial entires. Previously, the code withdrew when it saw partial
entries. Now it simply ignores them.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/rgrp.c

index 0608f490c295dae79b49cf496bffd0fa79e2c849..6702b82b375c605b05982056e5916d91b3d28079 100644 (file)
@@ -591,11 +591,6 @@ static int gfs2_ri_update(struct gfs2_inode *ip)
        u64 rgrp_count = ip->i_disksize;
        int error;
 
-       if (do_div(rgrp_count, sizeof(struct gfs2_rindex))) {
-               gfs2_consist_inode(ip);
-               return -EIO;
-       }
-
        clear_rgrpdi(sdp);
 
        file_ra_state_init(&ra_state, inode->i_mapping);