Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 165690 - sys-power/hibernate-script - bad filewriter location
Summary: sys-power/hibernate-script - bad filewriter location
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alon Bar-Lev (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-06 22:42 UTC by Shane Kerr
Modified: 2007-02-09 14:20 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shane Kerr 2007-02-06 22:42:12 UTC
The following script:

/usr/share/hibernate/scriptlets.d/suspend2

Has this code:

Swsusp2SetupFilewriter() {
    local ft_entry
    ft_entry=
    [ -f "$FILEWRITER_ROOT/filewriter_target" ] && \
        ft_entry="$FILEWRITER_ROOT/filewriter_target"
    [ -f "$FILEWRITER_ROOT/target" ] && \
        ft_entry="$FILEWRITER_ROOT/target"

On my kernel, sys-kernel/suspend2-sources-2.6.18-r1, the following check actually finds the correct entry:

    [ -f "$FILEWRITER_ROOT/filewriter/target" ] && \
        ft_entry="$FILEWRITER_ROOT/filewriter/target"

I added this below the previous two checks, and hibernate now works (again).



Reproducible: Always

Steps to Reproduce:
1. Configure hibernate to use a filewriter.
2. Type "hibernate".
Comment 1 Alon Bar-Lev (RETIRED) gentoo-dev 2007-02-07 12:05:05 UTC
This is strange...
Are you sure it is "filewriter" and not "file"?

suspend2-2.2.9-for-2.6.18.3.patch.bz2::b/kernel/power/suspend_file.c
+static struct suspend_module_ops suspend_fileops = {
+       .type                                   = WRITER_MODULE,
+       .name                                   = "File Allocator",
+       .directory                              = "file",
+       .module                                 = THIS_MODULE,
Comment 2 Shane Kerr 2007-02-07 17:48:45 UTC
(In reply to comment #1)
> This is strange...
> Are you sure it is "filewriter" and not "file"?

See for yourself:

shane@shane-laptop ~ $ ls -l /sys/power/suspend2
total 0
drwxr-xr-x 2 root root    0 Feb  7  2007 compression
-r--r--r-- 1 root root 4096 Feb  7 18:46 debug_info
--w------- 1 root root 4096 Feb  7 18:46 do_resume
--w------- 1 root root 4096 Feb  7 18:46 do_suspend
-rw-r--r-- 1 root root 4096 Feb  7 18:46 driver_model_beeping
drwxr-xr-x 2 root root    0 Feb  7  2007 encryption
-rw-r--r-- 1 root root 4096 Feb  7 18:46 extra_pages_allowance
drwxr-xr-x 2 root root    0 Feb  7 18:46 filewriter
-rw-r--r-- 1 root root 4096 Feb  7 18:46 ignore_rootfs
-rw-r--r-- 1 root root 4096 Feb  7 18:46 image_exists
-rw-r--r-- 1 root root 4096 Feb  7 18:46 image_size_limit
-r--r--r-- 1 root root 4096 Feb  7 18:46 last_result
-rw-r--r-- 1 root root 4096 Feb  7 18:46 powerdown_method
-rw-r--r-- 1 root root 4096 Feb  7 18:46 reboot
-rw-r--r-- 1 root root 4096 Feb  7 18:46 resume2
-rw-r--r-- 1 root root 4096 Feb  7 18:46 resume_commandline
drwxr-xr-x 2 root root    0 Feb  7  2007 storage_manager
drwxr-xr-x 2 root root    0 Feb  7  2007 swapwriter
drwxr-xr-x 2 root root    0 Feb  7  2007 user_interface
-r--r--r-- 1 root root 4096 Feb  7 18:46 version
shane@shane-laptop ~ $ ls -l /sys/power/suspend2/filewriter
total 0
-rw-r--r-- 1 root root 4096 Feb  7 18:46 enabled
-rw-r--r-- 1 root root 4096 Feb  7 18:46 target
Comment 3 Alon Bar-Lev (RETIRED) gentoo-dev 2007-02-07 18:48:00 UTC
Strange... please paste:
$ cat /sys/power/suspend2/version
Comment 4 Shane Kerr 2007-02-07 18:55:58 UTC
(In reply to comment #3)
> Strange... please paste:
> $ cat /sys/power/suspend2/version

shane@shane-laptop ~ $  cat /sys/power/suspend2/version
2.2.8

And even though you didn't ask:

shane@shane-laptop ~ $ uname -a
Linux shane-laptop 2.6.18-suspend2 #1 PREEMPT Tue Nov 28 14:38:40 CET 2006 i686 Intel(R) Pentium(R) M processor 1.73GHz GenuineIntel GNU/Linux
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2007-02-07 19:01:22 UTC
But:
suspend2-sources-2.6.18-r1.ebuild:SUSPEND2_VERSION="2.2.9"

How did you end up with 2.2.8?
Comment 6 Zsolti 2007-02-07 21:36:13 UTC
same with me
cat /sys/power/suspend2/version
2.2.8

uname -a
Linux thinkpad 2.6.18-suspend2 #10 Sun Dec 3 17:12:41 CET 2006 i686 Intel(R) Pentium(R) M processor 1400MHz GenuineIntel GNU/Linux
Comment 7 Alon Bar-Lev (RETIRED) gentoo-dev 2007-02-07 22:00:15 UTC
You both need to upgrade from suspend2-sources into suspend2-sources-r1:

# emerge --update suspend2-sources
# cd /usr/src
# rm linux
# ln -s linux-2.6.18-suspend2-r1 linux

And use genkernel in order to recompile your kernel.
Comment 8 Alon Bar-Lev (RETIRED) gentoo-dev 2007-02-09 14:20:49 UTC
Please reopen if you have a problem with latest (2.2.9) stable suspend2-sources.