[PATCH v6 1/3] ubi: Introduce block devices for UBI volumes

Artem Bityutskiy dedekind1 at gmail.com
Mon Feb 17 10:10:14 EST 2014


On Sun, 2014-02-16 at 17:03 -0300, Ezequiel Garcia wrote:
> +static void __init ubiblock_add_from_param(void)
> +{
> +       int i, ret;
> +       struct ubiblock_param *p;
> +       struct ubi_volume_desc *desc;
> +       struct ubi_volume_info vi;
> +
> +       for (i = 0; i < ubiblock_devs; i++) {
> +               p = &ubiblock_param[i];
> +
> +               desc = open_volume_desc(p->name, p->ubi_num, p->vol_id);
> +               if (IS_ERR(desc)) {
> +                       ubi_warn("block: can't open volume, err=%ld\n",
> +                                PTR_ERR(desc));
> +                       continue;
> +               }

Should we be consistent here with how UBI behaves when attaches MTD
devices? UBI will error out if it cannot attach any. And for me it makes
sense. Indeed, if, the user, say asked to attach 2 UBI volumes via the
module parameter, surely the user expects to see 2 block device when
module loading finishes without errors?

What I read from this code means that even if loading finishes without
errors, I may see zero or 1 block devices, depending on how many of them
failed.

-- 
Best Regards,
Artem Bityutskiy




More information about the linux-mtd mailing list