aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/eattr.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/eattr.c
parente7c698d74fc9e0e76b3086062b0519df3601ff52 (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/eattr.c')
-rw-r--r--fs/gfs2/eattr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c
index 7dde84775ba7..ebebbdcd7057 100644
--- a/fs/gfs2/eattr.c
+++ b/fs/gfs2/eattr.c
@@ -281,6 +281,7 @@ static int ea_dealloc_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh,
281 if (!ip->i_di.di_blocks) 281 if (!ip->i_di.di_blocks)
282 gfs2_consist_inode(ip); 282 gfs2_consist_inode(ip);
283 ip->i_di.di_blocks--; 283 ip->i_di.di_blocks--;
284 gfs2_set_inode_blocks(&ip->i_inode);
284 } 285 }
285 if (bstart) 286 if (bstart)
286 gfs2_free_meta(ip, bstart, blen); 287 gfs2_free_meta(ip, bstart, blen);
@@ -598,6 +599,7 @@ static int ea_alloc_blk(struct gfs2_inode *ip, struct buffer_head **bhp)
598 ea->ea_num_ptrs = 0; 599 ea->ea_num_ptrs = 0;
599 600
600 ip->i_di.di_blocks++; 601 ip->i_di.di_blocks++;
602 gfs2_set_inode_blocks(&ip->i_inode);
601 603
602 return 0; 604 return 0;
603} 605}
@@ -649,6 +651,7 @@ static int ea_write(struct gfs2_inode *ip, struct gfs2_ea_header *ea,
649 gfs2_metatype_set(bh, GFS2_METATYPE_ED, GFS2_FORMAT_ED); 651 gfs2_metatype_set(bh, GFS2_METATYPE_ED, GFS2_FORMAT_ED);
650 652
651 ip->i_di.di_blocks++; 653 ip->i_di.di_blocks++;
654 gfs2_set_inode_blocks(&ip->i_inode);
652 655
653 copy = data_len > sdp->sd_jbsize ? sdp->sd_jbsize : 656 copy = data_len > sdp->sd_jbsize ? sdp->sd_jbsize :
654 data_len; 657 data_len;
@@ -977,6 +980,7 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er,
977 ip->i_di.di_eattr = blk; 980 ip->i_di.di_eattr = blk;
978 ip->i_di.di_flags |= GFS2_DIF_EA_INDIRECT; 981 ip->i_di.di_flags |= GFS2_DIF_EA_INDIRECT;
979 ip->i_di.di_blocks++; 982 ip->i_di.di_blocks++;
983 gfs2_set_inode_blocks(&ip->i_inode);
980 984
981 eablk++; 985 eablk++;
982 } 986 }
@@ -1387,6 +1391,7 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip)
1387 if (!ip->i_di.di_blocks) 1391 if (!ip->i_di.di_blocks)
1388 gfs2_consist_inode(ip); 1392 gfs2_consist_inode(ip);
1389 ip->i_di.di_blocks--; 1393 ip->i_di.di_blocks--;
1394 gfs2_set_inode_blocks(&ip->i_inode);
1390 } 1395 }
1391 if (bstart) 1396 if (bstart)
1392 gfs2_free_meta(ip, bstart, blen); 1397 gfs2_free_meta(ip, bstart, blen);
@@ -1441,6 +1446,7 @@ static int ea_dealloc_block(struct gfs2_inode *ip)
1441 if (!ip->i_di.di_blocks) 1446 if (!ip->i_di.di_blocks)
1442 gfs2_consist_inode(ip); 1447 gfs2_consist_inode(ip);
1443 ip->i_di.di_blocks--; 1448 ip->i_di.di_blocks--;
1449 gfs2_set_inode_blocks(&ip->i_inode);
1444 1450
1445 error = gfs2_meta_inode_buffer(ip, &dibh); 1451 error = gfs2_meta_inode_buffer(ip, &dibh);
1446 if (!error) { 1452 if (!error) {