• Home
  • Raw
  • Download

Lines Matching full:stripe

116  * the stripe hash table is used for locking, and to collect
117 * bios in hopes of making a full stripe
161 * use the page uptodate bit in the stripe cache array
201 * we hash on the first logical address of the stripe
290 * Stealing an rbio means taking all the uptodate pages from the stripe array
315 * all data stripe pages present and uptodate. in steal_rbio()
455 * insert an rbio into the stripe cache. It
525 * Returns true if the bio list inside this rbio covers an entire stripe (no
545 * the same stripe and if they are both going in the same
577 * We've need read the full stripe from the drive. in rbio_can_merge()
582 * change this stripe needs to do their own rmw. in rbio_can_merge()
612 /* Grab a sector inside P stripe */
619 /* Grab a sector inside Q stripe, return NULL if not RAID6 */
629 * The first stripe in the table for a logical address
632 * 1) Nobody has the stripe locked yet. The rbio is given
636 * 2) Someone has the stripe locked, but we're able to merge
640 * 3) Someone has the stripe locked, but we're not able to merge.
733 * rbios waiting for this stripe, the next one on the list will be started
769 * waiting for the chance to lock this stripe. in unlock_stripe()
863 * @stripe_nr: Stripe number, valid range [0, real_stripe)
864 * @sector_nr: Sector number inside the stripe,
916 * Our current stripe len should be fixed to 64k thus stripe_nsectors in alloc_rbio()
991 * Return the total number of errors found in the vertical stripe of @sector_nr.
993 * @faila and @failb will also be updated to the first and second stripe
1046 struct btrfs_io_stripe *stripe; in rbio_add_io_sector() local
1058 stripe = &rbio->bioc->stripes[stripe_nr]; in rbio_add_io_sector()
1059 disk_start = stripe->physical + sector_nr * sectorsize; in rbio_add_io_sector()
1061 /* if the device is missing, just fail this stripe */ in rbio_add_io_sector()
1062 if (!stripe->dev->bdev) { in rbio_add_io_sector()
1086 last->bi_bdev == stripe->dev->bdev) { in rbio_add_io_sector()
1095 bio = bio_alloc(stripe->dev->bdev, in rbio_add_io_sector()
1132 * searching through the bio list as we setup the IO in finish_rmw or stripe
1156 /* We rely on bio->bi_bdev to find the stripe number. */ in bio_get_trace_info()
1184 /* Generate PQ for one vertical stripe. */
1190 int stripe; in generate_pq_vertical() local
1193 /* First collect one sector from each data stripe */ in generate_pq_vertical()
1194 for (stripe = 0; stripe < rbio->nr_data; stripe++) { in generate_pq_vertical()
1195 sector = sector_in_rbio(rbio, stripe, sectornr, 0); in generate_pq_vertical()
1196 pointers[stripe] = kmap_local_page(sector->page) + in generate_pq_vertical()
1200 /* Then add the parity stripe */ in generate_pq_vertical()
1203 pointers[stripe++] = kmap_local_page(sector->page) + sector->pgoff; in generate_pq_vertical()
1212 pointers[stripe++] = kmap_local_page(sector->page) + in generate_pq_vertical()
1222 for (stripe = stripe - 1; stripe >= 0; stripe--) in generate_pq_vertical()
1223 kunmap_local(pointers[stripe]); in generate_pq_vertical()
1229 /* The total sector number inside the full stripe. */ in rmw_assemble_write_bios()
1232 int stripe; in rmw_assemble_write_bios() local
1254 stripe = total_sector_nr / rbio->stripe_nsectors; in rmw_assemble_write_bios()
1257 /* This vertical stripe has no data, skip it. */ in rmw_assemble_write_bios()
1261 if (stripe < rbio->nr_data) { in rmw_assemble_write_bios()
1262 sector = sector_in_rbio(rbio, stripe, sectornr, 1); in rmw_assemble_write_bios()
1266 sector = rbio_stripe_sector(rbio, stripe, sectornr); in rmw_assemble_write_bios()
1269 ret = rbio_add_io_sector(rbio, bio_list, sector, stripe, in rmw_assemble_write_bios()
1281 * Thus the source stripe number (in replace_stripe_src) should be valid. in rmw_assemble_write_bios()
1289 stripe = total_sector_nr / rbio->stripe_nsectors; in rmw_assemble_write_bios()
1294 * and replace_stripe_src[0] indicates the stripe number we in rmw_assemble_write_bios()
1297 if (stripe != rbio->bioc->replace_stripe_src) { in rmw_assemble_write_bios()
1299 * We can skip the whole stripe completely, note in rmw_assemble_write_bios()
1307 /* This vertical stripe has no data, skip it. */ in rmw_assemble_write_bios()
1311 if (stripe < rbio->nr_data) { in rmw_assemble_write_bios()
1312 sector = sector_in_rbio(rbio, stripe, sectornr, 1); in rmw_assemble_write_bios()
1316 sector = rbio_stripe_sector(rbio, stripe, sectornr); in rmw_assemble_write_bios()
1348 * and mark the stripe error instead. in set_rbio_range_error()
1460 /* No data csum for the whole stripe, no need to verify. */ in verify_bio_data_sectors()
1543 * Any time we get a partial stripe write while plugged
1589 /* We have a full stripe, queue it down. */ in raid_unplug()
1672 * Either we don't have any existing plug, or we're doing a full stripe, in raid56_parity_write()
1714 * Recover a vertical stripe specified by @sector_nr.
1741 * No errors in the vertical stripe, skip it. Can happen for recovery in recover_vertical()
1742 * which only part of a stripe failed csum check. in recover_vertical()
1751 * Setup our array of pointers with sectors from each stripe in recover_vertical()
1778 * Just the P stripe has failed, without in recover_vertical()
1779 * a bad data or Q stripe. in recover_vertical()
1781 * recovery for this stripe. in recover_vertical()
1792 * If the q stripe is failed, do a pstripe reconstruction from in recover_vertical()
1794 * If both the q stripe and the P stripe are failed, we're in recover_vertical()
1803 * can skip this vertical stripe. in recover_vertical()
1807 * Otherwise we have one bad data stripe and in recover_vertical()
1808 * a good P stripe. raid5! in recover_vertical()
1823 /* Rebuild from P stripe here (raid5 or raid6). */ in recover_vertical()
1843 * failed sectors repaired in the vertical stripe, thus they are now in recover_vertical()
1943 int stripe = total_sector_nr / rbio->stripe_nsectors; in recover_rbio() local
1952 if (!rbio->bioc->stripes[stripe].dev->bdev || in recover_rbio()
1962 sector = rbio_stripe_sector(rbio, stripe, sectornr); in recover_rbio()
1963 ret = rbio_add_io_sector(rbio, &bio_list, sector, stripe, in recover_rbio()
2010 /* This vertical stripe doesn't have errors. */ in set_rbio_raid6_extra_error()
2021 /* Now select another stripe to mark as error. */ in set_rbio_raid6_extra_error()
2032 /* We should found at least one vertical stripe with error.*/ in set_rbio_raid6_extra_error()
2063 * for 'mirror_num > 2', select a stripe to fail on every retry. in raid56_parity_recover()
2092 * stripe lock, if we trigger a metadata read, and it needs to do in fill_data_csums()
2120 * longer safe for this particular sub-stripe write. in fill_data_csums()
2123 "sub-stripe write for full stripe %llu is not safe, failed to get csum: %d", in fill_data_csums()
2153 int stripe = total_sector_nr / rbio->stripe_nsectors; in rmw_read_wait_recover() local
2156 sector = rbio_stripe_sector(rbio, stripe, sectornr); in rmw_read_wait_recover()
2158 stripe, sectornr, REQ_OP_READ); in rmw_read_wait_recover()
2234 * needed for both full-stripe and sub-stripe writes. in rmw_rbio()
2241 * Either full stripe write, or we have every data sector already in rmw_rbio()
2246 * Now we're doing sub-stripe write, also need all data stripes in rmw_rbio()
2262 * bio list any more, anyone else that wants to change this stripe in rmw_rbio()
2326 * The following code is used to scrub/replace the parity stripe
2358 * stripe. in raid56_parity_alloc_scrub_rbio()
2407 int stripe; in finish_parity_scrub() local
2426 * Replace is running and our P/Q stripe is being replaced, then we in finish_parity_scrub()
2448 /* RAID6, allocate and map temp space for the Q stripe */ in finish_parity_scrub()
2462 /* Map the parity stripe just once */ in finish_parity_scrub()
2469 /* first collect one page from each data stripe */ in finish_parity_scrub()
2470 for (stripe = 0; stripe < nr_data; stripe++) { in finish_parity_scrub()
2471 sector = sector_in_rbio(rbio, stripe, sectornr, 0); in finish_parity_scrub()
2472 pointers[stripe] = kmap_local_page(sector->page) + in finish_parity_scrub()
2496 for (stripe = nr_data - 1; stripe >= 0; stripe--) in finish_parity_scrub()
2497 kunmap_local(pointers[stripe]); in finish_parity_scrub()
2528 * Replace is running and our parity stripe needs to be duplicated to in finish_parity_scrub()
2529 * the target device. Check we have a valid source stripe number. in finish_parity_scrub()
2552 static inline int is_data_stripe(struct btrfs_raid_bio *rbio, int stripe) in is_data_stripe() argument
2554 if (stripe >= 0 && stripe < rbio->nr_data) in is_data_stripe()
2623 * Here means we got one corrupted data stripe and one in recover_scrub_rbio()
2626 * data, or we can not repair the data stripe. in recover_scrub_rbio()
2653 int stripe = total_sector_nr / rbio->stripe_nsectors; in scrub_assemble_read_bios() local
2656 /* No data in the vertical stripe, no need to read. */ in scrub_assemble_read_bios()
2663 * in the bio list we don't need to read it off the stripe. in scrub_assemble_read_bios()
2665 sector = sector_in_rbio(rbio, stripe, sectornr, 1); in scrub_assemble_read_bios()
2669 sector = rbio_stripe_sector(rbio, stripe, sectornr); in scrub_assemble_read_bios()
2677 ret = rbio_add_io_sector(rbio, &bio_list, sector, stripe, in scrub_assemble_read_bios()
2768 /* data_logical must be at stripe boundary and inside the full stripe. */ in raid56_parity_cache_data_pages()