Lines Matching refs:sector_nr
71 static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr,
2901 static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr, in raid10_sync_request() argument
2932 return mddev->dev_sectors - sector_nr; in raid10_sync_request()
2940 if (sector_nr >= max_sector) { in raid10_sync_request()
2995 return reshape_request(mddev, sector_nr, skipped); in raid10_sync_request()
3002 return (max_sector - sector_nr) + sectors_skipped; in raid10_sync_request()
3012 max_sector > (sector_nr | chunk_mask)) in raid10_sync_request()
3013 max_sector = (sector_nr | chunk_mask) + 1; in raid10_sync_request()
3074 sect = raid10_find_virt(conf, sector_nr, i); in raid10_sync_request()
3306 md_bitmap_cond_end_sync(mddev->bitmap, sector_nr, in raid10_sync_request()
3308 (sector_nr + 2 * RESYNC_SECTORS > conf->cluster_sync_high)); in raid10_sync_request()
3310 if (!md_bitmap_start_sync(mddev->bitmap, sector_nr, in raid10_sync_request()
3326 conf->next_resync = sector_nr; in raid10_sync_request()
3329 r10_bio->sector = sector_nr; in raid10_sync_request()
3332 r10_bio->sectors = (sector_nr | chunk_mask) - sector_nr + 1; in raid10_sync_request()
3419 if (sector_nr + max_sync < max_sector) in raid10_sync_request()
3420 max_sector = sector_nr + max_sync; in raid10_sync_request()
3424 if (sector_nr + (len>>9) > max_sector) in raid10_sync_request()
3425 len = (max_sector - sector_nr) << 9; in raid10_sync_request()
3438 sector_nr += len>>9; in raid10_sync_request()
3445 if (conf->cluster_sync_high < sector_nr + nr_sectors) { in raid10_sync_request()
3464 sect_va1 = raid10_find_virt(conf, sector_nr, i); in raid10_sync_request()
3515 if (sector_nr + max_sync < max_sector) in raid10_sync_request()
3516 max_sector = sector_nr + max_sync; in raid10_sync_request()
3518 sectors_skipped += (max_sector - sector_nr); in raid10_sync_request()
3520 sector_nr = max_sector; in raid10_sync_request()
4393 static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr, in reshape_request() argument
4446 if (sector_nr == 0) { in reshape_request()
4450 sector_nr = (raid10_size(mddev, 0, 0) in reshape_request()
4454 sector_nr = conf->reshape_progress; in reshape_request()
4455 if (sector_nr) { in reshape_request()
4456 mddev->curr_resync_completed = sector_nr; in reshape_request()
4459 return sector_nr; in reshape_request()
4484 sector_nr = last & ~(sector_t)(conf->geo.chunk_mask in reshape_request()
4486 if (sector_nr + RESYNC_BLOCK_SIZE/512 < last) in reshape_request()
4487 sector_nr = last + 1 - RESYNC_BLOCK_SIZE/512; in reshape_request()
4505 sector_nr = conf->reshape_progress; in reshape_request()
4506 last = sector_nr | (conf->geo.chunk_mask in reshape_request()
4509 if (sector_nr + RESYNC_BLOCK_SIZE/512 <= last) in reshape_request()
4510 last = sector_nr + RESYNC_BLOCK_SIZE/512 - 1; in reshape_request()
4544 r10_bio->sector = sector_nr; in reshape_request()
4546 r10_bio->sectors = last - sector_nr + 1; in reshape_request()
4579 if (mddev_is_clustered(mddev) && conf->cluster_sync_high <= sector_nr) { in reshape_request()
4583 conf->cluster_sync_low = sector_nr; in reshape_request()
4584 conf->cluster_sync_high = sector_nr + CLUSTER_RESYNC_WINDOW_SECTORS; in reshape_request()
4647 sector_nr += len >> 9; in reshape_request()
4659 if (sector_nr <= last) in reshape_request()