Re: [RFC/PATCH 0/1] ubi: Add ubiblock driver

Shmulik Ladkani
2012-12-02T17:40:07Z

Hi Artem,

On Fri, 30 Nov 2012 13:24:07 +0200 Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Sun, 2012-11-25 at 09:36 +0200, Shmulik Ladkani wrote:
> > I'm not sure this is possible in ubiblock case, due to the 1-LEB
> > writeback cache: if a file (in the mounted fs) is synced, are there any
> > guarantees the 1-LEB cache is flushed synchronously?
> > (you mentioned the actual write is only done when a request arrives to
> > read or write to a different LEB or when the device is released).
>
> Why would not it be? ubiblk is just like a hard drive or and SSD fro a
> file-system. If it caches something, it is just like an internal disk
> cache. The I/O barrier should flush it. And we have an atomic LEB change
> operation, so when you want to change the LEB contents, you can do it in
> power-cut-safe manner.
>
> Do I miss something?

Yes, I guess this makes sense.

To my undesrtanding, the ubiblock fetches requests from the request
queue, and executes them (ubi leb read/write, or using its internal
cache).
What would be the actual indication mechanism that notifies ubiblock to
flush its internal cache? Is it a part of the request structure?

Regards,
Shmulik