diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2008-02-06 05:11:15 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2008-03-31 05:40:47 -0400 |
commit | b45e41d7d56dfef1ae9e02e6c59990066ba82e5c (patch) | |
tree | c139447fa57beb3886def4e17449cc34bf40cf3c /fs/gfs2/dir.c | |
parent | 1639431a3f57b43da1e15e9268a1d691ac01ba26 (diff) |
[GFS2] Add extent allocation to block allocator
Rather than having to allocate a single block at a time, this patch
allows the block allocator to allocate an extent. Since there is
no difference (so far as the block allocator is concerned) between
data blocks and indirect blocks, it is posible to allocate a single
extent and for the caller to unrevoke just the blocks required
for indirect blocks.
Currently the only bit of GFS2 to make use of this feature is the
build height function. The intention is that gfs2_block_map will
be changed to make use of this feature in future patches.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index fbdf31957cb5..93a2e6afbd81 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -803,7 +803,8 @@ got_dent: | |||
803 | static struct gfs2_leaf *new_leaf(struct inode *inode, struct buffer_head **pbh, u16 depth) | 803 | static struct gfs2_leaf *new_leaf(struct inode *inode, struct buffer_head **pbh, u16 depth) |
804 | { | 804 | { |
805 | struct gfs2_inode *ip = GFS2_I(inode); | 805 | struct gfs2_inode *ip = GFS2_I(inode); |
806 | u64 bn = gfs2_alloc_block(ip); | 806 | unsigned int n = 1; |
807 | u64 bn = gfs2_alloc_block(ip, &n); | ||
807 | struct buffer_head *bh = gfs2_meta_new(ip->i_gl, bn); | 808 | struct buffer_head *bh = gfs2_meta_new(ip->i_gl, bn); |
808 | struct gfs2_leaf *leaf; | 809 | struct gfs2_leaf *leaf; |
809 | struct gfs2_dirent *dent; | 810 | struct gfs2_dirent *dent; |