Lines Matching full:sector
431 (unsigned long long)sh->sector);
438 struct hlist_head *hp = stripe_hash(conf, sh->sector);
441 (unsigned long long)sh->sector);
580 static void init_stripe(struct stripe_head *sh, sector_t sector, int previous)
591 (unsigned long long)sector);
596 sh->sector = sector;
597 stripe_set_idx(sector, conf, previous, sh);
605 pr_err("sector=%llx i=%d %p %p %p %p %d\n",
606 (unsigned long long)sh->sector, i, dev->toread,
612 dev->sector = raid5_compute_blocknr(sh, i, previous);
622 static struct stripe_head *__find_stripe(struct r5conf *conf, sector_t sector,
627 pr_debug("__find_stripe, sector %llu\n", (unsigned long long)sector);
628 hlist_for_each_entry(sh, stripe_hash(conf, sector), hash)
629 if (sh->sector == sector && sh->generation == generation)
631 pr_debug("__stripe %llu not in cache\n", (unsigned long long)sector);
636 sector_t sector, short generation, int hash)
641 sh = __find_stripe(conf, sector, generation);
774 /* first sector in the request */
777 /* last sector in the request */
808 struct stripe_request_ctx *ctx, sector_t sector,
812 int hash = stripe_hash_locks_hash(conf, sector);
815 pr_debug("get_stripe, sector %llu\n", (unsigned long long)sector);
838 sh = find_get_stripe(conf, sector, conf->generation - previous,
847 init_stripe(sh, sector, previous);
926 tmp_sec = sh->sector;
929 head_sector = sh->sector - RAID5_STRIPE_SECTORS(conf);
931 if (last_sh && head_sector == last_sh->sector) {
1048 if (da->sector > db->sector)
1050 if (da->sector < db->sector)
1115 static void defer_issue_bios(struct r5conf *conf, sector_t sector,
1125 ent->sector = sector;
1217 int bad = rdev_has_badblock(rdev, sh->sector,
1256 __func__, (unsigned long long)sh->sector,
1262 bi->bi_iter.bi_sector = (sh->sector
1265 bi->bi_iter.bi_sector = (sh->sector
1296 mddev_trace_remap(conf->mddev, bi, sh->dev[i].sector);
1312 __func__, (unsigned long long)sh->sector,
1318 rbi->bi_iter.bi_sector = (sh->sector
1321 rbi->bi_iter.bi_sector = (sh->sector
1336 mddev_trace_remap(conf->mddev, rbi, sh->dev[i].sector);
1343 pr_debug("skip op %d on disc %d for sector %llu\n",
1344 bi->bi_opf, i, (unsigned long long)sh->sector);
1358 defer_issue_bios(conf, head_sh->sector, &pending_bios);
1363 unsigned int poff, sector_t sector, struct dma_async_tx_descriptor *tx,
1374 if (bio->bi_iter.bi_sector >= sector)
1375 page_offset = (signed)(bio->bi_iter.bi_sector - sector) * 512;
1377 page_offset = (signed)(sector - bio->bi_iter.bi_sector) * -512;
1433 (unsigned long long)sh->sector);
1451 dev->sector + RAID5_STRIPE_SECTORS(conf)) {
1452 rbi2 = r5_next_bio(conf, rbi, dev->sector);
1473 (unsigned long long)sh->sector);
1484 dev->sector + RAID5_STRIPE_SECTORS(conf)) {
1487 dev->sector, tx, sh, 0);
1488 rbi = r5_next_bio(conf, rbi, dev->sector);
1516 (unsigned long long)sh->sector);
1569 __func__, (unsigned long long)sh->sector, target);
1674 __func__, (unsigned long long)sh->sector, target);
1730 __func__, (unsigned long long)sh->sector, target, target2);
1761 __func__, (unsigned long long)sh->sector, faila, failb);
1837 (unsigned long long)sh->sector);
1863 (unsigned long long)sh->sector);
1899 (unsigned long long)sh->sector);
1920 (unsigned long long)sh->sector);
1947 dev->sector + RAID5_STRIPE_SECTORS(conf)) {
1957 dev->sector, tx, sh,
1966 wbi = r5_next_bio(conf, wbi, dev->sector);
1993 (unsigned long long)sh->sector);
2048 (unsigned long long)sh->sector);
2141 pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector);
2196 (unsigned long long)sh->sector);
2218 (unsigned long long)sh->sector);
2252 (unsigned long long)sh->sector, checkp);
2723 (unsigned long long)sh->sector, i, atomic_read(&sh->count),
2740 s = sh->sector + rdev->new_data_offset;
2742 s = sh->sector + rdev->data_offset;
2779 "md/raid:%s: read error on replacement device (sector %llu on %pg).\n",
2786 "md/raid:%s: read error not correctable (sector %llu on %pg).\n",
2794 "md/raid:%s: read error NOT corrected!! (sector %llu on %pg).\n",
2825 rdev_set_badblocks(rdev, sh->sector,
2863 (unsigned long long)sh->sector, i, atomic_read(&sh->count),
2873 else if (rdev_has_badblock(rdev, sh->sector,
2883 } else if (rdev_has_badblock(rdev, sh->sector,
2943 * Input: a 'big' sector number,
2944 * Output: index of the data and parity disk, and the sector # in them.
2964 /* First compute the information on this sector */
2967 * Compute the chunk number and the sector offset inside the chunk
3142 * Finally, compute the new sector number
3153 sector_t new_sector = sh->sector, check;
3259 if (check != sh->sector || dummy1 != dd_idx || sh2.pd_idx != sh->pd_idx
3429 __func__, (unsigned long long)sh->sector,
3440 bi->bi_iter.bi_sector, sh->sector);
3468 sector_t sector;
3477 sector = sh->dev[i].sector;
3478 if (count == 0 || sector < first)
3479 first = sector;
3480 if (sector > last)
3481 last = sector;
3523 sector_t sector = sh->dev[dd_idx].sector;
3525 sector < sh->dev[dd_idx].sector + RAID5_STRIPE_SECTORS(conf) &&
3526 bi && bi->bi_iter.bi_sector <= sector;
3527 bi = r5_next_bio(conf, bi, sh->dev[dd_idx].sector)) {
3528 if (bio_end_sector(bi) >= sector)
3529 sector = bio_end_sector(bi);
3531 if (sector >= sh->dev[dd_idx].sector + RAID5_STRIPE_SECTORS(conf))
3537 (*bip)->bi_iter.bi_sector, sh->sector, dd_idx,
3538 sh->dev[dd_idx].sector);
3604 sh->sector,
3623 sh->dev[i].sector + RAID5_STRIPE_SECTORS(conf)) {
3624 struct bio *nextbi = r5_next_bio(conf, bi, sh->dev[i].sector);
3639 sh->dev[i].sector + RAID5_STRIPE_SECTORS(conf)) {
3640 struct bio *bi2 = r5_next_bio(conf, bi, sh->dev[i].sector);
3663 sh->dev[i].sector + RAID5_STRIPE_SECTORS(conf)) {
3665 r5_next_bio(conf, bi, sh->dev[i].sector);
3714 && !rdev_set_badblocks(rdev, sh->sector,
3722 && !rdev_set_badblocks(rdev, sh->sector,
3742 && (rdev->recovery_offset <= sh->sector
3743 || rdev->mddev->resync_offset <= sh->sector))
3760 !mddev->bitmap_ops->blocks_synced(mddev, sh->sector)))
3840 sh->sector < sh->raid_conf->mddev->resync_offset)
3891 (unsigned long long)sh->sector, disk_idx);
3922 (unsigned long long)sh->sector,
4020 dev->sector + RAID5_STRIPE_SECTORS(conf)) {
4021 wbi2 = r5_next_bio(conf, wbi, dev->sector);
4118 (resync_offset < MaxSector && sh->sector >= resync_offset &&
4124 pr_debug("force RCW rmw_level=%u, resync_offset=%llu sh->sector=%llu\n",
4126 (unsigned long long)sh->sector);
4128 !mddev->bitmap_ops->blocks_synced(mddev, sh->sector)) {
4131 pr_debug("force RCW by lazy recovery, sh->sector=%llu\n",
4132 sh->sector);
4160 pr_debug("for sector %llu state 0x%lx, rmw=%d rcw=%d\n",
4161 (unsigned long long)sh->sector, sh->state, rmw, rcw);
4166 sh->sector, rmw);
4247 (unsigned long long)sh->sector, rcw, qread,
4337 pr_warn_ratelimited("%s: mismatch sector in range "
4339 (unsigned long long) sh->sector,
4340 (unsigned long long) sh->sector +
4357 pr_err("%s: unknown check_state: %d sector: %llu\n",
4359 (unsigned long long) sh->sector);
4501 pr_warn_ratelimited("%s: mismatch sector in range "
4503 (unsigned long long) sh->sector,
4504 (unsigned long long) sh->sector +
4533 pr_warn("%s: unknown check_state: %d sector: %llu\n",
4535 (unsigned long long) sh->sector);
4660 rdev->recovery_offset >= sh->sector + RAID5_STRIPE_SECTORS(conf) &&
4661 !rdev_has_badblock(rdev, sh->sector,
4675 is_bad = rdev_has_badblock(rdev, sh->sector,
4701 else if (sh->sector + RAID5_STRIPE_SECTORS(conf) <=
4791 sh->sector >= conf->mddev->resync_offset ||
4954 (unsigned long long)sh->sector, sh->state,
5195 = raid5_get_active_stripe(conf, NULL, sh->sector,
5226 stripe_set_idx(sh->sector, conf, 0, sh);
5261 rdev_set_badblocks(rdev, sh->sector,
5267 rdev_clear_badblocks(rdev, sh->sector,
5276 rdev_clear_badblocks(rdev, sh->sector,
5339 sector_t sector = bio->bi_iter.bi_sector;
5345 ((sector & (chunk_sectors - 1)) + bio_sectors);
5421 sector_t sector, end_sector;
5430 sector = raid5_compute_sector(conf, raid_bio->bi_iter.bi_sector, 0,
5432 end_sector = sector + bio_sectors(raid_bio);
5434 if (r5c_big_stripe_cached(conf, sector))
5451 if (rdev_has_badblock(rdev, sector, bio_sectors(raid_bio))) {
5463 align_bio->bi_iter.bi_sector = sector;
5494 sector_t sector = raid_bio->bi_iter.bi_sector;
5496 unsigned sectors = chunk_sects - (sector & (chunk_sects-1));
5772 static bool ahead_of_reshape(struct mddev *mddev, sector_t sector,
5775 return mddev->reshape_backwards ? sector < reshape_sector :
5776 sector >= reshape_sector;
5797 min_sector = min(min_sector, sh->dev[dd_idx].sector);
5798 max_sector = max(max_sector, sh->dev[dd_idx].sector);
5827 if (dev->sector < ctx->first_sector ||
5828 dev->sector >= ctx->last_sector)
5852 if (dev->sector < ctx->first_sector ||
5853 dev->sector >= ctx->last_sector)
5857 clear_bit((dev->sector - ctx->first_sector) >>
5972 pr_debug("raid456: %s, sector %llu logical %llu\n", __func__,
6056 * If the bio covers multiple data disks, find sector within the bio that has
6068 sector_t sector;
6071 sector = raid5_compute_sector(conf, r_sector, 0, &dd_idx, &sh);
6072 chunk_offset = sector_div(sector, sectors_per_chunk);
6623 sector_t sector, logical_sector, last_sector;
6629 sector = raid5_compute_sector(conf, logical_sector,
6635 sector += RAID5_STRIPE_SECTORS(conf),
6642 sh = raid5_get_active_stripe(conf, NULL, sector,