Searched refs:dev_replace (Results 1 – 9 of 9) sorted by relevance
76 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; in btrfs_init_dev_replace() local111 dev_replace->replace_state = in btrfs_init_dev_replace()113 dev_replace->cont_reading_from_srcdev_mode = in btrfs_init_dev_replace()115 dev_replace->time_started = 0; in btrfs_init_dev_replace()116 dev_replace->time_stopped = 0; in btrfs_init_dev_replace()117 atomic64_set(&dev_replace->num_write_errors, 0); in btrfs_init_dev_replace()118 atomic64_set(&dev_replace->num_uncorrectable_read_errors, 0); in btrfs_init_dev_replace()119 dev_replace->cursor_left = 0; in btrfs_init_dev_replace()120 dev_replace->committed_cursor_left = 0; in btrfs_init_dev_replace()121 dev_replace->cursor_left_last_write_of_item = 0; in btrfs_init_dev_replace()[all …]
24 int __pure btrfs_dev_replace_is_ongoing(struct btrfs_dev_replace *dev_replace);
785 WARN_ON(!fs_info->dev_replace.tgtdev); in scrub_setup_ctx()786 sctx->wr_tgtdev = fs_info->dev_replace.tgtdev; in scrub_setup_ctx()1321 &fs_info->dev_replace.num_write_errors); in scrub_handle_errored_block()1734 atomic64_inc(&fs_info->dev_replace.num_write_errors); in scrub_repair_sector_from_good_copy()1759 atomic64_inc(&fs_info->dev_replace.num_write_errors); in scrub_write_block_to_dev_replace()1920 struct btrfs_dev_replace *dev_replace = in scrub_wr_bio_end_io_worker() local1921 &sbio->sctx->fs_info->dev_replace; in scrub_wr_bio_end_io_worker()1927 atomic64_inc(&dev_replace->num_write_errors); in scrub_wr_bio_end_io_worker()3816 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; in scrub_enumerate_chunks() local4026 down_write(&dev_replace->rwsem); in scrub_enumerate_chunks()[all …]
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[all …]
1348 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; in btrfs_load_block_group_zone_info() local1383 down_read(&dev_replace->rwsem); in btrfs_load_block_group_zone_info()1384 dev_replace_is_ongoing = btrfs_dev_replace_is_ongoing(dev_replace); in btrfs_load_block_group_zone_info()1385 if (dev_replace_is_ongoing && dev_replace->tgtdev != NULL) in btrfs_load_block_group_zone_info()1386 btrfs_dev_clear_zone_empty(dev_replace->tgtdev, physical[i]); in btrfs_load_block_group_zone_info()1387 up_read(&dev_replace->rwsem); in btrfs_load_block_group_zone_info()
1600 percpu_counter_destroy(&fs_info->dev_replace.bio_counter); in btrfs_free_fs_info()2254 mutex_init(&fs_info->dev_replace.lock_finishing_cancel_unmount); in btrfs_init_dev_replace_locks()2255 init_rwsem(&fs_info->dev_replace.rwsem); in btrfs_init_dev_replace_locks()2256 init_waitqueue_head(&fs_info->dev_replace.replace_wait); in btrfs_init_dev_replace_locks()3131 ret = percpu_counter_init(&fs_info->dev_replace.bio_counter, 0, in init_mount_fs_info()
1329 fs_info->dev_replace.committed_cursor_left = in commit_cowonly_roots()1330 fs_info->dev_replace.cursor_left_last_write_of_item; in commit_cowonly_roots()
1276 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; in do_discard_extent() local1290 if (!btrfs_dev_replace_is_ongoing(dev_replace) || in do_discard_extent()1291 dev != dev_replace->srcdev) in do_discard_extent()1297 ret = btrfs_reset_device_zone(dev_replace->tgtdev, phys, len, in do_discard_extent()
981 struct btrfs_dev_replace dev_replace; member