Lines Matching refs:sectors
306 r1_bio->sector + (r1_bio->sectors); in update_head_pos()
389 r1_bio->sectors, in close_write()
479 if (is_badblock(rdev, r1_bio->sector, r1_bio->sectors, in raid1_end_write_request()
524 sector_t sectors) in align_to_barrier_unit_end() argument
528 WARN_ON(sectors == 0); in align_to_barrier_unit_end()
536 if (len > sectors) in align_to_barrier_unit_end()
537 len = sectors; in align_to_barrier_unit_end()
559 int sectors; in read_balance() local
577 sectors = r1_bio->sectors; in read_balance()
588 if ((conf->mddev->recovery_cp < this_sector + sectors) || in read_balance()
591 this_sector + sectors))) in read_balance()
609 rdev->recovery_offset < this_sector + sectors) in read_balance()
615 if (is_badblock(rdev, this_sector, sectors, in read_balance()
622 best_good_sectors = sectors; in read_balance()
631 if (is_badblock(rdev, this_sector, sectors, in read_balance()
642 if (choose_first && sectors > bad_sectors) in read_balance()
643 sectors = bad_sectors; in read_balance()
644 if (best_good_sectors > sectors) in read_balance()
645 best_good_sectors = sectors; in read_balance()
658 if ((sectors > best_good_sectors) && (best_disk >= 0)) in read_balance()
660 best_good_sectors = sectors; in read_balance()
738 sectors = best_good_sectors; in read_balance()
743 conf->mirrors[best_disk].next_seq_sect = this_sector + sectors; in read_balance()
746 *max_sectors = sectors; in read_balance()
1169 r1_bio->sectors = bio_sectors(bio); in init_r1bio()
1231 r1_bio->sectors = max_read_sectors; in raid1_read_request()
1276 r1_bio->sectors = max_sectors; in raid1_read_request()
1341 r1_bio->sectors = max_write_sectors; in raid1_write_request()
1364 max_sectors = r1_bio->sectors; in raid1_write_request()
1447 r1_bio->sectors = max_sectors; in raid1_write_request()
1473 md_bitmap_startwrite(bitmap, r1_bio->sector, r1_bio->sectors, in raid1_write_request()
1536 sector_t sectors; in raid1_make_request() local
1550 sectors = align_to_barrier_unit_end( in raid1_make_request()
1554 raid1_read_request(mddev, bio, sectors, NULL); in raid1_make_request()
1558 raid1_write_request(mddev, bio, sectors); in raid1_make_request()
1878 long sectors_to_go = r1_bio->sectors; in end_sync_write()
1890 } else if (is_badblock(rdev, r1_bio->sector, r1_bio->sectors, in end_sync_write()
1894 r1_bio->sectors, in end_sync_write()
1900 int s = r1_bio->sectors; in end_sync_write()
1912 int sectors, struct page *page, int rw) in r1_sync_page_io() argument
1914 if (sync_page_io(rdev, sector, sectors << 9, page, rw, 0, false)) in r1_sync_page_io()
1925 if (!rdev_set_badblocks(rdev, sector, sectors, 0)) in r1_sync_page_io()
1948 int sectors = r1_bio->sectors; in fix_sync_read_error() local
1964 while(sectors) { in fix_sync_read_error()
1965 int s = sectors; in fix_sync_read_error()
2013 md_done_sync(mddev, r1_bio->sectors, 0); in fix_sync_read_error()
2018 sectors -= s; in fix_sync_read_error()
2053 sectors -= s; in fix_sync_read_error()
2078 vcnt = (r1_bio->sectors + PAGE_SIZE / 512 - 1) >> (PAGE_SHIFT - 9); in process_checks()
2097 md_bio_reset_resync_pages(b, rp, r1_bio->sectors << 9); in process_checks()
2135 atomic64_add(r1_bio->sectors, &mddev->resync_mismatches); in process_checks()
2190 int s = r1_bio->sectors; in sync_request_write()
2210 sector_t sect, int sectors) in fix_read_error() argument
2213 while(sectors) { in fix_read_error()
2214 int s = sectors; in fix_read_error()
2300 sectors -= s; in fix_read_error()
2324 int sectors; in narrow_write_error() local
2325 int sect_to_write = r1_bio->sectors; in narrow_write_error()
2334 sectors = ((sector + block_sectors) in narrow_write_error()
2340 if (sectors > sect_to_write) in narrow_write_error()
2341 sectors = sect_to_write; in narrow_write_error()
2355 wbio->bi_iter.bi_size = r1_bio->sectors << 9; in narrow_write_error()
2357 bio_trim(wbio, sector - r1_bio->sector, sectors); in narrow_write_error()
2364 sectors, 0) in narrow_write_error()
2368 sect_to_write -= sectors; in narrow_write_error()
2369 sector += sectors; in narrow_write_error()
2370 sectors = block_sectors; in narrow_write_error()
2378 int s = r1_bio->sectors; in handle_sync_write_finished()
2408 r1_bio->sectors, 0); in handle_write_finished()
2469 r1_bio->sector, r1_bio->sectors); in handle_read_error()
2483 raid1_read_request(mddev, bio, r1_bio->sectors, r1_bio); in handle_read_error()
2857 r1_bio->sectors = nr_sectors; in raid1_sync_request()
2896 static sector_t raid1_size(struct mddev *mddev, sector_t sectors, int raid_disks) in raid1_size() argument
2898 if (sectors) in raid1_size()
2899 return sectors; in raid1_size()
3151 static int raid1_resize(struct mddev *mddev, sector_t sectors) in raid1_resize() argument
3160 sector_t newsize = raid1_size(mddev, sectors, 0); in raid1_resize()
3170 if (sectors > mddev->dev_sectors && in raid1_resize()
3175 mddev->dev_sectors = sectors; in raid1_resize()
3176 mddev->resync_max_sectors = sectors; in raid1_resize()