btrfs: check unsupported filters in balance arguments
authorDavid Sterba <dsterba@suse.com>
Mon, 12 Oct 2015 14:55:54 +0000 (16:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Oct 2015 00:51:54 +0000 (09:51 +0900)
commit2382a147ed804d66fbfd1c1c97b88bc5f15c49db
treece2968218bf66eb2f3c7ec92084dda0ffaacad6a
parent2105f9aec785cbc4679132abb44645bb3c59a93e
btrfs: check unsupported filters in balance arguments

commit 8eb934591f8bf584969454a658f629cd06e59f3a upstream.

We don't verify that all the balance filter arguments supplemented by
the flags are actually known to the kernel. Thus we let it silently pass
and do nothing.

At the moment this means only the 'limit' filter, but we're going to add
a few more soon so it's better to have that fixed. Also in older stable
kernels so that it works with newer userspace tools.

Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/ioctl.c
fs/btrfs/volumes.h