diff options
Diffstat (limited to 'fs/gfs2/trans.h')
-rw-r--r-- | fs/gfs2/trans.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/gfs2/trans.h b/fs/gfs2/trans.h index edf9d4bd908e..fb56b783e028 100644 --- a/fs/gfs2/trans.h +++ b/fs/gfs2/trans.h | |||
@@ -20,11 +20,20 @@ struct gfs2_glock; | |||
20 | #define RES_JDATA 1 | 20 | #define RES_JDATA 1 |
21 | #define RES_DATA 1 | 21 | #define RES_DATA 1 |
22 | #define RES_LEAF 1 | 22 | #define RES_LEAF 1 |
23 | #define RES_RG_HDR 1 | ||
23 | #define RES_RG_BIT 2 | 24 | #define RES_RG_BIT 2 |
24 | #define RES_EATTR 1 | 25 | #define RES_EATTR 1 |
25 | #define RES_STATFS 1 | 26 | #define RES_STATFS 1 |
26 | #define RES_QUOTA 2 | 27 | #define RES_QUOTA 2 |
27 | 28 | ||
29 | /* reserve either the number of blocks to be allocated plus the rg header | ||
30 | * block, or all of the blocks in the rg, whichever is smaller */ | ||
31 | static inline unsigned int gfs2_rg_blocks(const struct gfs2_alloc *al) | ||
32 | { | ||
33 | return (al->al_requested < al->al_rgd->rd_length)? | ||
34 | al->al_requested + 1 : al->al_rgd->rd_length; | ||
35 | } | ||
36 | |||
28 | int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks, | 37 | int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks, |
29 | unsigned int revokes); | 38 | unsigned int revokes); |
30 | 39 | ||