public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* uswsusp oddity
@ 2006-09-12 14:08 Andreas Steinmetz
  2006-09-12 21:39 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Steinmetz @ 2006-09-12 14:08 UTC (permalink / raw)
  To: Pavel Machek, Rafael J. Wysocki; +Cc: Linux Kernel Mailinglist

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: uswsusp oddity
  2006-09-12 14:08 uswsusp oddity Andreas Steinmetz
@ 2006-09-12 21:39 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2006-09-12 21:39 UTC (permalink / raw)
  To: Andreas Steinmetz; +Cc: Pavel Machek, Linux Kernel Mailinglist

On Tuesday, 12 September 2006 16:08, Andreas Steinmetz wrote:
> 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.

This is a known issue, happens also in swsusp.  It should be fixed in 2.6.18.

Greetings,
Rafael


-- 
You never change things by fighting the existing reality.
		R. Buckminster Fuller

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-12 21:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-12 14:08 uswsusp oddity Andreas Steinmetz
2006-09-12 21:39 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox