Btrfs: Add support for online device removal
This required a few structural changes to the code that manages bdev pointers: The VFS super block now gets an anon-bdev instead of a pointer to the lowest bdev. This allows us to avoid swapping the super block bdev pointer around at run time. The code to read in the super block no longer goes through the extent buffer interface. Things got ugly keeping the mapping constant. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
@@ -738,9 +738,8 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
|
||||
chunk_root->node->start);
|
||||
btrfs_set_super_chunk_root_level(&root->fs_info->super_copy,
|
||||
btrfs_header_level(chunk_root->node));
|
||||
write_extent_buffer(root->fs_info->sb_buffer,
|
||||
&root->fs_info->super_copy, 0,
|
||||
sizeof(root->fs_info->super_copy));
|
||||
memcpy(&root->fs_info->super_for_commit, &root->fs_info->super_copy,
|
||||
sizeof(root->fs_info->super_copy));
|
||||
|
||||
btrfs_copy_pinned(root, pinned_copy);
|
||||
|
||||
|
Reference in New Issue
Block a user