ubi: block: Warn if volume size is not multiple of 512
authorRichard Weinberger <richard@nod.at>
Sun, 1 Sep 2019 20:32:05 +0000 (22:32 +0200)
committerRichard Weinberger <richard@nod.at>
Sun, 15 Sep 2019 20:12:49 +0000 (22:12 +0200)
commite46131b9fd31155a552dea598e7d915b64c5c04c
tree5b9b964a17799f43fc8d9c257432a2fdd6d433ed
parent9163e0184bd7d5f779934d34581843f699ad2ffd
ubi: block: Warn if volume size is not multiple of 512

If volume size is not a multiple of 512, ubi block cuts
off the last bytes of an volume since the block layer works
on 512 byte sectors.
This can happen especially on NOR flash with minimal io
size of 1.

To avoid unpleasant surprises, print a warning.

Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/block.c