ubifs: sync() causes writes even if nothing is changed

Sebastian Andrzej Siewior bigeasy at linutronix.de
Thu Oct 21 04:23:01 EDT 2010


Artem Bityutskiy wrote:
>> From a quick glance at the ubifs code, this might come out of the
>> garbage collector that is triggered on every sync() and writes
>> something even if nothing has changed.
>>
>> Is that really needed?
> 
> I briefly looked, and UBIFS is doing a lot of I/O in that case, which is
> unnecessary and should not be done, I'll need to investigate this.

 From what I've seen from the code there are two parts:
- writing "unwritten" data (the write back part I guess). Nothing is done
   here as long as no data is queued
- writing the journal. The first step seems to be to write a node "begin
   write" and the last one is "end write".

Since hjk sees only two erases I would guess that they are initiated by 
the "journal begin" & "end" requests.

Thanks for looking at this.

Sebastian



More information about the linux-mtd mailing list