]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix max chunk size on raid5/6
authorChris Mason <chris.mason@fusionio.com>
Wed, 20 Feb 2013 21:23:40 +0000 (16:23 -0500)
committerChris Mason <chris.mason@fusionio.com>
Wed, 20 Feb 2013 22:08:18 +0000 (17:08 -0500)
commitc93a259638850a1c626308900a9633d818b7a636
tree16a9b9f346a3c2e0bed40e74498367e29a2c4457
parent697f5afae597a0bc2dfa5f6d4a62674e14ec2d61
Btrfs: fix max chunk size on raid5/6

We try to limit the size of a chunk to 10GB, which keeps the unit of
work reasonable during balance and resize operations.  The limit checks
were taking into account the number of copies of the data we had but
what they really should be doing is comparing against the logical
size of the chunk we're creating.

This moves the code around a little to use the count of data stripes
from raid5/6.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/volumes.c