Lines Matching refs:first_rec
281 static int count_ccws(sector_t first_rec, sector_t last_rec, in count_ccws() argument
288 if (first_rec % blocks_per_page != 0) { in count_ccws()
289 wz_stop = first_rec + blocks_per_page - in count_ccws()
290 (first_rec % blocks_per_page) - 1; in count_ccws()
293 cur_pos = wz_stop - first_rec + 1; in count_ccws()
297 if (last_rec - (first_rec + cur_pos) + 1 >= blocks_per_page) { in count_ccws()
304 cur_pos += d_stop - (first_rec + cur_pos) + 1; in count_ccws()
308 if (cur_pos == 0 || first_rec + cur_pos - 1 < last_rec) in count_ccws()
335 sector_t first_rec, last_rec; in dasd_fba_build_cp_discard() local
347 first_rec = blk_rq_pos(req) >> block->s2b_shift; in dasd_fba_build_cp_discard()
350 count = last_rec - first_rec + 1; in dasd_fba_build_cp_discard()
353 nr_ccws = count_ccws(first_rec, last_rec, blocks_per_page); in dasd_fba_build_cp_discard()
367 define_extent(ccw++, cqr->data, WRITE, blksize, first_rec, count); in dasd_fba_build_cp_discard()
371 if (first_rec % blocks_per_page != 0) { in dasd_fba_build_cp_discard()
372 wz_stop = first_rec + blocks_per_page - in dasd_fba_build_cp_discard()
373 (first_rec % blocks_per_page) - 1; in dasd_fba_build_cp_discard()
376 wz_count = wz_stop - first_rec + 1; in dasd_fba_build_cp_discard()
388 if (last_rec - (first_rec + cur_pos) + 1 >= blocks_per_page) { in dasd_fba_build_cp_discard()
396 d_count = d_stop - (first_rec + cur_pos) + 1; in dasd_fba_build_cp_discard()
408 if (cur_pos == 0 || first_rec + cur_pos - 1 < last_rec) { in dasd_fba_build_cp_discard()
452 sector_t recid, first_rec, last_rec; in dasd_fba_build_cp_regular() local
464 first_rec = blk_rq_pos(req) >> block->s2b_shift; in dasd_fba_build_cp_regular()
479 if (count != last_rec - first_rec + 1) in dasd_fba_build_cp_regular()
511 recid = first_rec; in dasd_fba_build_cp_regular()
528 recid - first_rec, 1); in dasd_fba_build_cp_regular()
532 if (recid > first_rec) in dasd_fba_build_cp_regular()