]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: improve the logic in btrfs_can_relocate()
authorIlya Dryomov <idryomov@gmail.com>
Tue, 27 Mar 2012 14:09:17 +0000 (17:09 +0300)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 27 Mar 2012 14:09:17 +0000 (17:09 +0300)
commit7ad5aa2ba454bfa4baa756cb6a14813b64b5cf91
treed65c346e8763380a1afac2984abc12533ecf15b7
parent3a629619ddbedaf14b4fda580a17c88230d8bec3
Btrfs: improve the logic in btrfs_can_relocate()

Currently if we don't have enough space allocated we go ahead and loop
though devices in the hopes of finding enough space for a chunk of the
*same* type as the one we are trying to relocate.  The problem with that
is that if we are trying to restripe the chunk its target type can be
more relaxed than the current one (eg require less devices or less
space).  So, when restriping, run checks against the target profile
instead of the current one.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/btrfs/extent-tree.c