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

Ezequiel Garcia elezegarcia at gmail.com
Mon Dec 3 14:33:01 EST 2012


On Sun, Dec 2, 2012 at 9:58 PM, Ezequiel Garcia <elezegarcia at gmail.com> wrote:
[...]
>>
>> 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?
>>
>
> I believe that this is done through req->cmd_flag & REQ_FLUSH.
>
> You can search REQ_FLUSH in drivers/block/loop.c or drivers/scsi/sd.c.
>
> AFAIK, this the only mechanism to notify a block device to flush its cache.
> Am I wrong? Is there another one?
>

After a:

  $ git grep "REQ_FLUSH"

I discovered there is a document at
Documentation/block/writeback_cache_control.txt
wich is an excellent resource on block driver's writeback caches.

So "git grep" is my new favorite tool ;-) credit goes to Thomas Petazzoni [1].

Hope this helps,

    Ezequiel

[1] http://elinux.org/Tim's_Tips_and_Tricks



More information about the linux-mtd mailing list