diff options
author | Bob Peterson <rpeterso@redhat.com> | 2011-11-21 13:36:17 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-11-22 05:25:21 -0500 |
commit | 564e12b1157215171e7f3af5b70611ec7154327c (patch) | |
tree | f2a6e3394e59209f8e43a36f10f67bf1372c966c /fs/gfs2/trans.h | |
parent | b3e47ca0c2427ec72a74e36c6408784b6098f2b5 (diff) |
GFS2: decouple quota allocations from block allocations
This patch separates the code pertaining to allocations into two
parts: quota-related information and block reservations.
This patch also moves all the block reservation structure allocations to
function gfs2_inplace_reserve to simplify the code, and moves
the frees to function gfs2_inplace_release.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/trans.h')
-rw-r--r-- | fs/gfs2/trans.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/trans.h b/fs/gfs2/trans.h index f8f101ef600c..125d4572e1c0 100644 --- a/fs/gfs2/trans.h +++ b/fs/gfs2/trans.h | |||
@@ -30,9 +30,9 @@ struct gfs2_glock; | |||
30 | * block, or all of the blocks in the rg, whichever is smaller */ | 30 | * block, or all of the blocks in the rg, whichever is smaller */ |
31 | static inline unsigned int gfs2_rg_blocks(const struct gfs2_inode *ip) | 31 | static inline unsigned int gfs2_rg_blocks(const struct gfs2_inode *ip) |
32 | { | 32 | { |
33 | const struct gfs2_alloc *al = ip->i_alloc; | 33 | const struct gfs2_blkreserv *rs = ip->i_res; |
34 | if (al->al_requested < ip->i_rgd->rd_length) | 34 | if (rs->rs_requested < ip->i_rgd->rd_length) |
35 | return al->al_requested + 1; | 35 | return rs->rs_requested + 1; |
36 | return ip->i_rgd->rd_length; | 36 | return ip->i_rgd->rd_length; |
37 | } | 37 | } |
38 | 38 | ||