Searched refs:dev_replace (Results 1 – 8 of 8) sorted by relevance
73 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; in btrfs_init_dev_replace() local106 dev_replace->replace_state = in btrfs_init_dev_replace()108 dev_replace->cont_reading_from_srcdev_mode = in btrfs_init_dev_replace()110 dev_replace->time_started = 0; in btrfs_init_dev_replace()111 dev_replace->time_stopped = 0; in btrfs_init_dev_replace()112 atomic64_set(&dev_replace->num_write_errors, 0); in btrfs_init_dev_replace()113 atomic64_set(&dev_replace->num_uncorrectable_read_errors, 0); in btrfs_init_dev_replace()114 dev_replace->cursor_left = 0; in btrfs_init_dev_replace()115 dev_replace->committed_cursor_left = 0; in btrfs_init_dev_replace()116 dev_replace->cursor_left_last_write_of_item = 0; in btrfs_init_dev_replace()[all …]
381 down_read(&fs_info->dev_replace.rwsem); in reada_find_extent()384 up_read(&fs_info->dev_replace.rwsem); in reada_find_extent()395 up_read(&fs_info->dev_replace.rwsem); in reada_find_extent()401 up_read(&fs_info->dev_replace.rwsem); in reada_find_extent()407 &fs_info->dev_replace); in reada_find_extent()428 dev == fs_info->dev_replace.tgtdev) { in reada_find_extent()446 up_read(&fs_info->dev_replace.rwsem); in reada_find_extent()454 up_read(&fs_info->dev_replace.rwsem); in reada_find_extent()
20 int __pure btrfs_dev_replace_is_ongoing(struct btrfs_dev_replace *dev_replace);
623 WARN_ON(!fs_info->dev_replace.tgtdev); in scrub_setup_ctx()625 sctx->wr_tgtdev = fs_info->dev_replace.tgtdev; in scrub_setup_ctx()1142 &fs_info->dev_replace.num_write_errors); in scrub_handle_errored_block()1582 atomic64_inc(&fs_info->dev_replace.num_write_errors); in scrub_repair_page_from_good_copy()1609 atomic64_inc(&fs_info->dev_replace.num_write_errors); in scrub_write_block_to_dev_replace()1730 struct btrfs_dev_replace *dev_replace = in scrub_wr_bio_end_io_worker() local1731 &sbio->sctx->fs_info->dev_replace; in scrub_wr_bio_end_io_worker()1737 atomic64_inc(&dev_replace->num_write_errors); in scrub_wr_bio_end_io_worker()3433 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; in scrub_enumerate_chunks() local3599 down_write(&dev_replace->rwsem); in scrub_enumerate_chunks()[all …]
2018 down_read(&fs_info->dev_replace.rwsem); in btrfs_num_devices()2019 if (btrfs_dev_replace_is_ongoing(&fs_info->dev_replace)) { in btrfs_num_devices()2023 up_read(&fs_info->dev_replace.rwsem); in btrfs_num_devices()5450 down_read(&fs_info->dev_replace.rwsem); in btrfs_num_copies()5451 if (btrfs_dev_replace_is_ongoing(&fs_info->dev_replace) && in btrfs_num_copies()5452 fs_info->dev_replace.tgtdev) in btrfs_num_copies()5454 up_read(&fs_info->dev_replace.rwsem); in btrfs_num_copies()5515 fs_info->dev_replace.cont_reading_from_srcdev_mode == in find_live_mirror()5517 srcdev = fs_info->dev_replace.srcdev; in find_live_mirror()5834 struct btrfs_dev_replace *dev_replace, in handle_ops_on_dev_replace() argument[all …]
1499 percpu_counter_destroy(&fs_info->dev_replace.bio_counter); in btrfs_free_fs_info()2142 mutex_init(&fs_info->dev_replace.lock_finishing_cancel_unmount); in btrfs_init_dev_replace_locks()2143 init_rwsem(&fs_info->dev_replace.rwsem); in btrfs_init_dev_replace_locks()2144 init_waitqueue_head(&fs_info->dev_replace.replace_wait); in btrfs_init_dev_replace_locks()2851 ret = percpu_counter_init(&fs_info->dev_replace.bio_counter, 0, in init_mount_fs_info()
1291 fs_info->dev_replace.committed_cursor_left = in commit_cowonly_roots()1292 fs_info->dev_replace.cursor_left_last_write_of_item; in commit_cowonly_roots()
929 struct btrfs_dev_replace dev_replace; member