Lines Matching refs:sector

431 		(unsigned long long)sh->sector);  in remove_hash()
438 struct hlist_head *hp = stripe_hash(conf, sh->sector); in insert_hash()
441 (unsigned long long)sh->sector); in insert_hash()
580 static void init_stripe(struct stripe_head *sh, sector_t sector, int previous) in init_stripe() argument
591 (unsigned long long)sector); in init_stripe()
596 sh->sector = sector; in init_stripe()
597 stripe_set_idx(sector, conf, previous, sh); in init_stripe()
606 (unsigned long long)sh->sector, i, dev->toread, in init_stripe()
612 dev->sector = raid5_compute_blocknr(sh, i, previous); in init_stripe()
622 static struct stripe_head *__find_stripe(struct r5conf *conf, sector_t sector, in __find_stripe() argument
627 pr_debug("__find_stripe, sector %llu\n", (unsigned long long)sector); in __find_stripe()
628 hlist_for_each_entry(sh, stripe_hash(conf, sector), hash) in __find_stripe()
629 if (sh->sector == sector && sh->generation == generation) in __find_stripe()
631 pr_debug("__stripe %llu not in cache\n", (unsigned long long)sector); in __find_stripe()
636 sector_t sector, short generation, int hash) in find_get_stripe() argument
641 sh = __find_stripe(conf, sector, generation); in find_get_stripe()
808 struct stripe_request_ctx *ctx, sector_t sector, in raid5_get_active_stripe() argument
812 int hash = stripe_hash_locks_hash(conf, sector); in raid5_get_active_stripe()
815 pr_debug("get_stripe, sector %llu\n", (unsigned long long)sector); in raid5_get_active_stripe()
838 sh = find_get_stripe(conf, sector, conf->generation - previous, in raid5_get_active_stripe()
847 init_stripe(sh, sector, previous); in raid5_get_active_stripe()
926 tmp_sec = sh->sector; in stripe_add_to_batch_list()
929 head_sector = sh->sector - RAID5_STRIPE_SECTORS(conf); in stripe_add_to_batch_list()
931 if (last_sh && head_sector == last_sh->sector) { in stripe_add_to_batch_list()
1048 if (da->sector > db->sector) in cmp_stripe()
1050 if (da->sector < db->sector) in cmp_stripe()
1115 static void defer_issue_bios(struct r5conf *conf, sector_t sector, in defer_issue_bios() argument
1125 ent->sector = sector; in defer_issue_bios()
1217 int bad = rdev_has_badblock(rdev, sh->sector, in ops_run_io()
1256 __func__, (unsigned long long)sh->sector, in ops_run_io()
1262 bi->bi_iter.bi_sector = (sh->sector in ops_run_io()
1265 bi->bi_iter.bi_sector = (sh->sector in ops_run_io()
1296 mddev_trace_remap(conf->mddev, bi, sh->dev[i].sector); in ops_run_io()
1312 __func__, (unsigned long long)sh->sector, in ops_run_io()
1318 rbi->bi_iter.bi_sector = (sh->sector in ops_run_io()
1321 rbi->bi_iter.bi_sector = (sh->sector in ops_run_io()
1336 mddev_trace_remap(conf->mddev, rbi, sh->dev[i].sector); in ops_run_io()
1344 bi->bi_opf, i, (unsigned long long)sh->sector); in ops_run_io()
1358 defer_issue_bios(conf, head_sh->sector, &pending_bios); in ops_run_io()
1363 unsigned int poff, sector_t sector, struct dma_async_tx_descriptor *tx, in async_copy_data() argument
1374 if (bio->bi_iter.bi_sector >= sector) in async_copy_data()
1375 page_offset = (signed)(bio->bi_iter.bi_sector - sector) * 512; in async_copy_data()
1377 page_offset = (signed)(sector - bio->bi_iter.bi_sector) * -512; in async_copy_data()
1433 (unsigned long long)sh->sector); in ops_complete_biofill()
1451 dev->sector + RAID5_STRIPE_SECTORS(conf)) { in ops_complete_biofill()
1452 rbi2 = r5_next_bio(conf, rbi, dev->sector); in ops_complete_biofill()
1473 (unsigned long long)sh->sector); in ops_run_biofill()
1484 dev->sector + RAID5_STRIPE_SECTORS(conf)) { in ops_run_biofill()
1487 dev->sector, tx, sh, 0); in ops_run_biofill()
1488 rbi = r5_next_bio(conf, rbi, dev->sector); in ops_run_biofill()
1516 (unsigned long long)sh->sector); in ops_complete_compute()
1569 __func__, (unsigned long long)sh->sector, target); in ops_run_compute5()
1674 __func__, (unsigned long long)sh->sector, target); in ops_run_compute6_1()
1730 __func__, (unsigned long long)sh->sector, target, target2); in ops_run_compute6_2()
1761 __func__, (unsigned long long)sh->sector, faila, failb); in ops_run_compute6_2()
1837 (unsigned long long)sh->sector); in ops_complete_prexor()
1863 (unsigned long long)sh->sector); in ops_run_prexor5()
1899 (unsigned long long)sh->sector); in ops_run_prexor6()
1920 (unsigned long long)sh->sector); in ops_run_biodrain()
1947 dev->sector + RAID5_STRIPE_SECTORS(conf)) { in ops_run_biodrain()
1957 dev->sector, tx, sh, in ops_run_biodrain()
1966 wbi = r5_next_bio(conf, wbi, dev->sector); in ops_run_biodrain()
1993 (unsigned long long)sh->sector); in ops_complete_reconstruct()
2048 (unsigned long long)sh->sector); in ops_run_reconstruct5()
2141 pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); in ops_run_reconstruct6()
2196 (unsigned long long)sh->sector); in ops_complete_check()
2218 (unsigned long long)sh->sector); in ops_run_check_p()
2252 (unsigned long long)sh->sector, checkp); in ops_run_check_pq()
2723 (unsigned long long)sh->sector, i, atomic_read(&sh->count), in raid5_end_read_request()
2740 s = sh->sector + rdev->new_data_offset; in raid5_end_read_request()
2742 s = sh->sector + rdev->data_offset; in raid5_end_read_request()
2825 rdev_set_badblocks(rdev, sh->sector, in raid5_end_read_request()
2863 (unsigned long long)sh->sector, i, atomic_read(&sh->count), in raid5_end_write_request()
2873 else if (rdev_has_badblock(rdev, sh->sector, in raid5_end_write_request()
2883 } else if (rdev_has_badblock(rdev, sh->sector, in raid5_end_write_request()
3153 sector_t new_sector = sh->sector, check; in raid5_compute_blocknr()
3259 if (check != sh->sector || dummy1 != dd_idx || sh2.pd_idx != sh->pd_idx in raid5_compute_blocknr()
3429 __func__, (unsigned long long)sh->sector, in schedule_reconstruction()
3440 bi->bi_iter.bi_sector, sh->sector); in stripe_bio_overlaps()
3468 sector_t sector; in stripe_bio_overlaps() local
3477 sector = sh->dev[i].sector; in stripe_bio_overlaps()
3478 if (count == 0 || sector < first) in stripe_bio_overlaps()
3479 first = sector; in stripe_bio_overlaps()
3480 if (sector > last) in stripe_bio_overlaps()
3481 last = sector; in stripe_bio_overlaps()
3523 sector_t sector = sh->dev[dd_idx].sector; in __add_stripe_bio() local
3525 sector < sh->dev[dd_idx].sector + RAID5_STRIPE_SECTORS(conf) && in __add_stripe_bio()
3526 bi && bi->bi_iter.bi_sector <= sector; in __add_stripe_bio()
3527 bi = r5_next_bio(conf, bi, sh->dev[dd_idx].sector)) { in __add_stripe_bio()
3528 if (bio_end_sector(bi) >= sector) in __add_stripe_bio()
3529 sector = bio_end_sector(bi); in __add_stripe_bio()
3531 if (sector >= sh->dev[dd_idx].sector + RAID5_STRIPE_SECTORS(conf)) in __add_stripe_bio()
3537 (*bip)->bi_iter.bi_sector, sh->sector, dd_idx, in __add_stripe_bio()
3538 sh->dev[dd_idx].sector); in __add_stripe_bio()
3604 sh->sector, in handle_failed_stripe()
3623 sh->dev[i].sector + RAID5_STRIPE_SECTORS(conf)) { in handle_failed_stripe()
3624 struct bio *nextbi = r5_next_bio(conf, bi, sh->dev[i].sector); in handle_failed_stripe()
3639 sh->dev[i].sector + RAID5_STRIPE_SECTORS(conf)) { in handle_failed_stripe()
3640 struct bio *bi2 = r5_next_bio(conf, bi, sh->dev[i].sector); in handle_failed_stripe()
3663 sh->dev[i].sector + RAID5_STRIPE_SECTORS(conf)) { in handle_failed_stripe()
3665 r5_next_bio(conf, bi, sh->dev[i].sector); in handle_failed_stripe()
3714 && !rdev_set_badblocks(rdev, sh->sector, in handle_failed_sync()
3722 && !rdev_set_badblocks(rdev, sh->sector, in handle_failed_sync()
3742 && (rdev->recovery_offset <= sh->sector in want_replace()
3743 || rdev->mddev->resync_offset <= sh->sector)) in want_replace()
3760 !mddev->bitmap_ops->blocks_synced(mddev, sh->sector))) in need_this_block()
3840 sh->sector < sh->raid_conf->mddev->resync_offset) in need_this_block()
3891 (unsigned long long)sh->sector, disk_idx); in fetch_block()
3920 (unsigned long long)sh->sector, in fetch_block()
4018 dev->sector + RAID5_STRIPE_SECTORS(conf)) { in handle_stripe_clean_event()
4019 wbi2 = r5_next_bio(conf, wbi, dev->sector); in handle_stripe_clean_event()
4116 (resync_offset < MaxSector && sh->sector >= resync_offset && in handle_stripe_dirtying()
4124 (unsigned long long)sh->sector); in handle_stripe_dirtying()
4126 !mddev->bitmap_ops->blocks_synced(mddev, sh->sector)) { in handle_stripe_dirtying()
4130 sh->sector); in handle_stripe_dirtying()
4159 (unsigned long long)sh->sector, sh->state, rmw, rcw); in handle_stripe_dirtying()
4164 sh->sector, rmw); in handle_stripe_dirtying()
4245 (unsigned long long)sh->sector, rcw, qread, in handle_stripe_dirtying()
4337 (unsigned long long) sh->sector, in handle_parity_checks5()
4338 (unsigned long long) sh->sector + in handle_parity_checks5()
4357 (unsigned long long) sh->sector); in handle_parity_checks5()
4501 (unsigned long long) sh->sector, in handle_parity_checks6()
4502 (unsigned long long) sh->sector + in handle_parity_checks6()
4533 (unsigned long long) sh->sector); in handle_parity_checks6()
4672 rdev->recovery_offset >= sh->sector + RAID5_STRIPE_SECTORS(conf) && in analyse_stripe()
4673 !rdev_has_badblock(rdev, sh->sector, in analyse_stripe()
4687 is_bad = rdev_has_badblock(rdev, sh->sector, in analyse_stripe()
4713 else if (sh->sector + RAID5_STRIPE_SECTORS(conf) <= in analyse_stripe()
4803 sh->sector >= conf->mddev->resync_offset || in analyse_stripe()
4954 (unsigned long long)sh->sector, sh->state, in handle_stripe()
5195 = raid5_get_active_stripe(conf, NULL, sh->sector, in handle_stripe()
5226 stripe_set_idx(sh->sector, conf, 0, sh); in handle_stripe()
5261 rdev_set_badblocks(rdev, sh->sector, in handle_stripe()
5267 rdev_clear_badblocks(rdev, sh->sector, in handle_stripe()
5276 rdev_clear_badblocks(rdev, sh->sector, in handle_stripe()
5339 sector_t sector = bio->bi_iter.bi_sector; in in_chunk_boundary() local
5345 ((sector & (chunk_sectors - 1)) + bio_sectors); in in_chunk_boundary()
5421 sector_t sector, end_sector; in raid5_read_one_chunk() local
5430 sector = raid5_compute_sector(conf, raid_bio->bi_iter.bi_sector, 0, in raid5_read_one_chunk()
5432 end_sector = sector + bio_sectors(raid_bio); in raid5_read_one_chunk()
5434 if (r5c_big_stripe_cached(conf, sector)) in raid5_read_one_chunk()
5451 if (rdev_has_badblock(rdev, sector, bio_sectors(raid_bio))) { in raid5_read_one_chunk()
5463 align_bio->bi_iter.bi_sector = sector; in raid5_read_one_chunk()
5494 sector_t sector = raid_bio->bi_iter.bi_sector; in chunk_aligned_read() local
5496 unsigned sectors = chunk_sects - (sector & (chunk_sects-1)); in chunk_aligned_read()
5772 static bool ahead_of_reshape(struct mddev *mddev, sector_t sector, in ahead_of_reshape() argument
5775 return mddev->reshape_backwards ? sector < reshape_sector : in ahead_of_reshape()
5776 sector >= reshape_sector; in ahead_of_reshape()
5797 min_sector = min(min_sector, sh->dev[dd_idx].sector); in stripe_ahead_of_reshape()
5798 max_sector = max(max_sector, sh->dev[dd_idx].sector); in stripe_ahead_of_reshape()
5827 if (dev->sector < ctx->first_sector || in add_all_stripe_bios()
5828 dev->sector >= ctx->last_sector) in add_all_stripe_bios()
5852 if (dev->sector < ctx->first_sector || in add_all_stripe_bios()
5853 dev->sector >= ctx->last_sector) in add_all_stripe_bios()
5857 clear_bit((dev->sector - ctx->first_sector) >> in add_all_stripe_bios()
6065 sector_t sector; in raid5_bio_lowest_chunk_sector() local
6068 sector = raid5_compute_sector(conf, r_sector, 0, &dd_idx, &sh); in raid5_bio_lowest_chunk_sector()
6069 chunk_offset = sector_div(sector, sectors_per_chunk); in raid5_bio_lowest_chunk_sector()
6615 sector_t sector, logical_sector, last_sector; in retry_aligned_read() local
6621 sector = raid5_compute_sector(conf, logical_sector, in retry_aligned_read()
6627 sector += RAID5_STRIPE_SECTORS(conf), in retry_aligned_read()
6634 sh = raid5_get_active_stripe(conf, NULL, sector, in retry_aligned_read()