Synchronization in UBIFS (zero length files)

Richard Weinberger richard at nod.at
Thu Dec 18 03:12:56 PST 2014


Tanya,

Am 18.12.2014 um 09:34 schrieb Tanya Brokhman:
> Hi Artem/Richard
> 
> I've been looking into the "zero length files" issue in UBIFS and came across "Synchronization exceptions for buggy applications" @
> http://www.linux-mtd.infradead.org/doc/ubifs.html#L_sync_semantics. This section concludes with:
> 
> "We have plans to implement these features in UBIFS, but this has not been done yet. The problem is that UBI/MTD are fully synchronous and we cannot initiate asynchronous
> write-out, so we'd have to synchronously write files on close/rename, which is slow. So implementing these features would require implementing asynchronous I/O in UBI, which is a
> big job. But feel free to do this :-)."
> 
> So two questions:
> 1. was anything done in ubifs to handle file truncation and rename similar to ext4? Didn't find anything but afraid I might be missing something

I don't think so.

> 2. Not sure I understand why "implementing these features would require implementing asynchronous I/O in UBI". Could you please elaborate on this?

If we'd do it synchronous it would horrible slow down UBIFS. That's why ext4 is doing it async.
Having async IO for UBI is not trivial. Especially because of powercut safety.

Thanks,
//richard



More information about the linux-mtd mailing list