Subject: UBIFS and small dynamic files

Artem Bityutskiy dedekind1 at gmail.com
Tue Oct 25 03:52:43 EDT 2011


On Fri, 2011-10-21 at 16:31 +0200, Daniel Wagener wrote:
> Ahoi,
> 
> we are having trouble with the side effects of the UBIFS write buffer 
> described in http://www.linux-mtd.infradead.org/doc/ubifs.html#L_writebuffer
> We have certain config files that are quite small and get rewritten very 
> frequently by their applications.
> Matchbox-panels' ~/.matchbox/mbdock.session is a fine example as it gets 
> emptied on a power cut or hard reset resulting in an empty and therefore 
> useless panel on the next start.

Well, all the docs about the synchronization are at the web site. There
is also a description with links of what other FSes do:
http://linux-mtd.infradead.org/doc/ubifs.html#L_sync_exceptions

> 
> The document above mentions the '-o sync' option which disables the 
> write buffer on a partition, but this is not an option for us because we 
> do not want to reduce the write performance. And there is also the issue 
> of a synchronously mounted UBIFS that can make things even worse in case 
> of power cuts.

You can do fsync(), or you can set the "S" flag to the file and make it
always be synchronous (see man chattr).

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20111025/b4dd6fff/attachment.sig>


More information about the linux-mtd mailing list