Searched refs:dev_replace (Results 1 – 8 of 8) sorted by relevance
37 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; in btrfs_init_dev_replace() local59 dev_replace->replace_state = in btrfs_init_dev_replace()61 dev_replace->cont_reading_from_srcdev_mode = in btrfs_init_dev_replace()63 dev_replace->time_started = 0; in btrfs_init_dev_replace()64 dev_replace->time_stopped = 0; in btrfs_init_dev_replace()65 atomic64_set(&dev_replace->num_write_errors, 0); in btrfs_init_dev_replace()66 atomic64_set(&dev_replace->num_uncorrectable_read_errors, 0); in btrfs_init_dev_replace()67 dev_replace->cursor_left = 0; in btrfs_init_dev_replace()68 dev_replace->committed_cursor_left = 0; in btrfs_init_dev_replace()69 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()425 dev == fs_info->dev_replace.tgtdev) { in reada_find_extent()443 up_read(&fs_info->dev_replace.rwsem); in reada_find_extent()449 up_read(&fs_info->dev_replace.rwsem); in reada_find_extent()
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()1143 &fs_info->dev_replace.num_write_errors); in scrub_handle_errored_block()1583 atomic64_inc(&fs_info->dev_replace.num_write_errors); in scrub_repair_page_from_good_copy()1610 atomic64_inc(&fs_info->dev_replace.num_write_errors); in scrub_write_block_to_dev_replace()1735 struct btrfs_dev_replace *dev_replace = in scrub_wr_bio_end_io_worker() local1736 &sbio->sctx->fs_info->dev_replace; in scrub_wr_bio_end_io_worker()1742 atomic64_inc(&dev_replace->num_write_errors); in scrub_wr_bio_end_io_worker()3485 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace; in scrub_enumerate_chunks() local3623 down_write(&fs_info->dev_replace.rwsem); in scrub_enumerate_chunks()[all …]
20 int btrfs_dev_replace_is_ongoing(struct btrfs_dev_replace *dev_replace);
2080 down_read(&fs_info->dev_replace.rwsem); in btrfs_num_devices()2081 if (btrfs_dev_replace_is_ongoing(&fs_info->dev_replace)) { in btrfs_num_devices()2085 up_read(&fs_info->dev_replace.rwsem); in btrfs_num_devices()5424 down_read(&fs_info->dev_replace.rwsem); in btrfs_num_copies()5425 if (btrfs_dev_replace_is_ongoing(&fs_info->dev_replace) && in btrfs_num_copies()5426 fs_info->dev_replace.tgtdev) in btrfs_num_copies()5428 up_read(&fs_info->dev_replace.rwsem); in btrfs_num_copies()5489 fs_info->dev_replace.cont_reading_from_srcdev_mode == in find_live_mirror()5491 srcdev = fs_info->dev_replace.srcdev; in find_live_mirror()5815 struct btrfs_dev_replace *dev_replace, in handle_ops_on_dev_replace() argument[all …]
2120 mutex_init(&fs_info->dev_replace.lock_finishing_cancel_unmount); in btrfs_init_dev_replace_locks()2121 init_rwsem(&fs_info->dev_replace.rwsem); in btrfs_init_dev_replace_locks()2122 init_waitqueue_head(&fs_info->dev_replace.replace_wait); in btrfs_init_dev_replace_locks()2636 ret = percpu_counter_init(&fs_info->dev_replace.bio_counter, 0, in open_ctree()3341 percpu_counter_destroy(&fs_info->dev_replace.bio_counter); in open_ctree()4068 percpu_counter_destroy(&fs_info->dev_replace.bio_counter); in close_ctree()
1183 fs_info->dev_replace.committed_cursor_left = in commit_cowonly_roots()1184 fs_info->dev_replace.cursor_left_last_write_of_item; in commit_cowonly_roots()
871 struct btrfs_dev_replace dev_replace; member