Lines Matching refs:stripes
3081 ret = btrfs_update_device(trans, map->stripes[i].dev);
3122 struct btrfs_device *device = map->stripes[i].dev;
3124 map->stripes[i].physical,
3153 * that replaces the device object associated with the map's stripes,
3827 /* stripes filter */
4178 CHECK_APPEND_2ARG("stripes=%u..%u,",
5079 /* Total number of stripes to allocate */
5093 /* Number of stripes worth of bytes to store parity information */
5265 /* Number of stripes that count for block group size */
5269 * The primary goal is to maximize the number of stripes, so use as
5270 * many devices as possible, even if the stripes are not maximum sized.
5283 * Use the number of data stripes to figure out how big this chunk is
5313 /* Number of stripes that count for block group size */
5348 * Round down to number of usable stripes, devs_increment can be any
5398 map->stripes[s].dev = devices_info[i].dev;
5399 map->stripes[s].physical = devices_info[i].dev_offset +
5438 struct btrfs_device *dev = map->stripes[i].dev;
5557 * that replaces the device object associated with the map's stripes,
5590 struct btrfs_device *device = map->stripes[i].dev;
5599 struct btrfs_device *device = map->stripes[i].dev;
5600 const u64 dev_offset = map->stripes[i].physical;
5703 &map->stripes[i].dev->dev_state)) {
5708 &map->stripes[i].dev->dev_state)) {
5771 * There could be two corrupted data stripes, we need
5867 if (map->stripes[preferred_mirror].dev->bdev &&
5868 (tolerance || map->stripes[preferred_mirror].dev != srcdev))
5871 if (map->stripes[i].dev->bdev &&
5872 (tolerance || map->stripes[i].dev != srcdev))
5891 /* Plus the variable array for the stripes */
5931 struct btrfs_discard_stripe *stripes;
5965 * stripe_nr counts the total number of stripes we have to stride
5979 * after this, stripe_nr is the number of stripes on this
6010 stripes = kcalloc(*num_stripes, sizeof(*stripes), GFP_NOFS);
6011 if (!stripes) {
6017 stripes[i].physical =
6018 map->stripes[stripe_index].physical +
6020 stripes[i].dev = map->stripes[stripe_index].dev;
6024 stripes[i].length = btrfs_stripe_nr_to_offset(stripes_per_dev);
6027 stripes[i].length += BTRFS_STRIPE_LEN;
6038 stripes[i].length -= stripe_offset;
6043 stripes[i].length -= stripe_end_offset;
6048 stripes[i].length = length;
6059 return stripes;
6090 * At this stage, num_stripes is still the real number of stripes,
6091 * excluding the duplicated stripes.
6113 * write to the old disk is already set up in the stripes array.
6116 struct btrfs_io_stripe *old = &bioc->stripes[i];
6117 struct btrfs_io_stripe *new = &bioc->stripes[num_stripes + nr_extra_stripes];
6134 * If we have 2 extra stripes, only choose the one with smaller physical.
6137 struct btrfs_io_stripe *first = &bioc->stripes[num_stripes];
6138 struct btrfs_io_stripe *second = &bioc->stripes[num_stripes + 1];
6140 /* Only DUP can have two extra stripes. */
6144 * Swap the last stripe stripes and reduce @nr_extra_stripes.
6210 dst->dev = map->stripes[stripe_index].dev;
6211 dst->physical = map->stripes[stripe_index].physical +
6244 * the remaining data stripes.
6248 * stripes..
6251 * a full stripe map (including all data and P/Q stripes)
6365 /* RAID[56] write or recovery. Return all stripes */
6387 /* We distribute the parity blocks across stripes */
6394 * After this, stripe_nr is the number of stripes on this
6414 * For replace case, we need to add extra stripes for extra
6415 * duplicated stripes.
6418 * 2 more stripes (DUP types, otherwise 1).
6445 * For RAID56 full map, we need to make sure the stripes[] follows the
6446 * rule that data stripes are all ordered, then followed with P and Q
6454 * For RAID56 @stripe_nr is already the number of full stripes
6464 set_io_stripe(&bioc->stripes[i], map,
6473 set_io_stripe(&bioc->stripes[i], map, stripe_index,
6826 map->stripes[i].physical =
6834 map->stripes[i].dev = btrfs_find_device(fs_info->fs_devices, &args);
6835 if (!map->stripes[i].dev) {
6836 map->stripes[i].dev = handle_missing_device(fs_info,
6838 if (IS_ERR(map->stripes[i].dev)) {
6839 ret = PTR_ERR(map->stripes[i].dev);
6846 &(map->stripes[i].dev->dev_state));
7117 "invalid number of stripes %u in sys_array at offset %u",
7191 struct btrfs_device *dev = map->stripes[i].dev;
7751 if (map->stripes[i].dev->devid == devid &&
7752 map->stripes[i].physical == physical_offset) {
8049 smap->dev = bioc->stripes[i].dev;
8050 smap->physical = bioc->stripes[i].physical +
8098 smap->dev = bioc->stripes[mirror_num - 1].dev;
8099 smap->physical = bioc->stripes[mirror_num - 1].physical;