Skip to content

Commit

Permalink
GFS2: Don't withdraw on partial rindex entries
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Steven Whitehouse <[email protected]>
  • Loading branch information
bmarzins authored and swhiteho committed Feb 1, 2010
1 parent 0f585f1 commit 55f0b4c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fs/gfs2/rgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 55f0b4c

Please sign in to comment.