]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: allow for pausing restriper
authorIlya Dryomov <idryomov@gmail.com>
Mon, 16 Jan 2012 20:04:49 +0000 (22:04 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 16 Jan 2012 20:04:49 +0000 (22:04 +0200)
commit7ff03a91a8f35a54ecd8bc20f856681316c811b7
tree4ef87d05240e90480749c345274a83094caf66f0
parent84f95c7878a4dfc444865c4c4af79381e2807d66
Btrfs: allow for pausing restriper

Implement an ioctl for pausing restriper.  This pauses the relocation,
but balance is still considered to be "in progress": balance item is
not deleted, other volume operations cannot be started, etc.  If paused
in the middle of profile changing operation we will continue making
allocations with the target profile.

Add a hook to close_ctree() to pause restriper and free its data
structures on unmount.  (It's safe to unmount when restriper is in
"paused" state, we will resume with the same parameters on the next
mount)

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