From: Jamie Lokier <jamie@shareable.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: marco.stornelli@coritel.it, linux-embedded@vger.kernel.org
Subject: Re: Power cut in management
Date: Sat, 18 Oct 2008 13:56:22 +0100 [thread overview]
Message-ID: <20081018125621.GA30391@shareable.org> (raw)
In-Reply-To: <1224331493.6770.1360.camel@macbook.infradead.org>
David Woodhouse wrote:
> On Sat, 2008-10-18 at 12:49 +0100, Jamie Lokier wrote:
> > Can you use a journalling filesystem like ext3, reiserfs, xfs, or even
> > UBIFS on the card, or does it have to be FAT? With a journalling
> > filesystem, they vary on the details but basically if you can finish
> > the current write request in progress, there's no fs-level corruption.
>
> Careful. When you use a solid state "disk", you're actually using your
> file system on top of an underlying "pseudo-filesystem" which makes the
> flash pretend to be a disk. Your data are at the mercy of that
> underlying code, which in our past experience always seem to have been
> implemented by the same crack-smoking hobos they drag in off the street
> to write PC BIOSes. However good your own journalling file system on
> _top_ of that 'disk' is, you can still lose everything with a badly
> timed power-off.
I agree, hence the idea to complete the current write request _and
also_ gracefully shutdown the SD card to an inactive state, before
power is dropped.
To continue the filesystem on another pseudo-filesystem analogy,
that's like calling fsync on the pseudo-filesystem.
No guarantees - even Linux has fsync worthy of crack-smoking hobos at
times ;-) - but better than not calling fsync at all!
But is it even possible to shutdown an SD card gracefully, e.g. with a
power-down command?
> If you want to store data on solid state media, my current advice is
> either to do it on _real_ flash directly with a flash-based file system
> like JFFS2 or UBIFS, or to pray regularly to the deity of your choice.
Trouble is, that's not suitable for a dashboard unit where users plug
in their own media card.
Marco didn't say if the SD card is for users to plug in their own
media, or if it's internal storage for the device.
Marco, if it's just for the device itself to use, follow David's
suggestion if you can: use real flash with UBIFS or something like it,
not an SD card. That will be much easier.
-- Jamie
next prev parent reply other threads:[~2008-10-18 12:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-18 11:20 Power cut in management marco.stornelli
2008-10-18 11:49 ` Jamie Lokier
2008-10-18 12:04 ` David Woodhouse
2008-10-18 12:56 ` Jamie Lokier [this message]
2008-10-18 13:31 ` David Woodhouse
2008-10-18 13:38 ` Jamie Lokier
2008-10-18 16:01 ` Marco
2008-10-18 21:33 ` Ben Nizette
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=20081018125621.GA30391@shareable.org \
--to=jamie@shareable.org \
--cc=dwmw2@infradead.org \
--cc=linux-embedded@vger.kernel.org \
--cc=marco.stornelli@coritel.it \
/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.