Lines Matching refs:blk
330 struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk) in gfs2_blk2rgrpd() argument
339 if (blk < cur->rd_addr) in gfs2_blk2rgrpd()
341 else if (blk >= cur->rd_data0 + cur->rd_data) in gfs2_blk2rgrpd()
821 u64 blk; in gfs2_rgrp_send_discards() local
834 blk = offset + ((bi->bi_start + x) * GFS2_NBBY); in gfs2_rgrp_send_discards()
835 blk *= sects_per_blk; /* convert to sectors */ in gfs2_rgrp_send_discards()
840 if ((start + nr_sects) != blk) { in gfs2_rgrp_send_discards()
848 start = blk; in gfs2_rgrp_send_discards()
853 blk += sects_per_blk; in gfs2_rgrp_send_discards()
921 static inline u32 gfs2_bi2rgd_blk(struct gfs2_bitmap *bi, u32 blk) in gfs2_bi2rgd_blk() argument
923 return (bi->bi_start * GFS2_NBBY) + blk; in gfs2_bi2rgd_blk()
1179 u32 blk = BFITNOENT; in rgblk_search() local
1216 blk = gfs2_bitfit(buffer, bi->bi_len, goal, state); in rgblk_search()
1217 if (blk != BFITNOENT) in rgblk_search()
1230 if (blk != BFITNOENT) in rgblk_search()
1233 return blk; in rgblk_search()
1249 u32 blk, bool dinode, unsigned int *n) in gfs2_alloc_extent() argument
1259 bi, blk, dinode ? GFS2_BLKST_DINODE : GFS2_BLKST_USED); in gfs2_alloc_extent()
1261 goal = blk; in gfs2_alloc_extent()
1273 blk = gfs2_bi2rgd_blk(bi, blk); in gfs2_alloc_extent()
1274 rgd->rd_last_alloc = blk + *n - 1; in gfs2_alloc_extent()
1275 return rgd->rd_data0 + blk; in gfs2_alloc_extent()
1380 u32 goal, blk; /* block, within the rgrp scope */ in gfs2_alloc_blocks() local
1398 blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, &bi); in gfs2_alloc_blocks()
1401 if (blk == BFITNOENT) in gfs2_alloc_blocks()
1404 block = gfs2_alloc_extent(rgd, bi, blk, dinode, nblocks); in gfs2_alloc_blocks()