diff options
author | Steven Whitehouse | 2008-02-01 14:16:55 +0100 |
---|---|---|
committer | Steven Whitehouse | 2008-03-31 11:40:42 +0200 |
commit | 5731be53e3d82aedd06e02574f833a57b07a08d2 (patch) | |
tree | 8877d9c51ac96a3455d8ac5e3148cd7af62d7c98 /fs/gfs2/eattr.c | |
parent | [GFS2] Merge the rd_last_alloc_meta and rd_last_alloc_data fields (diff) | |
download | kernel-qcow2-linux-5731be53e3d82aedd06e02574f833a57b07a08d2.tar.gz kernel-qcow2-linux-5731be53e3d82aedd06e02574f833a57b07a08d2.tar.xz kernel-qcow2-linux-5731be53e3d82aedd06e02574f833a57b07a08d2.zip |
[GFS2] Update gfs2_trans_add_unrevoke to accept extents
By adding an extra argument to gfs2_trans_add_unrevoke we can now
specify an extent length of blocks to unrevoke. This means that
we only need to make one pass through the list for each extent
rather than each block. Currently the only extent length which
is used is 1, but that will change in the future.
Also gfs2_trans_add_unrevoke is removed from gfs2_alloc_meta
since its the only difference between this and gfs2_alloc_data
which is left. This will allow a future patch to merge these
two functions into one (i.e. one call to allocate both data
and metadata in a single extent in the future).
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/eattr.c')
-rw-r--r-- | fs/gfs2/eattr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c index 04febbc17a16..c7fa0a8b1648 100644 --- a/fs/gfs2/eattr.c +++ b/fs/gfs2/eattr.c @@ -585,7 +585,7 @@ static int ea_alloc_blk(struct gfs2_inode *ip, struct buffer_head **bhp) u64 block; block = gfs2_alloc_meta(ip); - + gfs2_trans_add_unrevoke(sdp, block, 1); *bhp = gfs2_meta_new(ip->i_gl, block); gfs2_trans_add_bh(ip->i_gl, *bhp, 1); gfs2_metatype_set(*bhp, GFS2_METATYPE_EA, GFS2_FORMAT_EA); @@ -644,7 +644,7 @@ static int ea_write(struct gfs2_inode *ip, struct gfs2_ea_header *ea, int mh_size = sizeof(struct gfs2_meta_header); block = gfs2_alloc_meta(ip); - + gfs2_trans_add_unrevoke(sdp, block, 1); bh = gfs2_meta_new(ip->i_gl, block); gfs2_trans_add_bh(ip->i_gl, bh, 1); gfs2_metatype_set(bh, GFS2_METATYPE_ED, GFS2_FORMAT_ED); @@ -968,7 +968,7 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er, u64 blk; blk = gfs2_alloc_meta(ip); - + gfs2_trans_add_unrevoke(sdp, blk, 1); indbh = gfs2_meta_new(ip->i_gl, blk); gfs2_trans_add_bh(ip->i_gl, indbh, 1); gfs2_metatype_set(indbh, GFS2_METATYPE_IN, GFS2_FORMAT_IN); |