Re: [PATCH V1] mtd: core: Micron SLC NAND filling block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Mittwoch, 19. Dezember 2018, 12:03:06 CET schrieb Bean Huo (beanhuo):
> +#define PARTIAL_FILLING_CHECKUP 1 /* Used to turn on/off partial filling
> +		 block checkup before erasing this block.*/
> +#define LAST_CHECKPU_PAGE 13
> +struct ubifs_filling_head {
> +	__le32 magic;
> +	__le32 crc;
> +	__le64 sqnum;
> +	__le32 len;
> +	__u8 node_type;
> +	__u8 group_type;
> +	__u8 padding[2];
> +	__le32 pad_len;
> +} __packed;

I don't think this is needed anymore.

If you overwrite (sub)pages 0 and 1, UBI EC and VID headers are gone.
In case of a power-cut before the erase operation, UBI will detect the
corrupted EC and VID headers and re-erase the block.
For a fastmap attach the story is different, it does not track unmap/erase
operations. Therefore it will not notice that the block was scheduled for
erase and got corrupted by overwriting the first pages.
Users on top of UBIFS will face either ECC errors or UBIFS complains
about corrupted empty space.
This fastmap issue got fixed with:
781932375ffc ("ubi: fastmap: Correctly handle interrupted erasures in EBA")

So your ubifs_filling_head struct seems to work around an already fixed UBI
bug. :-)

Thanks,
//richard



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux