]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: recover balance on mount
authorIlya Dryomov <idryomov@gmail.com>
Mon, 16 Jan 2012 20:04:48 +0000 (22:04 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 16 Jan 2012 20:04:48 +0000 (22:04 +0200)
commitb33c2b8e24a9fdb6996af2ff3228cd7bb64704ad
treeff697d01a6dd8cf50b37b3855e40764335be044d
parent91d07c2aba2b589df112279bf284364546c82083
Btrfs: recover balance on mount

On mount, if balance item is found, resume balance in a separate
kernel thread.

Try to be smart to continue roughly where previous balance (or convert)
was interrupted.  For chunk types that were being converted to some
profile we turn on soft convert, in case of a simple balance we turn on
usage filter and relocate only less-than-90%-full chunks of that type.
These are just heuristics but they help quite a bit, and can be improved
in future.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/btrfs/disk-io.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h