On Wed, Jul 10, 2019 at 5:18 PM Ben Schroeder <klowd92@xxxxxxxxx> wrote: > Thanks for the reply Richard. > I just wanted to reiterate that i am using SPI NOR Flash, partitioned > in an A/B scheme as so: Hmmm. Did you create the rootfs using mkfs.ubifs with a different compression than used by the kernel? > I am not sure the garbage collector will improve the available space issue. > Regardless of the UBI being mounted with sync option enabled or disabled, > the issue persists. Even if i allow time for the background thread to run. > The issue seems very problematic when considering the fact that i am > downgrading the filesystem, patching files to be slightly smaller size > than before, > and i am still running out of disk space, regardless of how long i > wait for garbage collection. > On this regard, i will stick with your answer that it can be a serious > challenge if all nodes are packed, > and there is little available free space. How full is the filesystem btw? > Could you please clarify your answer regarding binary patching UBI Volumes: > > Yes, you can alter a dynamic volume as you wish. But keep NAND odds on mind. > > So you need to replace whole LEBs. > > It was my understanding that because UBI keeps tracks of bad blocks > and erase counters, > so that overwriting an existing and running UBI partition using a > binary diff against a newer UBI partition, > might cause loss of that metadata, or even corruption. You need to operate on UBI level, not mtd. You can open /dev/ubiX_Y and ask it to replace whole LEBs. UBI will take care of erase-counters and stuff. -- Thanks, //richard ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/