block: Correct handling of bottom device misaligment
commitfe0b393f2c0a0d23a9bc9ed7dc51a1ee511098bd
authorMartin K. Petersen <martin.petersen@oracle.com>
Mon, 11 Jan 2010 08:21:47 +0000 (11 03:21 -0500)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 11 Jan 2010 13:29:19 +0000 (11 14:29 +0100)
tree557e3d8583bf9cebb127066f0c5487691c3f786b
parentc1152949bbdfddf8fc857a883294461d757d5332
block: Correct handling of bottom device misaligment

The top device misalignment flag would not be set if the added bottom
device was already misaligned as opposed to causing a stacking failure.

Also massage the reporting so that an error is only returned if adding
the bottom device caused the misalignment.  I.e. don't return an error
if the top is already flagged as misaligned.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-settings.c