[PATCH] UBIFS: add tolerance to use variable writesize

Artem Bityutskiy dedekind1 at gmail.com
Mon Jul 1 05:33:18 EDT 2013


On Mon, 2013-07-01 at 10:32 +0200, Dahlhoff Achim (CM-AI/PJ-CF32) wrote:
> Hello.
> 
> No, I do not want to touch the max_write_size or writebufsize. The
> max_write_size is the size which can be transferred in one piece to
> the chip and does not modify the UBIfs data structures. 

Not sure I understand what you mean. Max_write_size, which is the same
as writebufsize, despite the name, is the _optimal_ I/O size. Sometimes
UBI/UBIFS _will_ write in smaller chunks. But it will try to write in
'max_write_size'.

Sounds like what you need - you flash does allow 1-byte writes, but will
be more efficient when writes are 32-bytes instead.

> The min size is relevant and can cause images to become incompatible
> with a specific NOR chip. If the NOR driver should accidentally choose
> a writesize which is too small, this will not cause any compatibility
> issues or data loss. It will only reduce write performance.

Right, increasing min_io_size breaks compatibility. Although I believe
this is fixable, and I already suggested people to fix this several
times in the past.

But increasing max_write_size should not lead to incompatibilites.
> 
> Without the tolerance patch, you cannot mount one UBSfs image on
> different NOR devices with different writesize values of 1 or 32.

I still think that you should just change writebufsize in your driver.
May be you could find some other view-angle to show my why you think I
am wrong?

-- 
Best Regards,
Artem Bityutskiy




More information about the linux-mtd mailing list