On Wed, May 8, 2019 at 6:28 PM Fernando AE <fernando.ae2017@xxxxxxxxx> wrote: > > Hello, > > I'm working with a UBI and UBIFS in a NAND flash with 2kB pages and > 128 kB blocks. > > My app is periodically appending 16 bytes to a file. I'm wondering if > UBIFS and/or underlying drivers will also append data to the same > flash page or if a new page must be allocated every time. > > I'm aware that the kernel will buffer data in RAM before syncing to > the flash. In any case, assume that a fsync happens after each append. If you sync after every write, you make it hard for UBIFS, and yes it will waste always at least one "min io" unit which is a page on NAND. You also force UBIFS to write inodes and waste even more space by syncing that often. In theory UBIFS could try to write only sub-pages but that's usually slower than writing a whole page. But that depends a lot on your NAND and the NAND controller you are using. That's why UBI is using sub-pages only internally for EC and VID headers. -- Thanks, //richard ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/