On Monday, 30 October 2006 09:37, Stefan Seyfried wrote:
> On Mon, Oct 30, 2006 at 12:20:50AM +0100, Rafael J. Wysocki wrote:
> > Hi,
> > 
> > Unfortunately in its current form s2disk causes the access time of the 
> > resume
> > device special file to be updated after the suspend image has been created,
> > which is potentially dangerous.
> > 
> > We can fix this by mounting a tmpfs, creating the special device file on it
> > and using this file for the suspend, which is done in the appended patch.
> 
> But the access time of the device on the tmpfs will also be corrupt, and the
> kernel may go "boom" when unmounting that tmpfs (just theoretical, but maybe
> the cure is worse than the disease)?

No.  tmpfs is in RAM. ;-)

>  
> > ---
> >  suspend.c |   63 
> > +++++++++++++++++++++++++++++++++++++++++++++-----------------
> >  1 file changed, 46 insertions(+), 17 deletions(-)
> > 
> > Index: suspend/suspend.c
> > ===================================================================
> > --- suspend.orig/suspend.c
> > +++ suspend/suspend.c
> 
> > @@ -1230,23 +1239,43 @@ int main(int argc, char *argv[])
> >             return ret;
> >     }
> >  
> > +   sprintf(chroot_path, "/proc/%d", getpid());
> > +   if (mount("none", chroot_path, "tmpfs", 0, NULL)) {
> > +           fprintf(stderr, "suspend: Could not mount tmpfs on %s\n", 
> > chroot_path);
> > +           return errno;
> 
> you might return the errno of the failed fprintf here :-).

Yes, thanks.


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

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Suspend-devel mailing list
Suspend-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/suspend-devel

Reply via email to