Skip to content

Commit

Permalink
GFS2: Allow caching of rindex glock
Browse files Browse the repository at this point in the history
This patch allows caching of the rindex glock. We were previously
setting the GL_NOCACHE bit when the glock was released. That forced
the rindex inode to be invalidated, which caused us to re-read
rindex at the next access. However, it caused the glock to be
unnecessarily bounced around the cluster. This patch allows
the glock to remain cached, but it still causes the rindex to be
re-read once it has been written to by gfs2_grow.

Ben and I have tested single-node gfs2_grow cases and I've tested
clustered gfs2_grow cases on my four-node cluster.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Bob Peterson authored and Steven Whitehouse committed Apr 10, 2012
1 parent 5e2f7d6 commit ca9248d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/gfs2/aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh,

if (inode == sdp->sd_rindex) {
adjust_fs_space(inode);
ip->i_gh.gh_flags |= GL_NOCACHE;
sdp->sd_rindex_uptodate = 0;
}

brelse(dibh);
Expand Down Expand Up @@ -873,7 +873,7 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping,

if (inode == sdp->sd_rindex) {
adjust_fs_space(inode);
ip->i_gh.gh_flags |= GL_NOCACHE;
sdp->sd_rindex_uptodate = 0;
}

brelse(dibh);
Expand Down

0 comments on commit ca9248d

Please sign in to comment.