summary refs log tree commit diff
path: root/fs/btrfs/volumes.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2015-10-10 17:16:50 +0200
committerChris Mason <clm@fb.com>2015-10-26 19:38:28 -0700
commit12907fc79818a62a2478f84f7795afa774bf7f9c (patch)
treec7df6fd783c99feef090a00c38e7268515488430 /fs/btrfs/volumes.h
parent2849a854224487bc578b73b64422c3cb3ef93ff5 (diff)
downloadlinux-12907fc79818a62a2478f84f7795afa774bf7f9c.tar.gz
btrfs: extend balance filter limit to take minimum and maximum
The 'limit' filter is underdesigned, it should have been a range for
[min,max], with some relaxed semantics when one of the bounds is
missing. Besides that, using a full u64 for a single value is a waste of
bytes.

Let's fix both by extending the use of the u64 bytes for the [min,max]
range. This can be done in a backward compatible way, the range will be
interpreted only if the appropriate flag is set
(BTRFS_BALANCE_ARGS_LIMIT_RANGE).

Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r--fs/btrfs/volumes.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index b8e64ea984f1..628d4e17019d 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -380,6 +380,7 @@ struct map_lookup {
 #define BTRFS_BALANCE_ARGS_DRANGE	(1ULL << 3)
 #define BTRFS_BALANCE_ARGS_VRANGE	(1ULL << 4)
 #define BTRFS_BALANCE_ARGS_LIMIT	(1ULL << 5)
+#define BTRFS_BALANCE_ARGS_LIMIT_RANGE	(1ULL << 6)
 
 #define BTRFS_BALANCE_ARGS_MASK			\
 	(BTRFS_BALANCE_ARGS_PROFILES |		\