summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.h
diff options
context:
space:
mode:
authorIlya Dryomov2012-01-16 21:04:49 +0100
committerIlya Dryomov2012-01-16 21:04:49 +0100
commita7e99c691af553fc15ac46a51f130b7c59a65f76 (patch)
tree55491f285683951d509819a66e614ac6f12659dd /fs/btrfs/ioctl.h
parentBtrfs: allow for pausing restriper (diff)
downloadkernel-qcow2-linux-a7e99c691af553fc15ac46a51f130b7c59a65f76.tar.gz
kernel-qcow2-linux-a7e99c691af553fc15ac46a51f130b7c59a65f76.tar.xz
kernel-qcow2-linux-a7e99c691af553fc15ac46a51f130b7c59a65f76.zip
Btrfs: allow for canceling restriper
Implement an ioctl for canceling restriper. Currently we wait until relocation of the current block group is finished, in future this can be done by triggering a commit. Balance item is deleted and no memory about the interrupted balance is kept. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/btrfs/ioctl.h')
-rw-r--r--fs/btrfs/ioctl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h
index e972e11a8d77..cd19d10794b9 100644
--- a/fs/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -111,6 +111,7 @@ struct btrfs_ioctl_fs_info_args {
/* balance control ioctl modes */
#define BTRFS_BALANCE_CTL_PAUSE 1
+#define BTRFS_BALANCE_CTL_CANCEL 2
/*
* this is packed, because it should be exactly the same as its disk
@@ -142,6 +143,7 @@ struct btrfs_balance_progress {
#define BTRFS_BALANCE_STATE_RUNNING (1ULL << 0)
#define BTRFS_BALANCE_STATE_PAUSE_REQ (1ULL << 1)
+#define BTRFS_BALANCE_STATE_CANCEL_REQ (1ULL << 2)
struct btrfs_ioctl_balance_args {
__u64 flags; /* in/out */