Btrfs: allow for selecting only completely empty chunks
authorIlya Dryomov <[email protected]>
Tue, 12 Feb 2013 16:28:59 +0000 (16:28 +0000)
committerJosef Bacik <[email protected]>
Wed, 20 Feb 2013 17:59:54 +0000 (12:59 -0500)
commit3e39cea61c4ecb5774c08f3e30507fdd58c1cca9
tree6f3f4600f5bb0fa8aebf6847bebcd96b0aa7631c
parentbf023ecfcaf114c410759f375073e78b0871c120
Btrfs: allow for selecting only completely empty chunks

Enhance balance usage filter by making it possible to balance out only
completely empty chunks.  Today, usage filter properly acts on values
from 1 to 99 inclusive, usage=100 selects all chunks, and usage=0
selects no chunks.  This commit changes the usage=0 case: the new
meaning is to restripe only completely empty chunks and nothing else.

Suggested-by: David Sterba <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
Signed-off-by: Josef Bacik <[email protected]>
fs/btrfs/volumes.c