summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/trans.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-10-25 19:38:43 +0200
committerIngo Molnar <mingo@elte.hu>2010-10-25 19:38:52 +0200
commit7d7a48b76012eeee25871e1d69104dec4b6d740f (patch)
treec27e3d8bb2e80ad93c7b4a5c850e1ffbc090bcd2 /fs/gfs2/trans.h
parente4072a9a9d186fe86293effe8828faa4be75b4a4 (diff)
parent229aebb873e29726b91e076161649cf45154b0bf (diff)
Merge branch 'linus' into x86/urgent
Merge reason: We want to queue up a dependent fix. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/gfs2/trans.h')
-rw-r--r--fs/gfs2/trans.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/gfs2/trans.h b/fs/gfs2/trans.h
index edf9d4bd908..fb56b783e02 100644
--- a/fs/gfs2/trans.h
+++ b/fs/gfs2/trans.h
@@ -20,11 +20,20 @@ struct gfs2_glock;
#define RES_JDATA 1
#define RES_DATA 1
#define RES_LEAF 1
+#define RES_RG_HDR 1
#define RES_RG_BIT 2
#define RES_EATTR 1
#define RES_STATFS 1
#define RES_QUOTA 2
+/* reserve either the number of blocks to be allocated plus the rg header
+ * block, or all of the blocks in the rg, whichever is smaller */
+static inline unsigned int gfs2_rg_blocks(const struct gfs2_alloc *al)
+{
+ return (al->al_requested < al->al_rgd->rd_length)?
+ al->al_requested + 1 : al->al_rgd->rd_length;
+}
+
int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks,
unsigned int revokes);