Lines Matching refs:dev_replace
2019 down_read(&fs_info->dev_replace.rwsem); in btrfs_num_devices()
2020 if (btrfs_dev_replace_is_ongoing(&fs_info->dev_replace)) { in btrfs_num_devices()
2024 up_read(&fs_info->dev_replace.rwsem); in btrfs_num_devices()
5775 down_read(&fs_info->dev_replace.rwsem); in btrfs_num_copies()
5776 if (btrfs_dev_replace_is_ongoing(&fs_info->dev_replace) && in btrfs_num_copies()
5777 fs_info->dev_replace.tgtdev) in btrfs_num_copies()
5779 up_read(&fs_info->dev_replace.rwsem); in btrfs_num_copies()
5857 fs_info->dev_replace.cont_reading_from_srcdev_mode == in find_live_mirror()
5859 srcdev = fs_info->dev_replace.srcdev; in find_live_mirror()
6186 struct btrfs_dev_replace *dev_replace, in handle_ops_on_dev_replace() argument
6191 u64 srcdev_devid = dev_replace->srcdev->devid; in handle_ops_on_dev_replace()
6204 if (is_block_group_to_copy(dev_replace->srcdev->fs_info, logical)) in handle_ops_on_dev_replace()
6228 new->dev = dev_replace->tgtdev; in handle_ops_on_dev_replace()
6268 tgtdev_stripe->dev = dev_replace->tgtdev; in handle_ops_on_dev_replace()
6402 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; in __btrfs_map_block() local
6429 down_read(&dev_replace->rwsem); in __btrfs_map_block()
6430 dev_replace_is_ongoing = btrfs_dev_replace_is_ongoing(dev_replace); in __btrfs_map_block()
6436 up_read(&dev_replace->rwsem); in __btrfs_map_block()
6439 !need_full_stripe(op) && dev_replace->tgtdev != NULL) { in __btrfs_map_block()
6441 dev_replace->srcdev->devid, in __btrfs_map_block()
6550 if (dev_replace_is_ongoing && dev_replace->tgtdev != NULL) { in __btrfs_map_block()
6566 !dev_replace->tgtdev)) { in __btrfs_map_block()
6568 smap->dev = dev_replace->tgtdev; in __btrfs_map_block()
6619 if (dev_replace_is_ongoing && dev_replace->tgtdev != NULL && in __btrfs_map_block()
6621 handle_ops_on_dev_replace(op, &bioc, dev_replace, logical, in __btrfs_map_block()
6638 bioc->stripes[0].dev = dev_replace->tgtdev; in __btrfs_map_block()
6644 lockdep_assert_held(&dev_replace->rwsem); in __btrfs_map_block()
6646 up_read(&dev_replace->rwsem); in __btrfs_map_block()