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/dir.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/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index c82d7cb4a654..a2923fb91bba 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -901,6 +901,7 @@ static int dir_make_exhash(struct inode *inode) | |||
901 | 901 | ||
902 | dip->i_di.di_size = sdp->sd_sb.sb_bsize / 2; | 902 | dip->i_di.di_size = sdp->sd_sb.sb_bsize / 2; |
903 | dip->i_di.di_blocks++; | 903 | dip->i_di.di_blocks++; |
904 | gfs2_set_inode_blocks(&dip->i_inode); | ||
904 | dip->i_di.di_flags |= GFS2_DIF_EXHASH; | 905 | dip->i_di.di_flags |= GFS2_DIF_EXHASH; |
905 | 906 | ||
906 | for (x = sdp->sd_hash_ptrs, y = -1; x; x >>= 1, y++) ; | 907 | for (x = sdp->sd_hash_ptrs, y = -1; x; x >>= 1, y++) ; |
@@ -1038,6 +1039,7 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name) | |||
1038 | error = gfs2_meta_inode_buffer(dip, &dibh); | 1039 | error = gfs2_meta_inode_buffer(dip, &dibh); |
1039 | if (!gfs2_assert_withdraw(GFS2_SB(&dip->i_inode), !error)) { | 1040 | if (!gfs2_assert_withdraw(GFS2_SB(&dip->i_inode), !error)) { |
1040 | dip->i_di.di_blocks++; | 1041 | dip->i_di.di_blocks++; |
1042 | gfs2_set_inode_blocks(&dip->i_inode); | ||
1041 | gfs2_dinode_out(dip, dibh->b_data); | 1043 | gfs2_dinode_out(dip, dibh->b_data); |
1042 | brelse(dibh); | 1044 | brelse(dibh); |
1043 | } | 1045 | } |
@@ -1516,6 +1518,7 @@ static int dir_new_leaf(struct inode *inode, const struct qstr *name) | |||
1516 | return error; | 1518 | return error; |
1517 | gfs2_trans_add_bh(ip->i_gl, bh, 1); | 1519 | gfs2_trans_add_bh(ip->i_gl, bh, 1); |
1518 | ip->i_di.di_blocks++; | 1520 | ip->i_di.di_blocks++; |
1521 | gfs2_set_inode_blocks(&ip->i_inode); | ||
1519 | gfs2_dinode_out(ip, bh->b_data); | 1522 | gfs2_dinode_out(ip, bh->b_data); |
1520 | brelse(bh); | 1523 | brelse(bh); |
1521 | return 0; | 1524 | return 0; |
@@ -1860,6 +1863,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len, | |||
1860 | if (!dip->i_di.di_blocks) | 1863 | if (!dip->i_di.di_blocks) |
1861 | gfs2_consist_inode(dip); | 1864 | gfs2_consist_inode(dip); |
1862 | dip->i_di.di_blocks--; | 1865 | dip->i_di.di_blocks--; |
1866 | gfs2_set_inode_blocks(&dip->i_inode); | ||
1863 | } | 1867 | } |
1864 | 1868 | ||
1865 | error = gfs2_dir_write_data(dip, ht, index * sizeof(u64), size); | 1869 | error = gfs2_dir_write_data(dip, ht, index * sizeof(u64), size); |