From: Ben Schroeder <klowd92@gmail.com>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Available space loss due to fragmentation?
Date: Thu, 11 Jul 2019 18:53:53 +0300 [thread overview]
Message-ID: <CAMk-x8PdwHryEmot4drePgx9cRfL6mO2FoURm5HSWdJjN97yhQ@mail.gmail.com> (raw)
In-Reply-To: <CAFLxGvwSKVxi=nqnrniDpZaK_5C900traLW46OZEC5ZUw+dEGQ@mail.gmail.com>
On Thu, Jul 11, 2019 at 1:16 PM Richard Weinberger
<richard.weinberger@gmail.com> wrote:
>
> On Wed, Jul 10, 2019 at 5:18 PM Ben Schroeder <klowd92@gmail.com> 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?
mkfs.ubifs -r /tmp/rootfs -m 1 -e 0xFF80 -c 1024 -o data.ubifs
(I believe standard compression is used, lzo?)
>
> > 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?
250kb free out of 22mb ~ Approxy 1% free
>
> > 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.
I see, thanks!
>
> --
> Thanks,
> //richard
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2019-07-11 15:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 3:32 Available space loss due to fragmentation? Ben Schroeder
2019-07-10 9:34 ` Richard Weinberger
2019-07-10 15:18 ` Ben Schroeder
2019-07-11 10:16 ` Richard Weinberger
2019-07-11 15:53 ` Ben Schroeder [this message]
2019-07-11 20:41 ` Richard Weinberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMk-x8PdwHryEmot4drePgx9cRfL6mO2FoURm5HSWdJjN97yhQ@mail.gmail.com \
--to=klowd92@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard.weinberger@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).