[RFC/PATCH] mtd: m25p80: set writebufsize

Shmulik Ladkani shmulik.ladkani at gmail.com
Wed Feb 1 04:11:53 EST 2012


On Tue, 31 Jan 2012 09:46:40 -0800 Brian Norris <computersforpeace at gmail.com> wrote:
> I'm wondering now: how do we guarantee that we're picking the
> *correct* writebufsize and not just one that *works*? It's only used
> by UBI, I think, so it depends on UBI's needs.
> 

According to mtd.h, 'writebufsize' should be set to the "Size of the
write buffer used by the MTD".

m25p->page_size should be set to the size of the device's data buffer
(used by the Page Program operation).

Hence for m25p80, 'flash->mtd.writebufsize = flash->page_size' seems
right.

BTW 'writebufsize' is propagated to UBI's 'max_write_size' which
currently affects UBIFS write-buffer size.

It should be set to "the maximum amount of bytes the underlying flash is
able to program at a time" (according to ubifs/io.c).

Hence again, for m25p80, 'flash->page_size' seems adequate.

Regards
Shmulik



More information about the linux-mtd mailing list