summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorStefan Behrens2012-11-05 17:54:08 +0100
committerJosef Bacik2012-12-12 23:15:38 +0100
commit5ac00addc7ac09110995fe967071d191b5981cc1 (patch)
treea5290cc4e69c434b24c091a212d1723bae56e46c /fs/btrfs/ctree.h
parentBtrfs: introduce a btrfs_dev_replace_item type (diff)
downloadkernel-qcow2-linux-5ac00addc7ac09110995fe967071d191b5981cc1.tar.gz
kernel-qcow2-linux-5ac00addc7ac09110995fe967071d191b5981cc1.tar.xz
kernel-qcow2-linux-5ac00addc7ac09110995fe967071d191b5981cc1.zip
Btrfs: disallow mutually exclusive admin operations from user mode
Btrfs admin operations that are manually started from user mode and that cannot be executed at the same time return -EINPROGRESS. A common way to enter and leave this locked section is introduced since it used to be specific to the balance operation. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 147406d0f9a9..e9dc78014f09 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1527,6 +1527,8 @@ struct btrfs_fs_info {
/* device replace state */
struct btrfs_dev_replace dev_replace;
+
+ atomic_t mutually_exclusive_operation_running;
};
/*