diff options
author | Anand Jain <Anand.Jain@oracle.com> | 2014-01-13 21:14:55 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-01-31 08:22:26 -0800 |
commit | f920dbce8d8161fff30e3e75ebfc71e978d9bea4 (patch) | |
tree | 2ca6561e3cd88062c327281d83c758f588055e60 /cmds-check.c | |
parent | b2e99e1819d967828edf149db5a203e59a40e379 (diff) |
btrfs-progs: btrfsck operations should be exclusive
this patch will make btrfsck operations to open disk in exclusive mode,
so that mount will fail when btrfsck is running
Signed-off-by: Anand Jain <Anand.Jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'cmds-check.c')
-rw-r--r-- | cmds-check.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmds-check.c b/cmds-check.c index b518a6b5..2911af08 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -6390,7 +6390,8 @@ int cmd_check(int argc, char **argv) int option_index = 0; int init_csum_tree = 0; int init_extent_tree = 0; - enum btrfs_open_ctree_flags ctree_flags = OPEN_CTREE_PARTIAL; + enum btrfs_open_ctree_flags ctree_flags = + OPEN_CTREE_PARTIAL | OPEN_CTREE_EXCLUSIVE; while(1) { int c; |