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>
This commit is contained in:
Stefan Behrens
2012-11-05 17:54:08 +01:00
committed by Josef Bacik
parent a2bff64025
commit 5ac00addc7
3 changed files with 40 additions and 17 deletions

View File

@@ -1527,6 +1527,8 @@ struct btrfs_fs_info {
/* device replace state */
struct btrfs_dev_replace dev_replace;
atomic_t mutually_exclusive_operation_running;
};
/*