dm raid: add component device size checks to avoid runtime failure
authorHeinz Mauelshagen <heinzm@redhat.com>
Sat, 2 Dec 2017 00:03:59 +0000 (01:03 +0100)
committerMike Snitzer <snitzer@redhat.com>
Fri, 8 Dec 2017 15:59:57 +0000 (10:59 -0500)
commit188a212df1f3a2d7ea9bb0fc0ab4173042c23470
treed6901e4be9de3cbf7a079c40cf823373482c6ef7
parent61e06e2c3ebd986050958513bfa40dceed756f8f
dm raid: add component device size checks to avoid runtime failure

Check all component data device sizes versus calculated size.
Reject if device(s) are too small.  Otherwise, MD will fail the
operation by accessing beyond the end of the data device.

An example use-case is that growing bitmap won't fit any more and the MD
runtime will report an error when DM raid should catch this earlier.

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-raid.c