From: Linus Torvalds <torvalds@linux-foundation.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Pavel Machek <pavel@suse.cz>, Andreas Mohr <andi@lisas.de>,
Sriram V <vshrirama@gmail.com>,
Pierre Ossman <drzeus-list@drzeus.cx>,
linux-kernel@vger.kernel.org
Subject: Re: Power Management with rootfs on SDMMC.
Date: Sat, 3 Jan 2009 13:16:35 -0800 (PST) [thread overview]
Message-ID: <alpine.LFD.2.00.0901031306150.3179@localhost.localdomain> (raw)
In-Reply-To: <20090103204535.1a91cbcb@lxorguk.ukuu.org.uk>
On Sat, 3 Jan 2009, Alan Cox wrote:
> > [Now, olympus uses VFAT and probably will not write to the filesystem
> > unless you take a picture... with mp3 player, I'd expect mtime to be
> > updated on the playlist files...]
>
> Some of the MP3/OGG players (especially the bigger disk based ones) use
> the file system to store their own metadata so yes it makes a nasty mess.
Well, it goes both ways. You can make a nasty mess right now by suspending
and simply not having a working computer when it comes back - all your
work being lost.
At least with cameras and mp3 players you _can_ choose to just unmount
them before suspending (and most distros would hopefully mount them with
something like automount anyway?). In contrast, if your root (or /home)
directory is on a SD card, and that card is over USB rather than some IDE
controller, you're basically screwed.
Yes, distros can set the /sys/bus/usb/devices/.../power/persist thing for
important filesystems automatically, and I'm sure there are magic udev
rules that could be written (and perhaps even exist). The likelihood that
they actually get things right is pretty low, though. So I suspect we'd be
much better off having sane defaults in the kernel instead.
And yes, the "sane defaults" may well be that FATFS does _not_ make the
media be persistent.
Think "door lock" commands (aka "prevent/allow medium removal"). This is
really not that very different. Some filesystems are so important that the
user messing with them is deadly anyway - so we should "lock" them and
consider them persistent - and if the user does something bad, there was
really never any good solution for it. Other filesystems we're better off
just letting the user rip out, because we can be reasonably expected to
handle it gracefully.
So it boils down to the fact that if you have something like / or /home
mounted, we really _cannot_ do any better than "assume the user doesn't
screw us up".
A per-filesystem callback to re-verify at resume might be a good idea, but
a lot of filesystems cannot reasonably do a lot of verification.
Linus
next prev parent reply other threads:[~2009-01-03 21:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-02 6:35 Sriram V
2009-01-02 10:21 ` Andreas Mohr
2009-01-02 11:21 ` Pierre Ossman
2009-01-02 12:21 ` Andreas Mohr
2009-01-02 17:24 ` Pavel Machek
2009-01-03 20:23 ` Linus Torvalds
2009-01-03 20:43 ` Pavel Machek
2009-01-03 20:45 ` Alan Cox
2009-01-03 21:16 ` Linus Torvalds [this message]
2009-01-03 23:10 ` Alan Cox
2009-01-04 2:59 ` Linus Torvalds
2009-01-04 12:04 ` Alan Cox
2009-01-04 17:53 ` Linus Torvalds
2009-03-29 16:26 ` Andreas Mohr
2009-04-05 18:45 ` Pierre Ossman
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=alpine.LFD.2.00.0901031306150.3179@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andi@lisas.de \
--cc=drzeus-list@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
--cc=vshrirama@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
all inboxes | Powered by JetHome®