Re: [PATCH] [RFC] UBI: Implement Fastmap support

From: Richard Weinberger
Date: Tue May 22 2012 - 16:11:42 EST


On Tue, 22 May 2012 21:18:09 +0300, Shmulik Ladkani
<shmulik.ladkani@xxxxxxxxx> wrote:
> Hi Richard,
>
> On Tue, 22 May 2012 18:55:10 +0200 Richard Weinberger <richard@xxxxxx> wrote:
>> >> diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
>> >> index 2c5ed5c..ef5d7b7 100644
>> >> --- a/drivers/mtd/ubi/build.c
>> >> +++ b/drivers/mtd/ubi/build.c
>> >> @@ -144,6 +144,16 @@ int ubi_volume_notify(struct ubi_device *ubi, struct ubi_volume *vol, int ntype)
>> >>
>> >> ubi_do_get_device_info(ubi,&nt.di);
>> >> ubi_do_get_volume_info(ubi, vol,&nt.vi);
>> >> +
>> >> + switch (ntype) {
>> >> + case UBI_VOLUME_ADDED:
>> >> + case UBI_VOLUME_REMOVED:
>> >> + case UBI_VOLUME_RESIZED:
>> >> + case UBI_VOLUME_RENAMED:
>> >> + if (ubi_update_fastmap(ubi))
>> >> + ubi_err("Unable to update fastmap!");
>> >
>> > In the error case, what are the consequences leaving the older on-flash
>> > fastmap? Shouldn't it be invalidated?
>>

After thinking a bit more about this case I think the best we can to is
switching to read-only mode if ubi_update_fastmap()
fails.

Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/