From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@suse.cz>
Cc: Linux PM <linux-pm@osdl.org>
Subject: [RFC][PATCH] swsusp: warn about USB devices in documentation
Date: Sun, 19 Feb 2006 23:06:23 +0100 [thread overview]
Message-ID: <200602192306.25170.rjw@sisk.pl> (raw)
[-- Attachment #1: Type: text/plain, Size: 2185 bytes --]
Hi,
The appended patch contains a warning about the possiblity to lose data
if any filesystems on USB devices are mounted before suspend.
The A:-Q: part is from my correspondence with Alan Stern (thanks Alan).
Greetings,
Rafael
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
Documentation/power/swsusp.txt | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+)
Index: linux-2.6.16-rc3-mm1/Documentation/power/swsusp.txt
===================================================================
--- linux-2.6.16-rc3-mm1.orig/Documentation/power/swsusp.txt
+++ linux-2.6.16-rc3-mm1/Documentation/power/swsusp.txt
@@ -17,6 +17,11 @@ Some warnings, first.
* but it will probably only crash.
*
* (*) suspend/resume support is needed to make it safe.
+ *
+ * If you have any filesystems on USB devices mounted before suspend,
+ * they won't be mounted after resume and you may lose data, as though
+ * you have unplugged the USB devices with mounted filesystems on them
+ * (see the FAQ below for details).
You need to append resume=/dev/your_swap_partition to kernel command
line. Then you suspend by
@@ -347,3 +352,22 @@ terminal the kernel switches to during s
kernel console loglevel to at least 5, for example by doing
echo 5 > /proc/sys/kernel/printk
+
+Q: Is this true 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"?
+
+A: 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.
+
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next reply other threads:[~2006-02-19 22:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-19 22:06 Rafael J. Wysocki [this message]
2006-02-19 22:13 ` [RFC][PATCH] swsusp: warn about USB devices in documentation Pavel Machek
2006-02-20 3:50 ` Alan Stern
2006-02-20 10:34 ` Pavel Machek
2006-02-20 13:23 ` Rafael J. Wysocki
2006-02-20 15:34 ` Alan Stern
2006-02-20 16:37 ` Pavel Machek
2006-02-20 16:41 ` Alan Stern
2006-02-20 16:43 ` Pavel Machek
2006-02-20 18:23 ` Patrick Mochel
2006-02-20 19:45 ` Alan Stern
2006-02-20 20:13 ` Patrick Mochel
2006-02-20 20:30 ` Alan Stern
2006-02-20 20:41 ` Pavel Machek
2006-02-20 10:36 ` Rafael J. Wysocki
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=200602192306.25170.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-pm@osdl.org \
--cc=pavel@suse.cz \
/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.