Lines Matching refs:sector_nr

46 static void allow_barrier(struct r1conf *conf, sector_t sector_nr);
47 static void lower_barrier(struct r1conf *conf, sector_t sector_nr);
873 static int raise_barrier(struct r1conf *conf, sector_t sector_nr) in raise_barrier() argument
875 int idx = sector_to_idx(sector_nr); in raise_barrier()
923 static void lower_barrier(struct r1conf *conf, sector_t sector_nr) in lower_barrier() argument
925 int idx = sector_to_idx(sector_nr); in lower_barrier()
1003 static bool wait_read_barrier(struct r1conf *conf, sector_t sector_nr, bool nowait) in wait_read_barrier() argument
1005 int idx = sector_to_idx(sector_nr); in wait_read_barrier()
1046 static bool wait_barrier(struct r1conf *conf, sector_t sector_nr, bool nowait) in wait_barrier() argument
1048 int idx = sector_to_idx(sector_nr); in wait_barrier()
1059 static void allow_barrier(struct r1conf *conf, sector_t sector_nr) in allow_barrier() argument
1061 int idx = sector_to_idx(sector_nr); in allow_barrier()
2664 static sector_t raid1_sync_request(struct mddev *mddev, sector_t sector_nr, in raid1_sync_request() argument
2679 int idx = sector_to_idx(sector_nr); in raid1_sync_request()
2687 if (sector_nr >= max_sector) { in raid1_sync_request()
2714 return max_sector - sector_nr; in raid1_sync_request()
2719 if (!md_bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) && in raid1_sync_request()
2737 md_bitmap_cond_end_sync(mddev->bitmap, sector_nr, in raid1_sync_request()
2738 mddev_is_clustered(mddev) && (sector_nr + 2 * RESYNC_SECTORS > conf->cluster_sync_high)); in raid1_sync_request()
2741 if (raise_barrier(conf, sector_nr)) in raid1_sync_request()
2757 r1_bio->sector = sector_nr; in raid1_sync_request()
2761 good_sectors = align_to_barrier_unit_end(sector_nr, good_sectors); in raid1_sync_request()
2781 if (is_badblock(rdev, sector_nr, good_sectors, in raid1_sync_request()
2783 if (first_bad > sector_nr) in raid1_sync_request()
2784 good_sectors = first_bad - sector_nr; in raid1_sync_request()
2786 bad_sectors -= (sector_nr - first_bad); in raid1_sync_request()
2792 if (sector_nr < first_bad) { in raid1_sync_request()
2819 bio->bi_iter.bi_sector = sector_nr + rdev->data_offset; in raid1_sync_request()
2838 ok = rdev_set_badblocks(rdev, sector_nr, in raid1_sync_request()
2875 max_sector = sector_nr + min_bad; in raid1_sync_request()
2876 rv = max_sector - sector_nr; in raid1_sync_request()
2884 if (max_sector > sector_nr + good_sectors) in raid1_sync_request()
2885 max_sector = sector_nr + good_sectors; in raid1_sync_request()
2891 if (sector_nr + (len>>9) > max_sector) in raid1_sync_request()
2892 len = (max_sector - sector_nr) << 9; in raid1_sync_request()
2896 if (!md_bitmap_start_sync(mddev->bitmap, sector_nr, in raid1_sync_request()
2921 sector_nr += len>>9; in raid1_sync_request()
2928 conf->cluster_sync_high < sector_nr + nr_sectors) { in raid1_sync_request()