summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/bmap.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-11-08 15:45:46 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-11-30 10:34:52 -0500
commit9e2dbdac3df300516ffdd9a8631f23164d068a50 (patch)
tree088a7dce1a0cc678a80ca1609642e7e3ecacd4dd /fs/gfs2/bmap.c
parente7c698d74fc9e0e76b3086062b0519df3601ff52 (diff)
downloadop-kernel-dev-9e2dbdac3df300516ffdd9a8631f23164d068a50.zip
op-kernel-dev-9e2dbdac3df300516ffdd9a8631f23164d068a50.tar.gz
[GFS2] Remove gfs2_inode_attr_in
This function wasn't really doing the right thing. There was no need to update the inode size at this point and the updating of the i_blocks field has now been moved to the places where di_blocks is updated. A result of this patch and some those preceeding it is that unlocking a glock is now a much more efficient process, since there is no longer any requirement to copy data from the gfs2 inode into the vfs inode at this point. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r--fs/gfs2/bmap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 692d4a3..06e3447 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -163,6 +163,7 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page)
if (ip->i_di.di_size) {
*(__be64 *)(di + 1) = cpu_to_be64(block);
ip->i_di.di_blocks++;
+ gfs2_set_inode_blocks(&ip->i_inode);
di->di_blocks = cpu_to_be64(ip->i_di.di_blocks);
}
@@ -272,6 +273,7 @@ static int build_height(struct inode *inode, unsigned height)
*(__be64 *)(di + 1) = cpu_to_be64(bn);
ip->i_di.di_height += new_height;
ip->i_di.di_blocks += new_height;
+ gfs2_set_inode_blocks(&ip->i_inode);
di->di_height = cpu_to_be16(ip->i_di.di_height);
di->di_blocks = cpu_to_be64(ip->i_di.di_blocks);
brelse(dibh);
@@ -415,6 +417,7 @@ static int lookup_block(struct gfs2_inode *ip, struct buffer_head *bh,
*ptr = cpu_to_be64(*block);
ip->i_di.di_blocks++;
+ gfs2_set_inode_blocks(&ip->i_inode);
*new = 1;
return 0;
@@ -770,6 +773,7 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh,
if (!ip->i_di.di_blocks)
gfs2_consist_inode(ip);
ip->i_di.di_blocks--;
+ gfs2_set_inode_blocks(&ip->i_inode);
}
if (bstart) {
if (metadata)
OpenPOWER on IntegriCloud