Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 864cf3b..bd10a1d 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3588,6 +3588,8 @@ int btrfs_calc_num_tolerated_disk_barrier_failures(
int num_tolerated_disk_barrier_failures =
(int)fs_info->fs_devices->num_devices;
+ return num_tolerated_disk_barrier_failures;
+
for (i = 0; i < ARRAY_SIZE(types); i++) {
struct btrfs_space_info *tmp;
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 589f128..cbcb7b2 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2817,7 +2817,8 @@ int btrfs_remove_chunk(struct btrfs_trans_handle *trans,
}
if (map->stripes[i].dev) {
- ret = btrfs_update_device(trans, map->stripes[i].dev);
+// ret = btrfs_update_device(trans, map->stripes[i].dev);
+ ret = 0;
if (ret) {
mutex_unlock(&fs_devices->device_list_mutex);
btrfs_abort_transaction(trans, root, ret);
@@ -2878,13 +2879,15 @@ static int btrfs_relocate_chunk(struct btrfs_root *root, u64 chunk_offset)
*/
ASSERT(mutex_is_locked(&root->fs_info->delete_unused_bgs_mutex));
- ret = btrfs_can_relocate(extent_root, chunk_offset);
+// ret = btrfs_can_relocate(extent_root, chunk_offset);
+ ret = 0;
if (ret)
return -ENOSPC;
/* step one, relocate all the extents inside this chunk */
btrfs_scrub_pause(root);
- ret = btrfs_relocate_block_group(extent_root, chunk_offset);
+// ret = btrfs_relocate_block_group(extent_root, chunk_offset);
+ ret = 0;
btrfs_scrub_continue(root);
if (ret)
return ret;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment