diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-08 15:45:46 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-30 10:34:52 -0500 |
commit | 9e2dbdac3df300516ffdd9a8631f23164d068a50 (patch) | |
tree | 088a7dce1a0cc678a80ca1609642e7e3ecacd4dd /fs/gfs2/bmap.c | |
parent | e7c698d74fc9e0e76b3086062b0519df3601ff52 (diff) |
[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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 692d4a3da1bc..06e3447ea132 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) | |||
163 | if (ip->i_di.di_size) { | 163 | if (ip->i_di.di_size) { |
164 | *(__be64 *)(di + 1) = cpu_to_be64(block); | 164 | *(__be64 *)(di + 1) = cpu_to_be64(block); |
165 | ip->i_di.di_blocks++; | 165 | ip->i_di.di_blocks++; |
166 | gfs2_set_inode_blocks(&ip->i_inode); | ||
166 | di->di_blocks = cpu_to_be64(ip->i_di.di_blocks); | 167 | di->di_blocks = cpu_to_be64(ip->i_di.di_blocks); |
167 | } | 168 | } |
168 | 169 | ||
@@ -272,6 +273,7 @@ static int build_height(struct inode *inode, unsigned height) | |||
272 | *(__be64 *)(di + 1) = cpu_to_be64(bn); | 273 | *(__be64 *)(di + 1) = cpu_to_be64(bn); |
273 | ip->i_di.di_height += new_height; | 274 | ip->i_di.di_height += new_height; |
274 | ip->i_di.di_blocks += new_height; | 275 | ip->i_di.di_blocks += new_height; |
276 | gfs2_set_inode_blocks(&ip->i_inode); | ||
275 | di->di_height = cpu_to_be16(ip->i_di.di_height); | 277 | di->di_height = cpu_to_be16(ip->i_di.di_height); |
276 | di->di_blocks = cpu_to_be64(ip->i_di.di_blocks); | 278 | di->di_blocks = cpu_to_be64(ip->i_di.di_blocks); |
277 | brelse(dibh); | 279 | brelse(dibh); |
@@ -415,6 +417,7 @@ static int lookup_block(struct gfs2_inode *ip, struct buffer_head *bh, | |||
415 | 417 | ||
416 | *ptr = cpu_to_be64(*block); | 418 | *ptr = cpu_to_be64(*block); |
417 | ip->i_di.di_blocks++; | 419 | ip->i_di.di_blocks++; |
420 | gfs2_set_inode_blocks(&ip->i_inode); | ||
418 | 421 | ||
419 | *new = 1; | 422 | *new = 1; |
420 | return 0; | 423 | return 0; |
@@ -770,6 +773,7 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, | |||
770 | if (!ip->i_di.di_blocks) | 773 | if (!ip->i_di.di_blocks) |
771 | gfs2_consist_inode(ip); | 774 | gfs2_consist_inode(ip); |
772 | ip->i_di.di_blocks--; | 775 | ip->i_di.di_blocks--; |
776 | gfs2_set_inode_blocks(&ip->i_inode); | ||
773 | } | 777 | } |
774 | if (bstart) { | 778 | if (bstart) { |
775 | if (metadata) | 779 | if (metadata) |