]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dm-stripe is supposed to ensure that all the space allocated to the
authorMikulas Patocka <mpatocka@redhat.com>
Tue, 24 Jul 2012 23:25:13 +0000 (09:25 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 24 Jul 2012 23:25:13 +0000 (09:25 +1000)
commit4c69e1e2797f5b559ec2caf925a2adc614730ce2
tree3dfcd1eab28b22c35693e90ea3d97257e65b285b
parentf83cfa1d13960948f7a736ef2dca9d96e6b16abc
dm-stripe is supposed to ensure that all the space allocated to the
stripes is fully used and that all stripes are the same size.  This
patch fixes the test.  It checks that device length is divisible by the
chunk size and checks that the resulting quotient is divisible by the
number of stripes (which is equivalent to testing if device length is
divisible by chunk_size * stripes).

Previously, the code only tested that the number of sectors in the target
was divisible by each of the chunk size and the number of stripes
separately, which could leave entire stripes unused.

(A setup that genuinely needs some stripes to be shorter than others
can be created by concatenating striped targets.)

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Documentation/device-mapper/striped.txt
drivers/md/dm-stripe.c