Commit 6addbe91 authored by Mårten Lindahl's avatar Mårten Lindahl Committed by Richard Weinberger

ubi: block: Reduce warning print to info for static volumes

If volume size is not multiple of the sector size 512 a warning is
printed saying that the last non-sector aligned bytes will be ignored.

This should be valid for resizable volumes, but when creating static
volumes which are read only this will always be printed even if the
unaligned data is deliberate.

The message is still valid but the severity should be lowered for static
volumes.
Signed-off-by: default avatarMårten Lindahl <marten.lindahl@axis.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 203a55f0
......@@ -354,9 +354,12 @@ static int calc_disk_capacity(struct ubi_volume_info *vi, u64 *disk_capacity)
u64 size = vi->used_bytes >> 9;
if (vi->used_bytes % 512) {
pr_warn("UBI: block: volume size is not a multiple of 512, "
"last %llu bytes are ignored!\n",
vi->used_bytes - (size << 9));
if (vi->vol_type == UBI_DYNAMIC_VOLUME)
pr_warn("UBI: block: volume size is not a multiple of 512, last %llu bytes are ignored!\n",
vi->used_bytes - (size << 9));
else
pr_info("UBI: block: volume size is not a multiple of 512, last %llu bytes are ignored!\n",
vi->used_bytes - (size << 9));
}
if ((sector_t)size != size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment