UBIFS: Advice request on how to reduce orph_buf size

Josselin Costanzi josselin.costanzi at mobile-devices.fr
Fri Nov 16 06:14:22 EST 2012

In order to reduce UBIFS memory consumption when used in RW I'm trying to
reduce orph_buf size from one LEB to max_write_size. I changed avail_orphs and
tot_avail_orphs functions to report correct orphan counts but I'm now stuck
with the consolidate function. I don't see how I could atomically write all my
orphans in a new LEB with a max_write_size sized orph_buf. One potential
solution would be to try allocating a LEB sized buffer only when consolidating
the orphans but this means commit_orphans may now fail due to memory exhaustion.

Have any of you an idea on how to correctly do this? What would be an acceptable

Josselin Costanzi
Embedded Linux System Engineer

More information about the linux-mtd mailing list