Lines Matching refs:sector

138 static inline struct bio *r5_next_bio(struct bio *bio, sector_t sector)  in r5_next_bio()  argument
141 if (bio->bi_iter.bi_sector + sectors < sector + STRIPE_SECTORS) in r5_next_bio()
449 (unsigned long long)sh->sector); in remove_hash()
456 struct hlist_head *hp = stripe_hash(conf, sh->sector); in insert_hash()
459 (unsigned long long)sh->sector); in insert_hash()
521 static void init_stripe(struct stripe_head *sh, sector_t sector, int previous) in init_stripe() argument
532 (unsigned long long)sector); in init_stripe()
537 sh->sector = sector; in init_stripe()
538 stripe_set_idx(sector, conf, previous, sh); in init_stripe()
547 (unsigned long long)sh->sector, i, dev->toread, in init_stripe()
563 static struct stripe_head *__find_stripe(struct r5conf *conf, sector_t sector, in __find_stripe() argument
568 pr_debug("__find_stripe, sector %llu\n", (unsigned long long)sector); in __find_stripe()
569 hlist_for_each_entry(sh, stripe_hash(conf, sector), hash) in __find_stripe()
570 if (sh->sector == sector && sh->generation == generation) in __find_stripe()
572 pr_debug("__stripe %llu not in cache\n", (unsigned long long)sector); in __find_stripe()
659 get_active_stripe(struct r5conf *conf, sector_t sector, in get_active_stripe() argument
663 int hash = stripe_hash_locks_hash(sector); in get_active_stripe()
665 pr_debug("get_stripe, sector %llu\n", (unsigned long long)sector); in get_active_stripe()
673 sh = __find_stripe(conf, sector, conf->generation - previous); in get_active_stripe()
698 init_stripe(sh, sector, previous); in get_active_stripe()
767 tmp_sec = sh->sector; in stripe_add_to_batch_list()
770 head_sector = sh->sector - STRIPE_SECTORS; in stripe_add_to_batch_list()
958 int bad = is_badblock(rdev, sh->sector, STRIPE_SECTORS, in ops_run_io()
1003 __func__, (unsigned long long)sh->sector, in ops_run_io()
1009 bi->bi_iter.bi_sector = (sh->sector in ops_run_io()
1012 bi->bi_iter.bi_sector = (sh->sector in ops_run_io()
1036 sh->dev[i].sector); in ops_run_io()
1055 __func__, (unsigned long long)sh->sector, in ops_run_io()
1061 rbi->bi_iter.bi_sector = (sh->sector in ops_run_io()
1064 rbi->bi_iter.bi_sector = (sh->sector in ops_run_io()
1082 sh->dev[i].sector); in ops_run_io()
1089 bi->bi_rw, i, (unsigned long long)sh->sector); in ops_run_io()
1105 sector_t sector, struct dma_async_tx_descriptor *tx, in async_copy_data() argument
1115 if (bio->bi_iter.bi_sector >= sector) in async_copy_data()
1116 page_offset = (signed)(bio->bi_iter.bi_sector - sector) * 512; in async_copy_data()
1118 page_offset = (signed)(sector - bio->bi_iter.bi_sector) * -512; in async_copy_data()
1173 (unsigned long long)sh->sector); in ops_complete_biofill()
1191 dev->sector + STRIPE_SECTORS) { in ops_complete_biofill()
1192 rbi2 = r5_next_bio(rbi, dev->sector); in ops_complete_biofill()
1217 (unsigned long long)sh->sector); in ops_run_biofill()
1228 dev->sector + STRIPE_SECTORS) { in ops_run_biofill()
1230 dev->sector, tx, sh); in ops_run_biofill()
1231 rbi = r5_next_bio(rbi, dev->sector); in ops_run_biofill()
1259 (unsigned long long)sh->sector); in ops_complete_compute()
1307 __func__, (unsigned long long)sh->sector, target); in ops_run_compute5()
1391 __func__, (unsigned long long)sh->sector, target); in ops_run_compute6_1()
1442 __func__, (unsigned long long)sh->sector, target, target2); in ops_run_compute6_2()
1470 __func__, (unsigned long long)sh->sector, faila, failb); in ops_run_compute6_2()
1538 (unsigned long long)sh->sector); in ops_complete_prexor()
1555 (unsigned long long)sh->sector); in ops_run_prexor5()
1580 (unsigned long long)sh->sector); in ops_run_prexor6()
1599 (unsigned long long)sh->sector); in ops_run_biodrain()
1621 dev->sector + STRIPE_SECTORS) { in ops_run_biodrain()
1630 dev->sector, tx, sh); in ops_run_biodrain()
1637 wbi = r5_next_bio(wbi, dev->sector); in ops_run_biodrain()
1664 (unsigned long long)sh->sector); in ops_complete_reconstruct()
1714 (unsigned long long)sh->sector); in ops_run_reconstruct5()
1796 pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); in ops_run_reconstruct6()
1849 (unsigned long long)sh->sector); in ops_complete_check()
1869 (unsigned long long)sh->sector); in ops_run_check_p()
1898 (unsigned long long)sh->sector, checkp); in ops_run_check_pq()
2301 (unsigned long long)sh->sector, i, atomic_read(&sh->count), in raid5_end_read_request()
2318 s = sh->sector + rdev->new_data_offset; in raid5_end_read_request()
2320 s = sh->sector + rdev->data_offset; in raid5_end_read_request()
2399 rdev, sh->sector, STRIPE_SECTORS, 0))) in raid5_end_read_request()
2439 (unsigned long long)sh->sector, i, atomic_read(&sh->count), in raid5_end_write_request()
2449 else if (is_badblock(rdev, sh->sector, in raid5_end_write_request()
2461 } else if (is_badblock(rdev, sh->sector, in raid5_end_write_request()
2504 dev->sector = compute_blocknr(sh, i, previous); in raid5_build_block()
2743 sector_t new_sector = sh->sector, check; in compute_blocknr()
2849 if (check != sh->sector || dummy1 != dd_idx || sh2.pd_idx != sh->pd_idx in compute_blocknr()
2944 __func__, (unsigned long long)sh->sector, in schedule_reconstruction()
2962 (unsigned long long)sh->sector); in add_stripe_bio()
3001 sector_t sector = sh->dev[dd_idx].sector; in add_stripe_bio() local
3003 sector < sh->dev[dd_idx].sector + STRIPE_SECTORS && in add_stripe_bio()
3004 bi && bi->bi_iter.bi_sector <= sector; in add_stripe_bio()
3005 bi = r5_next_bio(bi, sh->dev[dd_idx].sector)) { in add_stripe_bio()
3006 if (bio_end_sector(bi) >= sector) in add_stripe_bio()
3007 sector = bio_end_sector(bi); in add_stripe_bio()
3009 if (sector >= sh->dev[dd_idx].sector + STRIPE_SECTORS) in add_stripe_bio()
3016 (unsigned long long)sh->sector, dd_idx); in add_stripe_bio()
3033 bitmap_startwrite(conf->mddev->bitmap, sh->sector, in add_stripe_bio()
3095 sh->sector, in handle_failed_stripe()
3114 sh->dev[i].sector + STRIPE_SECTORS) { in handle_failed_stripe()
3115 struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); in handle_failed_stripe()
3125 bitmap_endwrite(conf->mddev->bitmap, sh->sector, in handle_failed_stripe()
3138 sh->dev[i].sector + STRIPE_SECTORS) { in handle_failed_stripe()
3139 struct bio *bi2 = r5_next_bio(bi, sh->dev[i].sector); in handle_failed_stripe()
3162 sh->dev[i].sector + STRIPE_SECTORS) { in handle_failed_stripe()
3164 r5_next_bio(bi, sh->dev[i].sector); in handle_failed_stripe()
3174 bitmap_endwrite(conf->mddev->bitmap, sh->sector, in handle_failed_stripe()
3216 && !rdev_set_badblocks(rdev, sh->sector, in handle_failed_sync()
3223 && !rdev_set_badblocks(rdev, sh->sector, in handle_failed_sync()
3243 && (rdev->recovery_offset <= sh->sector in want_replace()
3244 || rdev->mddev->recovery_cp <= sh->sector)) in want_replace()
3333 sh->sector < sh->raid_conf->mddev->recovery_cp) in need_this_block()
3367 (unsigned long long)sh->sector, disk_idx); in fetch_block()
3396 (unsigned long long)sh->sector, in fetch_block()
3478 dev->sector + STRIPE_SECTORS) { in handle_stripe_clean_event()
3479 wbi2 = r5_next_bio(wbi, dev->sector); in handle_stripe_clean_event()
3487 bitmap_endwrite(conf->mddev->bitmap, sh->sector, in handle_stripe_clean_event()
3565 (recovery_cp < MaxSector && sh->sector >= recovery_cp && in handle_stripe_dirtying()
3573 (unsigned long long)sh->sector); in handle_stripe_dirtying()
3599 (unsigned long long)sh->sector, rmw, rcw); in handle_stripe_dirtying()
3606 (unsigned long long)sh->sector, rmw); in handle_stripe_dirtying()
3657 (unsigned long long)sh->sector, in handle_stripe_dirtying()
3764 (unsigned long long) sh->sector); in handle_parity_checks5()
3928 (unsigned long long) sh->sector); in handle_parity_checks6()
4067 rdev->recovery_offset >= sh->sector + STRIPE_SECTORS && in analyse_stripe()
4068 !is_badblock(rdev, sh->sector, STRIPE_SECTORS, in analyse_stripe()
4080 is_bad = is_badblock(rdev, sh->sector, STRIPE_SECTORS, in analyse_stripe()
4107 else if (sh->sector + STRIPE_SECTORS <= rdev->recovery_offset) in analyse_stripe()
4176 sh->sector >= conf->mddev->recovery_cp || in analyse_stripe()
4322 (unsigned long long)sh->sector, sh->state, in handle_stripe()
4514 = get_active_stripe(conf, sh->sector, 1, 1, 1); in handle_stripe()
4543 stripe_set_idx(sh->sector, conf, 0, sh); in handle_stripe()
4578 if (!rdev_set_badblocks(rdev, sh->sector, in handle_stripe()
4585 rdev_clear_badblocks(rdev, sh->sector, in handle_stripe()
4594 rdev_clear_badblocks(rdev, sh->sector, in handle_stripe()
4680 sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev); in raid5_mergeable_bvec() local
4694 max = (chunk_sectors - ((sector & (chunk_sectors - 1)) + bio_sectors)) << 9; in raid5_mergeable_bvec()
4704 sector_t sector = bio->bi_iter.bi_sector + get_start_sect(bio->bi_bdev); in in_chunk_boundary() local
4711 ((sector & (chunk_sectors - 1)) + bio_sectors); in in_chunk_boundary()
5127 sh->sector, in make_discard_request()
5673 sector_t sector, logical_sector, last_sector; in retry_aligned_read() local
5680 sector = raid5_compute_sector(conf, logical_sector, in retry_aligned_read()
5686 sector += STRIPE_SECTORS, in retry_aligned_read()
5693 sh = get_active_stripe(conf, sector, 0, 1, 1); in retry_aligned_read()