diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2009-11-10 12:54:56 -0600 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2009-12-03 11:59:03 +0000 |
commit | 9ae3c6de6981a1e8765b5d029f94555fc0f0fea0 (patch) | |
tree | de903f8b904281ff44cc5ca0ec62b4f8e0010af2 /fs/gfs2/aops.c | |
parent | 0ab7d13fcbd7ce1658c563e345990ba453719deb (diff) | |
download | linux-9ae3c6de6981a1e8765b5d029f94555fc0f0fea0.tar.gz linux-9ae3c6de6981a1e8765b5d029f94555fc0f0fea0.tar.bz2 linux-9ae3c6de6981a1e8765b5d029f94555fc0f0fea0.zip |
GFS2: drop rindex glock to refresh rindex list
When a gfs2 filesystem is grown, it needs to rebuild the rindex list to be able
to use the new space. gfs2 does this when the rindex is marked not uptodate,
which happens when the rindex glock is dropped. However, on a single node
setup, there is never any reason to drop the rindex glock, so gfs2 never
invalidates the the rindex. This patch makes gfs2 automatically drop the
rindex glock after filesystem grows, so it can refresh the rindex list.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/aops.c')
-rw-r--r-- | fs/gfs2/aops.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 694b5d48f036..dce062a0b02a 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c @@ -819,8 +819,10 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh, mark_inode_dirty(inode); } - if (inode == sdp->sd_rindex) + if (inode == sdp->sd_rindex) { adjust_fs_space(inode); + ip->i_gh.gh_flags |= GL_NOCACHE; + } brelse(dibh); gfs2_trans_end(sdp); @@ -889,8 +891,10 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping, mark_inode_dirty(inode); } - if (inode == sdp->sd_rindex) + if (inode == sdp->sd_rindex) { adjust_fs_space(inode); + ip->i_gh.gh_flags |= GL_NOCACHE; + } brelse(dibh); gfs2_trans_end(sdp); |