]> 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)
commit07cdde427737e532d387b5914643fcb2d920642f
treed65c346e8763380a1afac2984abc12533ecf15b7
parentea7a08d06374e4b6f982bd786a4b6a576ea9feec
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