diff options
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r-- | fs/gfs2/incore.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 52078a161ecd..d5e254604c72 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h | |||
@@ -102,6 +102,17 @@ struct gfs2_rgrpd { | |||
102 | u32 rd_rs_cnt; /* count of current reservations */ | 102 | u32 rd_rs_cnt; /* count of current reservations */ |
103 | }; | 103 | }; |
104 | 104 | ||
105 | struct gfs2_rbm { | ||
106 | struct gfs2_rgrpd *rgd; | ||
107 | struct gfs2_bitmap *bi; /* Bitmap must belong to the rgd */ | ||
108 | u32 offset; /* The offset is bitmap relative */ | ||
109 | }; | ||
110 | |||
111 | static inline u64 gfs2_rbm_to_block(const struct gfs2_rbm *rbm) | ||
112 | { | ||
113 | return rbm->rgd->rd_data0 + (rbm->bi->bi_start * GFS2_NBBY) + rbm->offset; | ||
114 | } | ||
115 | |||
105 | enum gfs2_state_bits { | 116 | enum gfs2_state_bits { |
106 | BH_Pinned = BH_PrivateStart, | 117 | BH_Pinned = BH_PrivateStart, |
107 | BH_Escaped = BH_PrivateStart + 1, | 118 | BH_Escaped = BH_PrivateStart + 1, |
@@ -251,13 +262,11 @@ struct gfs2_blkreserv { | |||
251 | atomic_t rs_sizehint; /* hint of the write size */ | 262 | atomic_t rs_sizehint; /* hint of the write size */ |
252 | 263 | ||
253 | /* components used during get_local_rgrp (step 3): */ | 264 | /* components used during get_local_rgrp (step 3): */ |
254 | struct gfs2_rgrpd *rs_rgd; /* pointer to the gfs2_rgrpd */ | 265 | struct gfs2_rbm rs_rbm; |
255 | struct gfs2_holder rs_rgd_gh; /* Filled in by get_local_rgrp */ | 266 | struct gfs2_holder rs_rgd_gh; /* Filled in by get_local_rgrp */ |
256 | struct rb_node rs_node; /* link to other block reservations */ | 267 | struct rb_node rs_node; /* link to other block reservations */ |
257 | 268 | ||
258 | /* components used during block searches and assignments (step 4): */ | 269 | /* components used during block searches and assignments (step 4): */ |
259 | struct gfs2_bitmap *rs_bi; /* bitmap for the current allocation */ | ||
260 | u32 rs_biblk; /* start block relative to the bi */ | ||
261 | u32 rs_free; /* how many blocks are still free */ | 270 | u32 rs_free; /* how many blocks are still free */ |
262 | 271 | ||
263 | /* ancillary quota stuff */ | 272 | /* ancillary quota stuff */ |