[PATCH] [RFC] UBI: Implement Fastmap support

Richard Weinberger richard at nod.at
Tue May 22 16:11:43 EDT 2012


On Tue, 22 May 2012 21:18:09 +0300, Shmulik Ladkani
<shmulik.ladkani at gmail.com> wrote:
> Hi Richard,
> 
> On Tue, 22 May 2012 18:55:10 +0200 Richard Weinberger <richard at nod.at> 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



More information about the linux-mtd mailing list