Re: [PATCH 2/2] jffs2: Add sync to underlying mtd device when file system is synced

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

 



----- Ursprüngliche Mail -----
> Von: "Brandon Maier" <brandon.maier@xxxxxxxxxxx>
> An: "Richard Weinberger" <richard.weinberger@xxxxxxxxx>
> CC: "Clayton Shotwell" <clayton.shotwell@xxxxxxxxxxxxxxxxxxx>, "linux-mtd" <linux-mtd@xxxxxxxxxxxxxxxxxxx>, "Boris
> Brezillon" <bbrezillon@xxxxxxxxxx>, "richard" <richard@xxxxxx>, "Marek Vasut" <marek.vasut@xxxxxxxxx>, "Brian Norris"
> <computersforpeace@xxxxxxxxx>, "David Woodhouse" <dwmw2@xxxxxxxxxxxxx>
> Gesendet: Donnerstag, 16. Mai 2019 17:12:45
> Betreff: Re: [PATCH 2/2] jffs2: Add sync to underlying mtd device when file system is synced

> Clayton is out currently, but I can comment on what he had told me.

Thanks!
 
> On Thu, May 16, 2019 at 6:05 AM Richard Weinberger
>> > Please explain what failure you are facing without mtd_sync().
>> > jffs2 is supposed to recover from a power failure at any time, just like ubifs.
> 
> The system exhibiting problems runs jffs2 on a gluebi device. Our
> software sync()'s the jffs2 at certain points so that it's safe if
> power is cut. The jffs2 always recovers the filesystem after power
> cut, but sometimes data written before the sync() call gets lost.
> 
> These patches attempt to solve this problem by 1) calling _sync() on
> the underlying mtd device after writing to flush any buffers in the
> mtd, and 2) adding a _sync() callback to gluebi so that if something
> syncs the mtd device, we sync any blocks associated with it.

The interesting question is, do you loose data which was already
written and synced using fsync() or fdatasync()?

Both JFFS2 and UBIFS try to avoid writes and are rather strict when it
comes to fsync().

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