From: Richard Weinberger <richard@sigma-star.at>
To: Jaap de Jong <jaap.dejong@nedap.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: ubi resize shrink volume
Date: Mon, 18 Sep 2017 15:29:19 +0200 [thread overview]
Message-ID: <1570263.NLm9V0WY08@blindfold> (raw)
In-Reply-To: <43d9497f-ba72-d7e2-757c-79c88411c630@nedap.com>
Am Montag, 18. September 2017, 14:32:56 CEST schrieb Jaap de Jong:
> >> Sorry for the confusion.
> >> Yes, I want to shrink of a not-mounted UBIFS preferably in u-boot.
> >> In the posts I read it should not be that hard to do, so I was wondering
> >> if anyone had taken the effort to implement this...
> >
> > Nope. So far nobody cared enough about this feature.
> > Please note that many other major filesystems alos don't support this.
> > Such das XFS.
>
> Well we do care!
> Any thoughts to share? We could use some help...
> My first impression was that the size of the partition was just a
> maximum number of PEBs to use for it,
> so lowering that value would just set a new limit and whatever PEBs were
> used for that specific partition
> was under control of the wear-levelling algorithms. But apparently it is
> more complicated.
Well, on UBI level it is easy.
On UBIFS you need to do more.
Think about the situation where you have N LEBs where M are in use by UBIFS
and you reduce the volume size to X.
Assuming that all existing files can fit into X LEBs, therefore X >= M.
Now you have to find all UBIFS data structures that have a reference to a LEB
(> X) that is now outside of the new volume size. You have move data around
patch all references.
Thanks,
//richard
--
sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria
ATU66964118 - FN 374287y
prev parent reply other threads:[~2017-09-18 13:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 6:34 ubi resize shrink volume Jaap de Jong
2017-09-15 18:30 ` Richard Weinberger
2017-09-18 6:34 ` Jaap de Jong
2017-09-18 7:06 ` Richard Weinberger
2017-09-18 12:32 ` Jaap de Jong
2017-09-18 13:29 ` Richard Weinberger [this message]
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=1570263.NLm9V0WY08@blindfold \
--to=richard@sigma-star.at \
--cc=jaap.dejong@nedap.com \
--cc=linux-mtd@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.