Synchronization in UBIFS (zero length files)

Artem Bityutskiy dedekind1 at gmail.com
Sat Jan 31 04:52:55 PST 2015


Tanya,

On Thu, 2014-12-18 at 10:34 +0200, Tanya Brokhman wrote:
> 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

Nope.

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

Well, the idea was to implement something like BIO for UBIFS. You submit
your read or write requests, and go on doing your things. When your
requests are done, you have your call-back function invoked. You may
also go ahead and way for the completion of your request.

But we have the work queue API in Linux. Just create UBIFS work queue
(this will essentially create a separate thread for you, AFAIK), submit
write works there, let them write the closed-but-not-fsynced files
there.

On unmount, flush, cancel all jobs and destroy the queue.

Just off-the top of my head.




More information about the linux-mtd mailing list