aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2012-11-06 07:15:27 -0500
committerJosef Bacik <jbacik@fusionio.com>2012-12-12 17:15:42 -0500
commit8dabb7420f014ab0f9f04afae8ae046c0f48b270 (patch)
tree6342f353ac71003d749a776dd6dc6a18b1bd959b /fs/btrfs/transaction.c
parente93c89c1aaaaaec3487c4c18dd02360371790722 (diff)
Btrfs: change core code of btrfs to support the device replace operations
This commit contains all the essential changes to the core code of Btrfs for support of the device replace procedure. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 7b297354e73..bcc6b65be3b 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -30,6 +30,7 @@
30#include "tree-log.h" 30#include "tree-log.h"
31#include "inode-map.h" 31#include "inode-map.h"
32#include "volumes.h" 32#include "volumes.h"
33#include "dev-replace.h"
33 34
34#define BTRFS_ROOT_TRANS_TAG 0 35#define BTRFS_ROOT_TRANS_TAG 0
35 36
@@ -845,7 +846,9 @@ static noinline int commit_cowonly_roots(struct btrfs_trans_handle *trans,
845 return ret; 846 return ret;
846 847
847 ret = btrfs_run_dev_stats(trans, root->fs_info); 848 ret = btrfs_run_dev_stats(trans, root->fs_info);
848 BUG_ON(ret); 849 WARN_ON(ret);
850 ret = btrfs_run_dev_replace(trans, root->fs_info);
851 WARN_ON(ret);
849 852
850 ret = btrfs_run_qgroups(trans, root->fs_info); 853 ret = btrfs_run_qgroups(trans, root->fs_info);
851 BUG_ON(ret); 854 BUG_ON(ret);
@@ -868,6 +871,8 @@ static noinline int commit_cowonly_roots(struct btrfs_trans_handle *trans,
868 switch_commit_root(fs_info->extent_root); 871 switch_commit_root(fs_info->extent_root);
869 up_write(&fs_info->extent_commit_sem); 872 up_write(&fs_info->extent_commit_sem);
870 873
874 btrfs_after_dev_replace_commit(fs_info);
875
871 return 0; 876 return 0;
872} 877}
873 878