[PATCH] UBI: block: Continue creating ubiblocks after an initialization error

Richard Weinberger richard.weinberger at gmail.com
Wed Dec 17 16:44:19 PST 2014


On Thu, Dec 18, 2014 at 12:16 AM, Daniel Ehrenberg
<dehrenberg at chromium.org> wrote:
> If one ubi volume is corrupted but another is not, it should be
> possible to initialize that ubiblock from a kernel commandline which
> includes both of them. This patch changes the error handling behavior
> in initializing ubiblock to ensure that all parameters are attempted
> even if one fails. If there is a failure, it returns one of the
> error status codes. It also makes error messages more descriptive
> by including the name of the UBI volume that failed.
>
> Tested: Formatted ubi volume /dev/ubi5_0 in a corrupt way and
> dev/ubi3_0 properly and included "ubi.block=5,0 ubi.block=3,0" on
> the kernel command line. At boot, I see the following in the console:
> [   21.082420] UBI error: ubiblock_create_from_param: block: can't
> open volume on ubi5_0, err=-19
> [   21.084268] UBI: ubiblock3_0 created from ubi3:0(rootfs)
>
> Signed-off-by: Dan Ehrenberg <dehrenberg at chromium.org>

Makes sense to me.
Reviewed-by: Richard Weinberger <richard at nod.at>

-- 
Thanks,
//richard



More information about the linux-mtd mailing list