UBI Create or Update Volume
BRIJESH SINGH
brij.singh at samsung.com
Wed Jun 17 05:33:04 EDT 2009
Hi Artem,
Just came across the ubi_change_vtbl_record function. If first copy is written successfully and error occurs while writing second copy, this function still returns error. And hence the creation or change in Volume becomes unsuccessful. So applications consider it failure.
But if I unmount now, (clean or unclean) the first copy will become valid and second will be called corrupted (during mount time). It's not correct.
So should ubi_change_vtbl_record call flush wl and return success? Because 2nd copy(old) is unmapped till now.And should UBI go to read-only mode?
Code Snip:
Funct ubi_change_vtbl_record(){
...
for (i = 0; i < UBI_LAYOUT_VOLUME_EBS; i++) {
err = ubi_eba_unmap_leb(ubi, layout_vol, i);
if (err)
return err;
err = ubi_eba_write_leb(ubi, layout_vol, i, ubi->vtbl, 0,
ubi->vtbl_size, UBI_LONGTERM);
if (err)
return err;
}
...
}
Thanks
Brijesh
More information about the linux-mtd
mailing list