* [PATCH] Allow initrd_load() before software_resume() @ 2003-08-01 0:29 Pascal Brisset 2003-08-01 1:18 ` Nigel Cunningham 0 siblings, 1 reply; 10+ messages in thread From: Pascal Brisset @ 2003-08-01 0:29 UTC (permalink / raw) To: linux-kernel, swsusp-devel [-- Attachment #1: message body text --] [-- Type: text/plain, Size: 770 bytes --] This patch adds a boot parameter "resume_initrd". If present, init will load the initrd before trying to resume. This makes it posssible to resume from an encrypted suspend image. The initrd should insmod cryptoloop.o or loop-AES.o and perform losetup -e so that resume=/dev/loopX makes sense. Note: software_resume() should not be allowed to complete if initrd has altered disks (e.g. by flushing journals). /initrd |-- bin | |-- ash | |-- insmod | `-- losetup |-- dev | |-- console | |-- hdaX | |-- loopX | |-- null | `-- tty |-- linuxrc |-- loop.o `-- lost+found Resuming works, but suspension seems to fail more frequently when the swap is encrypted. I am using loop-AES-v1.7d + patch for 2.6. Is it safe to suspend to loop devices ? -- Pascal [-- Attachment #2: resume_initrd.diff --] [-- Type: text/plain, Size: 1814 bytes --] diff -ur linux-2.6.0-test1.orig/Documentation/kernel-parameters.txt linux-2.6.0-test1/Documentation/kernel-parameters.txt --- linux-2.6.0-test1.orig/Documentation/kernel-parameters.txt 2003-07-14 05:39:36.000000000 +0200 +++ linux-2.6.0-test1/Documentation/kernel-parameters.txt 2003-08-01 01:19:46.000000000 +0200 @@ -816,6 +816,8 @@ resume= [SWSUSP] Specify the partition device for software suspension + resume_initrd [SWSUSP] Run initrd before resuming from software suspension + riscom8= [HW,SERIAL] Format: <io_board1>[,<io_board2>[,...<io_boardN>]] diff -ur linux-2.6.0-test1.orig/init/do_mounts.c linux-2.6.0-test1/init/do_mounts.c --- linux-2.6.0-test1.orig/init/do_mounts.c 2003-07-14 05:32:44.000000000 +0200 +++ linux-2.6.0-test1/init/do_mounts.c 2003-08-01 01:21:44.000000000 +0200 @@ -49,6 +49,15 @@ __setup("ro", readonly); __setup("rw", readwrite); +static int resume_initrd = 0; +static int __init set_resume_initrd(char *str) +{ + resume_initrd = 1; + return 1; +} + +__setup("resume_initrd", set_resume_initrd); + static dev_t __init try_name(char *name, int part) { char path[64]; @@ -365,12 +374,21 @@ is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; - /* This has to be before mounting root, because even readonly mount of reiserfs would replay - log corrupting stuff */ - software_resume(); + /* software_resume() has to be before mounting root, because even + readonly mount of reiserfs would replay log corrupting stuff. + However, users may still want to run initrd first. */ + if (resume_initrd) { + if (initrd_load()) { + software_resume(); + goto out; + } + } + else { + software_resume(); - if (initrd_load()) - goto out; + if (initrd_load()) + goto out; + } if (is_floppy && rd_doload && rd_load_disk(0)) ROOT_DEV = Root_RAM0; ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Allow initrd_load() before software_resume() 2003-08-01 0:29 [PATCH] Allow initrd_load() before software_resume() Pascal Brisset @ 2003-08-01 1:18 ` Nigel Cunningham 2003-08-01 10:32 ` [PATCH] Allow initrd_load() before software_resume() (version 2) Pascal Brisset 0 siblings, 1 reply; 10+ messages in thread From: Nigel Cunningham @ 2003-08-01 1:18 UTC (permalink / raw) To: Pascal Brisset; +Cc: Linux Kernel Mailing List, swsusp-devel Hi. I'll try to apply it to the 2.4 version and include it in the upcoming 2.6 version. (Yes, upcoming means it's finally on the way). Regards, Nigel On Fri, 2003-08-01 at 12:29, Pascal Brisset wrote: > This patch adds a boot parameter "resume_initrd". > If present, init will load the initrd before trying to resume. > > This makes it posssible to resume from an encrypted suspend image. > The initrd should insmod cryptoloop.o or loop-AES.o and perform > losetup -e so that resume=/dev/loopX makes sense. > Note: software_resume() should not be allowed to complete if > initrd has altered disks (e.g. by flushing journals). > > /initrd > |-- bin > | |-- ash > | |-- insmod > | `-- losetup > |-- dev > | |-- console > | |-- hdaX > | |-- loopX > | |-- null > | `-- tty > |-- linuxrc > |-- loop.o > `-- lost+found > > Resuming works, but suspension seems to fail more frequently when > the swap is encrypted. I am using loop-AES-v1.7d + patch for 2.6. > > Is it safe to suspend to loop devices ? > > -- Pascal > > > ______________________________________________________________________ > > diff -ur linux-2.6.0-test1.orig/Documentation/kernel-parameters.txt linux-2.6.0-test1/Documentation/kernel-parameters.txt > --- linux-2.6.0-test1.orig/Documentation/kernel-parameters.txt 2003-07-14 05:39:36.000000000 +0200 > +++ linux-2.6.0-test1/Documentation/kernel-parameters.txt 2003-08-01 01:19:46.000000000 +0200 > @@ -816,6 +816,8 @@ > > resume= [SWSUSP] Specify the partition device for software suspension > > + resume_initrd [SWSUSP] Run initrd before resuming from software suspension > + > riscom8= [HW,SERIAL] > Format: <io_board1>[,<io_board2>[,...<io_boardN>]] > > diff -ur linux-2.6.0-test1.orig/init/do_mounts.c linux-2.6.0-test1/init/do_mounts.c > --- linux-2.6.0-test1.orig/init/do_mounts.c 2003-07-14 05:32:44.000000000 +0200 > +++ linux-2.6.0-test1/init/do_mounts.c 2003-08-01 01:21:44.000000000 +0200 > @@ -49,6 +49,15 @@ > __setup("ro", readonly); > __setup("rw", readwrite); > > +static int resume_initrd = 0; > +static int __init set_resume_initrd(char *str) > +{ > + resume_initrd = 1; > + return 1; > +} > + > +__setup("resume_initrd", set_resume_initrd); > + > static dev_t __init try_name(char *name, int part) > { > char path[64]; > @@ -365,12 +374,21 @@ > > is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; > > - /* This has to be before mounting root, because even readonly mount of reiserfs would replay > - log corrupting stuff */ > - software_resume(); > + /* software_resume() has to be before mounting root, because even > + readonly mount of reiserfs would replay log corrupting stuff. > + However, users may still want to run initrd first. */ > + if (resume_initrd) { > + if (initrd_load()) { > + software_resume(); > + goto out; > + } > + } > + else { > + software_resume(); > > - if (initrd_load()) > - goto out; > + if (initrd_load()) > + goto out; > + } > > if (is_floppy && rd_doload && rd_load_disk(0)) > ROOT_DEV = Root_RAM0; -- Nigel Cunningham 495 St Georges Road South, Hastings 4201, New Zealand You see, at just the right time, when we were still powerless, Christ died for the ungodly. -- Romans 5:6, NIV. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Allow initrd_load() before software_resume() (version 2) 2003-08-01 1:18 ` Nigel Cunningham @ 2003-08-01 10:32 ` Pascal Brisset 2003-08-01 10:41 ` [Swsusp-devel] " Nigel Cunningham 0 siblings, 1 reply; 10+ messages in thread From: Pascal Brisset @ 2003-08-01 10:32 UTC (permalink / raw) To: Nigel Cunningham; +Cc: Linux Kernel Mailing List, swsusp-devel [-- Attachment #1: message body text --] [-- Type: text/plain, Size: 563 bytes --] [Sorry, new version already... I hadn't noticed that mount_root() is also called from within initrd_load(). resume() must run before.] This patch adds a boot parameter "resume_initrd". If present, init will load the initrd before trying to resume from swsusp. This makes it posssible to resume from an encrypted suspend image. The initrd should insmod cryptoloop.o or loop-AES.o and perform losetup -e so that resume=/dev/loopX makes sense. Note: software_resume() should not be allowed to complete if initrd has altered disks (e.g. by flushing journals). [-- Attachment #2: resume_initrd-2.diff --] [-- Type: text/plain, Size: 2909 bytes --] diff -ur linux-2.6.0-test2.orig/Documentation/kernel-parameters.txt linux-2.6.0-test2/Documentation/kernel-parameters.txt --- linux-2.6.0-test2.orig/Documentation/kernel-parameters.txt 2003-07-27 19:12:45.000000000 +0200 +++ linux-2.6.0-test2/Documentation/kernel-parameters.txt 2003-08-01 11:28:10.000000000 +0200 @@ -816,6 +816,8 @@ resume= [SWSUSP] Specify the partition device for software suspension + resume_initrd [SWSUSP] Run initrd before resuming from software suspension + riscom8= [HW,SERIAL] Format: <io_board1>[,<io_board2>[,...<io_boardN>]] diff -ur linux-2.6.0-test2.orig/init/do_mounts.c linux-2.6.0-test2/init/do_mounts.c --- linux-2.6.0-test2.orig/init/do_mounts.c 2003-07-27 19:00:37.000000000 +0200 +++ linux-2.6.0-test2/init/do_mounts.c 2003-08-01 11:31:17.000000000 +0200 @@ -15,6 +15,7 @@ extern int get_filesystem_list(char * buf); int __initdata rd_doload; /* 1 = load RAM disk, 0 = don't load */ +unsigned char resume_initrd = 0; /* Run initrd before resuming from swsusp */ int root_mountflags = MS_RDONLY | MS_VERBOSE; char * __initdata root_device_name; @@ -49,6 +50,13 @@ __setup("ro", readonly); __setup("rw", readwrite); +static int __init set_resume_initrd(char *str) +{ + resume_initrd = 1; + return 1; +} +__setup("resume_initrd", set_resume_initrd); + static dev_t __init try_name(char *name, int part) { char path[64]; @@ -365,9 +373,11 @@ is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; - /* This has to be before mounting root, because even readonly mount of reiserfs would replay - log corrupting stuff */ - software_resume(); + /* software_resume() has to be before mounting root, because even + readonly mount of reiserfs would replay log corrupting stuff. + However, users may want to run a special initrd first. */ + if (!resume_initrd) + software_resume(); if (initrd_load()) goto out; diff -ur linux-2.6.0-test2.orig/init/do_mounts.h linux-2.6.0-test2/init/do_mounts.h --- linux-2.6.0-test2.orig/init/do_mounts.h 2003-07-27 19:04:19.000000000 +0200 +++ linux-2.6.0-test2/init/do_mounts.h 2003-08-01 11:31:41.000000000 +0200 @@ -28,6 +28,7 @@ void mount_root(void); extern int root_mountflags; extern char *root_device_name; +extern unsigned char resume_initrd; #ifdef CONFIG_DEVFS_FS diff -ur linux-2.6.0-test2.orig/init/do_mounts_initrd.c linux-2.6.0-test2/init/do_mounts_initrd.c --- linux-2.6.0-test2.orig/init/do_mounts_initrd.c 2003-07-27 18:57:13.000000000 +0200 +++ linux-2.6.0-test2/init/do_mounts_initrd.c 2003-08-01 11:33:36.000000000 +0200 @@ -6,6 +6,7 @@ #include <linux/romfs_fs.h> #include <linux/initrd.h> #include <linux/sched.h> +#include <linux/suspend.h> #include "do_mounts.h" @@ -74,6 +75,10 @@ return; } + /* Must resume from swsusp before mounting a journalling root fs */ + if (resume_initrd) + software_resume(); + ROOT_DEV = real_root_dev; mount_root(); ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Swsusp-devel] Re: [PATCH] Allow initrd_load() before software_resume() (version 2) 2003-08-01 10:32 ` [PATCH] Allow initrd_load() before software_resume() (version 2) Pascal Brisset @ 2003-08-01 10:41 ` Nigel Cunningham 2003-08-06 11:30 ` Pavel Machek 0 siblings, 1 reply; 10+ messages in thread From: Nigel Cunningham @ 2003-08-01 10:41 UTC (permalink / raw) To: Pascal Brisset; +Cc: Linux Kernel Mailing List, swsusp-devel Okay. I hadn't tried it yet. I'll happily take up the barrow for you and push it to Pavel and Linus with the rest, if you like. Regards, Nigel On Fri, 2003-08-01 at 22:32, Pascal Brisset wrote: > [Sorry, new version already... I hadn't noticed that mount_root() is > also called from within initrd_load(). resume() must run before.] > > > This patch adds a boot parameter "resume_initrd". If present, > init will load the initrd before trying to resume from swsusp. > > This makes it posssible to resume from an encrypted suspend image. > The initrd should insmod cryptoloop.o or loop-AES.o and perform > losetup -e so that resume=/dev/loopX makes sense. > Note: software_resume() should not be allowed to complete if > initrd has altered disks (e.g. by flushing journals). > > > > ______________________________________________________________________ > > diff -ur linux-2.6.0-test2.orig/Documentation/kernel-parameters.txt linux-2.6.0-test2/Documentation/kernel-parameters.txt > --- linux-2.6.0-test2.orig/Documentation/kernel-parameters.txt 2003-07-27 19:12:45.000000000 +0200 > +++ linux-2.6.0-test2/Documentation/kernel-parameters.txt 2003-08-01 11:28:10.000000000 +0200 > @@ -816,6 +816,8 @@ > > resume= [SWSUSP] Specify the partition device for software suspension > > + resume_initrd [SWSUSP] Run initrd before resuming from software suspension > + > riscom8= [HW,SERIAL] > Format: <io_board1>[,<io_board2>[,...<io_boardN>]] > > diff -ur linux-2.6.0-test2.orig/init/do_mounts.c linux-2.6.0-test2/init/do_mounts.c > --- linux-2.6.0-test2.orig/init/do_mounts.c 2003-07-27 19:00:37.000000000 +0200 > +++ linux-2.6.0-test2/init/do_mounts.c 2003-08-01 11:31:17.000000000 +0200 > @@ -15,6 +15,7 @@ > extern int get_filesystem_list(char * buf); > > int __initdata rd_doload; /* 1 = load RAM disk, 0 = don't load */ > +unsigned char resume_initrd = 0; /* Run initrd before resuming from swsusp */ > > int root_mountflags = MS_RDONLY | MS_VERBOSE; > char * __initdata root_device_name; > @@ -49,6 +50,13 @@ > __setup("ro", readonly); > __setup("rw", readwrite); > > +static int __init set_resume_initrd(char *str) > +{ > + resume_initrd = 1; > + return 1; > +} > +__setup("resume_initrd", set_resume_initrd); > + > static dev_t __init try_name(char *name, int part) > { > char path[64]; > @@ -365,9 +373,11 @@ > > is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; > > - /* This has to be before mounting root, because even readonly mount of reiserfs would replay > - log corrupting stuff */ > - software_resume(); > + /* software_resume() has to be before mounting root, because even > + readonly mount of reiserfs would replay log corrupting stuff. > + However, users may want to run a special initrd first. */ > + if (!resume_initrd) > + software_resume(); > > if (initrd_load()) > goto out; > diff -ur linux-2.6.0-test2.orig/init/do_mounts.h linux-2.6.0-test2/init/do_mounts.h > --- linux-2.6.0-test2.orig/init/do_mounts.h 2003-07-27 19:04:19.000000000 +0200 > +++ linux-2.6.0-test2/init/do_mounts.h 2003-08-01 11:31:41.000000000 +0200 > @@ -28,6 +28,7 @@ > void mount_root(void); > extern int root_mountflags; > extern char *root_device_name; > +extern unsigned char resume_initrd; > > #ifdef CONFIG_DEVFS_FS > > diff -ur linux-2.6.0-test2.orig/init/do_mounts_initrd.c linux-2.6.0-test2/init/do_mounts_initrd.c > --- linux-2.6.0-test2.orig/init/do_mounts_initrd.c 2003-07-27 18:57:13.000000000 +0200 > +++ linux-2.6.0-test2/init/do_mounts_initrd.c 2003-08-01 11:33:36.000000000 +0200 > @@ -6,6 +6,7 @@ > #include <linux/romfs_fs.h> > #include <linux/initrd.h> > #include <linux/sched.h> > +#include <linux/suspend.h> > > #include "do_mounts.h" > > @@ -74,6 +75,10 @@ > return; > } > > + /* Must resume from swsusp before mounting a journalling root fs */ > + if (resume_initrd) > + software_resume(); > + > ROOT_DEV = real_root_dev; > mount_root(); > -- Nigel Cunningham 495 St Georges Road South, Hastings 4201, New Zealand You see, at just the right time, when we were still powerless, Christ died for the ungodly. -- Romans 5:6, NIV. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Swsusp-devel] Re: [PATCH] Allow initrd_load() before software_resume() (version 2) 2003-08-01 10:41 ` [Swsusp-devel] " Nigel Cunningham @ 2003-08-06 11:30 ` Pavel Machek 2003-08-06 11:47 ` Arjan van de Ven 0 siblings, 1 reply; 10+ messages in thread From: Pavel Machek @ 2003-08-06 11:30 UTC (permalink / raw) To: Nigel Cunningham; +Cc: Pascal Brisset, Linux Kernel Mailing List, swsusp-devel Hi! > Okay. I hadn't tried it yet. I'll happily take up the barrow for you and > push it to Pavel and Linus with the rest, if you like. Don't even think about that. It is not safe to run userspace *before* doing resume. You don't want to see problems this would bring in. Forget it. Pavel > > [Sorry, new version already... I hadn't noticed that mount_root() is > > also called from within initrd_load(). resume() must run before.] > > > > > > This patch adds a boot parameter "resume_initrd". If present, > > init will load the initrd before trying to resume from swsusp. > > > > This makes it posssible to resume from an encrypted suspend image. > > The initrd should insmod cryptoloop.o or loop-AES.o and perform > > losetup -e so that resume=/dev/loopX makes sense. > > Note: software_resume() should not be allowed to complete if > > initrd has altered disks (e.g. by flushing journals). > > > > > > > > ______________________________________________________________________ > > > > diff -ur linux-2.6.0-test2.orig/Documentation/kernel-parameters.txt linux-2.6.0-test2/Documentation/kernel-parameters.txt > > --- linux-2.6.0-test2.orig/Documentation/kernel-parameters.txt 2003-07-27 19:12:45.000000000 +0200 > > +++ linux-2.6.0-test2/Documentation/kernel-parameters.txt 2003-08-01 11:28:10.000000000 +0200 > > @@ -816,6 +816,8 @@ > > > > resume= [SWSUSP] Specify the partition device for software suspension > > > > + resume_initrd [SWSUSP] Run initrd before resuming from software suspension > > + > > riscom8= [HW,SERIAL] > > Format: <io_board1>[,<io_board2>[,...<io_boardN>]] > > > > diff -ur linux-2.6.0-test2.orig/init/do_mounts.c linux-2.6.0-test2/init/do_mounts.c > > --- linux-2.6.0-test2.orig/init/do_mounts.c 2003-07-27 19:00:37.000000000 +0200 > > +++ linux-2.6.0-test2/init/do_mounts.c 2003-08-01 11:31:17.000000000 +0200 > > @@ -15,6 +15,7 @@ > > extern int get_filesystem_list(char * buf); > > > > int __initdata rd_doload; /* 1 = load RAM disk, 0 = don't load */ > > +unsigned char resume_initrd = 0; /* Run initrd before resuming from swsusp */ > > > > int root_mountflags = MS_RDONLY | MS_VERBOSE; > > char * __initdata root_device_name; > > @@ -49,6 +50,13 @@ > > __setup("ro", readonly); > > __setup("rw", readwrite); > > > > +static int __init set_resume_initrd(char *str) > > +{ > > + resume_initrd = 1; > > + return 1; > > +} > > +__setup("resume_initrd", set_resume_initrd); > > + > > static dev_t __init try_name(char *name, int part) > > { > > char path[64]; > > @@ -365,9 +373,11 @@ > > > > is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; > > > > - /* This has to be before mounting root, because even readonly mount of reiserfs would replay > > - log corrupting stuff */ > > - software_resume(); > > + /* software_resume() has to be before mounting root, because even > > + readonly mount of reiserfs would replay log corrupting stuff. > > + However, users may want to run a special initrd first. */ > > + if (!resume_initrd) > > + software_resume(); > > > > if (initrd_load()) > > goto out; > > diff -ur linux-2.6.0-test2.orig/init/do_mounts.h linux-2.6.0-test2/init/do_mounts.h > > --- linux-2.6.0-test2.orig/init/do_mounts.h 2003-07-27 19:04:19.000000000 +0200 > > +++ linux-2.6.0-test2/init/do_mounts.h 2003-08-01 11:31:41.000000000 +0200 > > @@ -28,6 +28,7 @@ > > void mount_root(void); > > extern int root_mountflags; > > extern char *root_device_name; > > +extern unsigned char resume_initrd; > > > > #ifdef CONFIG_DEVFS_FS > > > > diff -ur linux-2.6.0-test2.orig/init/do_mounts_initrd.c linux-2.6.0-test2/init/do_mounts_initrd.c > > --- linux-2.6.0-test2.orig/init/do_mounts_initrd.c 2003-07-27 18:57:13.000000000 +0200 > > +++ linux-2.6.0-test2/init/do_mounts_initrd.c 2003-08-01 11:33:36.000000000 +0200 > > @@ -6,6 +6,7 @@ > > #include <linux/romfs_fs.h> > > #include <linux/initrd.h> > > #include <linux/sched.h> > > +#include <linux/suspend.h> > > > > #include "do_mounts.h" > > > > @@ -74,6 +75,10 @@ > > return; > > } > > > > + /* Must resume from swsusp before mounting a journalling root fs */ > > + if (resume_initrd) > > + software_resume(); > > + > > ROOT_DEV = real_root_dev; > > mount_root(); > > -- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Swsusp-devel] Re: [PATCH] Allow initrd_load() before software_resume() (version 2) 2003-08-06 11:30 ` Pavel Machek @ 2003-08-06 11:47 ` Arjan van de Ven 2003-08-06 12:57 ` Pavel Machek 0 siblings, 1 reply; 10+ messages in thread From: Arjan van de Ven @ 2003-08-06 11:47 UTC (permalink / raw) To: Pavel Machek Cc: Nigel Cunningham, Pascal Brisset, Linux Kernel Mailing List, swsusp-devel [-- Attachment #1: Type: text/plain, Size: 494 bytes --] On Wed, 2003-08-06 at 13:30, Pavel Machek wrote: > Hi! > > > Okay. I hadn't tried it yet. I'll happily take up the barrow for you and > > push it to Pavel and Linus with the rest, if you like. > > Don't even think about that. > > It is not safe to run userspace *before* doing resume. You don't want > to see problems this would bring in. Forget it. > so how do you resume from a partition on a device mapper volume? (and yes I basically agree with your sentiment though) [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Swsusp-devel] Re: [PATCH] Allow initrd_load() before software_resume() (version 2) 2003-08-06 11:47 ` Arjan van de Ven @ 2003-08-06 12:57 ` Pavel Machek 2003-08-06 13:16 ` Måns Rullgård 0 siblings, 1 reply; 10+ messages in thread From: Pavel Machek @ 2003-08-06 12:57 UTC (permalink / raw) To: Arjan van de Ven Cc: Pavel Machek, Nigel Cunningham, Pascal Brisset, Linux Kernel Mailing List, swsusp-devel Hi! > > > Okay. I hadn't tried it yet. I'll happily take up the barrow for you and > > > push it to Pavel and Linus with the rest, if you like. > > > > Don't even think about that. > > > > It is not safe to run userspace *before* doing resume. You don't want > > to see problems this would bring in. Forget it. > > > so how do you resume from a partition on a device mapper volume? > > (and yes I basically agree with your sentiment though) I know very little about DM, its very well possible that resume from it is not supported. -- Pavel Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need... ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Swsusp-devel] Re: [PATCH] Allow initrd_load() before software_resume() (version 2) 2003-08-06 12:57 ` Pavel Machek @ 2003-08-06 13:16 ` Måns Rullgård 2003-08-11 2:08 ` Rob Landley 0 siblings, 1 reply; 10+ messages in thread From: Måns Rullgård @ 2003-08-06 13:16 UTC (permalink / raw) To: linux-kernel Pavel Machek <pavel@ucw.cz> writes: >> > > Okay. I hadn't tried it yet. I'll happily take up the barrow for you and >> > > push it to Pavel and Linus with the rest, if you like. >> > >> > Don't even think about that. >> > >> > It is not safe to run userspace *before* doing resume. You don't want >> > to see problems this would bring in. Forget it. >> > >> so how do you resume from a partition on a device mapper volume? >> >> (and yes I basically agree with your sentiment though) > > I know very little about DM, its very well possible that resume from > it is not supported. Since DM requires some userspace program to set up the mappings, it seems to me that it wouldn't work to resume from a DM volume. I'd much appreciate if it would work, somehow. -- Måns Rullgård mru@users.sf.net ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Swsusp-devel] Re: [PATCH] Allow initrd_load() before software_resume() (version 2) 2003-08-06 13:16 ` Måns Rullgård @ 2003-08-11 2:08 ` Rob Landley 2003-08-11 15:29 ` Pavel Machek 0 siblings, 1 reply; 10+ messages in thread From: Rob Landley @ 2003-08-11 2:08 UTC (permalink / raw) To: Måns Rullgård, linux-kernel; +Cc: Pavel Machek On Wednesday 06 August 2003 09:16, Måns Rullgård wrote: > Pavel Machek <pavel@ucw.cz> writes: > >> > > Okay. I hadn't tried it yet. I'll happily take up the barrow for you > >> > > and push it to Pavel and Linus with the rest, if you like. > >> > > >> > Don't even think about that. > >> > > >> > It is not safe to run userspace *before* doing resume. You don't want > >> > to see problems this would bring in. Forget it. > >> > >> so how do you resume from a partition on a device mapper volume? > >> > >> (and yes I basically agree with your sentiment though) > > > > I know very little about DM, its very well possible that resume from > > it is not supported. > > Since DM requires some userspace program to set up the mappings, it > seems to me that it wouldn't work to resume from a DM volume. I'd > much appreciate if it would work, somehow. Er, query: At some point in the vague nebulous future, after initrd has become initramfs, the partition detection code is scheduled to be ripped out, correct? And replaced with a userspace thing run out of initrd ala hotplug and udev and all that? So at that point, it's not just device mapper that's going to need something else to run in userspace to attach block devices to partitions. Everything will. So are you saying that swsusp is a short-term thing that will be dropped in 2.8 because it can't be made to work? Or that we WILL have to deal with this at some point, just not yet? Rob ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Swsusp-devel] Re: [PATCH] Allow initrd_load() before software_resume() (version 2) 2003-08-11 2:08 ` Rob Landley @ 2003-08-11 15:29 ` Pavel Machek 0 siblings, 0 replies; 10+ messages in thread From: Pavel Machek @ 2003-08-11 15:29 UTC (permalink / raw) To: Rob Landley; +Cc: M?ns Rullg?rd, linux-kernel, Pavel Machek Hi! > > >> > > Okay. I hadn't tried it yet. I'll happily take up the barrow for you > > >> > > and push it to Pavel and Linus with the rest, if you like. > > >> > > > >> > Don't even think about that. > > >> > > > >> > It is not safe to run userspace *before* doing resume. You don't want > > >> > to see problems this would bring in. Forget it. > > >> > > >> so how do you resume from a partition on a device mapper volume? > > >> > > >> (and yes I basically agree with your sentiment though) > > > > > > I know very little about DM, its very well possible that resume from > > > it is not supported. > > > > Since DM requires some userspace program to set up the mappings, it > > seems to me that it wouldn't work to resume from a DM volume. I'd > > much appreciate if it would work, somehow. > > Er, query: > > At some point in the vague nebulous future, after initrd has become initramfs, > the partition detection code is scheduled to be ripped out, correct? And > replaced with a userspace thing run out of initrd ala hotplug and udev and > all that? > > So at that point, it's not just device mapper that's going to need something > else to run in userspace to attach block devices to partitions. Everything > will. > > So are you saying that swsusp is a short-term thing that will be dropped in > 2.8 because it can't be made to work? Or that we WILL have to deal with this > at some point, just not yet? At that point we'll have to carefully audit all userland code that can run before software resume. Pavel -- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-08-11 15:29 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-08-01 0:29 [PATCH] Allow initrd_load() before software_resume() Pascal Brisset 2003-08-01 1:18 ` Nigel Cunningham 2003-08-01 10:32 ` [PATCH] Allow initrd_load() before software_resume() (version 2) Pascal Brisset 2003-08-01 10:41 ` [Swsusp-devel] " Nigel Cunningham 2003-08-06 11:30 ` Pavel Machek 2003-08-06 11:47 ` Arjan van de Ven 2003-08-06 12:57 ` Pavel Machek 2003-08-06 13:16 ` Måns Rullgård 2003-08-11 2:08 ` Rob Landley 2003-08-11 15:29 ` Pavel Machek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).