All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Steinmetz <ast@domdv.de>
To: Pavel Machek <pavel@ucw.cz>, "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>
Subject: uswsusp oddity
Date: Tue, 12 Sep 2006 16:08:22 +0200	[thread overview]
Message-ID: <4506BF56.6000309@domdv.de> (raw)

I just tried uswsusp 0.2 and there is a strange problem (2.6.17.8, x86_64):

The swap device used for suspend must be the first swap device,
otherwise suspend fails.


Contents of /etc/suspend.conf:

snapshot device = /dev/snapshot
resume device = /dev/hda2
#image size = 350000000
suspend loglevel = 7
#compute checksum = y
#compress = y
#encrypt = y
early writeout = y
#splash = y


Output of /proc/swaps of the failing suspend:

Filename                Type            Size    Used    Priority
/dev/mapper/swap1       partition       1959920 0       2
/dev/mapper/swap2       partition       1959888 0       3
/dev/hda2               partition       1959920 0       1


Relevant portion of strace of suspend utility:

mlockall(MCL_CURRENT|MCL_FUTURE)        = 0
stat("/dev/hda2", {st_mode=S_IFBLK|0660, st_rdev=makedev(3, 2), ...}) = 0
open("/dev/hda2", O_RDWR)               = 3
stat("/dev/snapshot", {st_mode=S_IFCHR|0600, st_rdev=makedev(10, 231),
...}) = 0
open("/dev/snapshot", O_RDONLY)         = 4
ioctl(4, 0x4004330a, 0x302)             = -1 ENODEV (No such device)
write(2, "suspend: Could not use the resum"..., 57suspend: Could not use
the res
ume device (try swapon -a)


There seems to be something wrong with the SNAPSHOT_SET_SWAP_FILE ioctl.

If I do the following sequence suspend works:

swapoff -a
swapon -p 1 /dev/hda2
swapon -a
-- 
Andreas Steinmetz                       SPAMmers use robotrap@domdv.de

             reply	other threads:[~2006-09-12 14:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-12 14:08 Andreas Steinmetz [this message]
2006-09-12 21:39 ` uswsusp oddity 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=4506BF56.6000309@domdv.de \
    --to=ast@domdv.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    /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.