UBI/UBIFS: dealing with MLC's paired pages

Artem Bityutskiy dedekind1 at gmail.com
Fri Oct 30 05:47:52 PDT 2015


On Fri, 2015-10-30 at 12:49 +0100, Michal Suchanek wrote:
> Actually, since there is no guarantee that the data ever gets written
> (or error reported in case it cannot) unless you fsync() every file
> before close() any sane uncompressor, backup program, etc. will
> fsync() every file written regardless of its size. So if your home
> has
> a lot of configuration files and sources this will not be nice
> continuous stream of data in many cases.
> 
> IIRC scp(1) does not fsync() potentially resulting in large amounts
> of
> data getting silently lost. For that reason and others it should be
> renamed to iscp.

This is true. If you get more or less steady stream of incoming writes
without syncs in-between, you do not need to sync the write-buffer, you
do not need to skip pages to cover the MLC paired pages. In these
situations we do not have to end up with double writing.

If there are no writes for some time, it is good idea to sync. VFS will
write-back by timeout, UBIFS will flush write-buffer by timeout.



More information about the linux-mtd mailing list