From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.osdl.org>,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: Flames over -- Re: Which is simpler?
Date: Tue, 14 Feb 2006 21:41:10 +0100 [thread overview]
Message-ID: <200602142141.10545.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0602141417350.1419-100000@iolanthe.rowland.org>
Hi,
On Tuesday 14 February 2006 20:26, Alan Stern wrote:
> On Mon, 13 Feb 2006, Rafael J. Wysocki wrote:
> > On Monday 13 February 2006 22:24, Alan Stern wrote:
> > > On Mon, 13 Feb 2006, Phillip Susi wrote:
> > }-- snip --{
> > > You are complaining because you don't like the way USB was designed.
> > > That's fine, but it leaves you advocating a non-standardized position.
> > >
> > > Can you suggest a _reliable_ way to tell if the USB device present at a
> > > port after resuming is the same device as was there before suspending?
> >
> > It seems to follow from your discussion that if I have a mounted filesystem
> > on a USB device and I suspend to disk, I can lose data unless the filesystem
> > has been mounted with "sync".
>
> That's right. It depends on your hardware, and it could be true even for
> suspend-to-RAM. In fact, even with "-o sync" you can lose data if your
> programs have information in buffers they haven't written out to disk.
>
> If you're lucky, your hardware will support low-power modes for USB
> controllers while the system is asleep. Lots of hardware doesn't,
> however. Shutting off the power to a USB controller is equivalent to
> unplugging all the attached devices.
>
> Remember that it's always a bad idea to unplug a disk drive containing a
> mounted filesystem. With USB that's true even when your system is asleep!
> The safest thing is to unmount all USB-based filesystems before suspending
> and remount them after resuming.
Still, this may be impossible if the box is suspending because of its
battery running critical.
I'm afraid this behavior will cause support problems to appear in the long
run. [BTW, I wonder if it's USB-only, or some other subsystems behave
in a similar way, like ieee1394 or external SATA. And how about
NFS/CIFS/whatever network filesystems mounted on the suspending box?]
I think one solution to consider could be to add an abstract fs layer
on top of the removable filesystem, like subfs in SuSE, with the ability
to retain the user information accross device disconnects and to update
the fs state from the actual device when it reappears in the system and
to resolve possible conflicts (to a reasonable extent).
> > If this is the case, there should be a big fat warning in the swsusp
> > documentation, but there's nothing like that in there (at lease I can't find
> > it easily).
> >
> > [If this is not the case, I've missed something and sorry for the noise.]
>
> I'm not aware of any warnings about this in the documentation. If you
> would like to add something, please go ahead.
I'm going to do this. Can I use your explanation above?
Rafael
next prev parent reply other threads:[~2006-02-14 20:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200602132327.10475.rjw@sisk.pl>
2006-02-14 19:26 ` Flames over -- Re: Which is simpler? Alan Stern
2006-02-14 20:41 ` Rafael J. Wysocki [this message]
2006-02-14 21:08 ` Lee Revell
2006-02-15 15:56 ` Alan Stern
[not found] <20060217210445.GR3490@openzaurus.ucw.cz>
2006-02-18 21:04 ` Alan Stern
2006-02-19 0:02 ` Andrew Morton
2006-02-19 6:02 ` Phillip Susi
2006-02-19 6:32 ` Andrew Morton
2006-02-19 16:39 ` Phillip Susi
2006-02-19 16:54 ` Alan Stern
2006-02-19 20:02 ` Andrew Morton
2006-02-19 20:44 ` Oliver Neukum
2006-02-19 21:02 ` Andrew Morton
2006-02-20 6:55 ` Oliver Neukum
2006-02-20 7:29 ` Andrew Morton
2006-02-20 7:57 ` Andrew Morton
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=200602142141.10545.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.osdl.org \
--cc=stern@rowland.harvard.edu \
/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