From: Willy Tarreau <w@1wt.eu>
To: Piergiorgio Beruto <piergiorgio.beruto@gmail.com>
Cc: 'Thomas Petazzoni' <thomas.petazzoni@free-electrons.com>,
'Mike Frysinger' <vapier@gentoo.org>,
'Artem Bityutskiy' <dedekind1@gmail.com>,
'Richard Weinberger' <richard@nod.at>,
linux-mtd@lists.infradead.org, 'Tim Bird' <tim.bird@am.sony.com>,
'Ezequiel Garcia' <ezequiel.garcia@free-electrons.com>,
'Michael Opdenacker' <michael.opdenacker@free-electrons.com>,
'Brian Norris' <computersforpeace@gmail.com>,
'David Woodhouse' <dwmw2@infradead.org>
Subject: Re: [PATCH 1/1] ubi: Introduce block devices for UBI volumes
Date: Sun, 9 Feb 2014 00:13:08 +0100 [thread overview]
Message-ID: <20140208231308.GF22376@1wt.eu> (raw)
In-Reply-To: <000001cf2522$3a39b550$aead1ff0$@gmail.com>
Hi Piergiorgio,
On Sun, Feb 09, 2014 at 12:05:12AM +0100, Piergiorgio Beruto wrote:
> Hello,
> I am one of the early testers of ubi block.
>
> In my design, which is pretty common for embedded systems, I use ubiblk in
> read-only mode (and no caching since squashfs already provides it).
> For updating the squash I use ubiupdatevol, as shown in this code snippet
> (double bank handling).
>
> swrel_update() {
> swrel_loadst || return
> if [ -z "$FILE" ] ; then
> echo "error: you must specify a valid image file with -f option"
> return 1
> fi
>
> if [ -z "$BANK" ] ; then
> # search for an active bank to update
> # valid state is when at least one bank is standby
> [ "$SWREL2_STATE" != "active" ] && [ "$SWREL2_STATE" != "committed" ]
> && BANK=2
> [ "$SWREL1_STATE" != "active" ] && [ "$SWREL1_STATE" != "committed" ]
> && BANK=1
>
> if [ -z "$BANK" ] ; then
> decho "swrel_update: cannot find a standby bank to update"
> exit 2
> fi
> fi
>
> decho "swrel_update: updating bank #$BANK with file \"$FILE\""
>
> dev="/dev/ubi-app${BANK}w"
> ubiupdatevol $dev "$FILE" || return
>
> # if there are no committed banks, commit the updating one automatically
> if [ "$SWREL1_STATE" != "committed" ] && [ "$SWREL2_STATE" != "committed"
> ] ; then
> decho "swrel_update: committing bank #$BANK as no committed banks were
> found"
> swrel_commit
> fi
> }
>
> If I had to go for a RW filesystem I would use ubifs instead of ubiblk in RW
> mode.
I've been using ubifs for rootfs, but for a config FS, I'd rather use something
simple like ext2. Ubifs has unfortunately failed too many times on me and there
is no fsck to recover it after a failure. While I don't mind this for a rootfs
which is supposed to be easy to rebuild on an embedded device, it can be
problematic for some other parts like config and/or extra data that need to
be read once per boot and written very rarely. Anyway, squashfs guarantees me
that the FS I'm using matches what I think it should be.
> But of course this is my very personal need.
Yes and that's very interesting to all share our respective needs!
Regards,
Willy
next prev parent reply other threads:[~2014-02-08 23:13 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 20:38 [PATCH 0/1] ubi: Introduce block devices for UBI volumes Ezequiel Garcia
2014-01-29 20:38 ` [PATCH 1/1] " Ezequiel Garcia
2014-01-31 17:06 ` Willy Tarreau
2014-02-04 11:06 ` Ezequiel Garcia
2014-02-08 16:50 ` Ezequiel Garcia
2014-02-08 21:37 ` Richard Weinberger
2014-02-08 22:51 ` Willy Tarreau
2014-02-08 22:56 ` Richard Weinberger
2014-02-08 23:01 ` Willy Tarreau
2014-02-08 23:10 ` Piergiorgio Beruto
2014-02-08 23:13 ` Richard Weinberger
2014-02-08 23:15 ` Willy Tarreau
2014-02-08 23:25 ` Richard Weinberger
2014-02-08 23:37 ` Willy Tarreau
2014-02-09 0:17 ` Richard Weinberger
2014-02-09 7:51 ` Willy Tarreau
2014-02-10 2:48 ` Ezequiel Garcia
2014-02-10 7:35 ` Artem Bityutskiy
2014-02-10 8:27 ` Ezequiel Garcia
2014-02-10 8:46 ` Willy Tarreau
2014-02-10 14:20 ` Ezequiel Garcia
2014-02-10 14:41 ` Richard Weinberger
2014-02-10 14:50 ` Artem Bityutskiy
2014-02-10 14:52 ` Bityutskiy, Artem
2014-02-10 16:15 ` Willy Tarreau
2014-02-10 14:53 ` Bityutskiy, Artem
2014-02-10 18:48 ` Ezequiel Garcia
[not found] ` <a86d653a-9e3b-46dc-9ec8-94a9c1099bec@email.android.com>
2014-02-10 21:43 ` Willy Tarreau
2014-02-11 8:37 ` Geert Uytterhoeven
2014-02-11 9:05 ` Willy Tarreau
2014-02-11 9:35 ` Ezequiel Garcia
2014-02-11 9:43 ` Peter Korsgaard
2014-02-11 10:21 ` Geert Uytterhoeven
2014-02-10 22:37 ` Thomas Petazzoni
[not found] ` <de976336-3144-4f21-859b-d1a37fc3d811@email.android.com>
2014-02-10 22:46 ` Thomas Petazzoni
[not found] ` <a3fc06a8-c809-4687-9da4-015bd8dd29e8@email.android.com>
2014-02-10 23:01 ` Thomas Petazzoni
2014-02-10 23:19 ` Ezequiel Garcia
2014-02-10 8:50 ` Artem Bityutskiy
2014-02-08 23:05 ` Piergiorgio Beruto
2014-02-08 23:13 ` Willy Tarreau [this message]
2014-02-10 8:42 ` Thomas Petazzoni
2014-02-10 8:51 ` Willy Tarreau
2014-02-10 1:29 ` Ezequiel Garcia
2014-02-10 7:53 ` Richard Weinberger
2014-02-10 8:12 ` Ezequiel Garcia
2014-02-10 8:24 ` Artem Bityutskiy
2014-02-10 8:37 ` Willy Tarreau
2014-02-10 8:50 ` Ezequiel Garcia
2014-02-09 22:56 ` Richard Weinberger
2014-02-10 2:36 ` Ezequiel Garcia
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=20140208231308.GF22376@1wt.eu \
--to=w@1wt.eu \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=ezequiel.garcia@free-electrons.com \
--cc=linux-mtd@lists.infradead.org \
--cc=michael.opdenacker@free-electrons.com \
--cc=piergiorgio.beruto@gmail.com \
--cc=richard@nod.at \
--cc=thomas.petazzoni@free-electrons.com \
--cc=tim.bird@am.sony.com \
--cc=vapier@gentoo.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 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).