On Mon, 23 Apr 2007 23:34:58 +0200
"Rafael J. Wysocki" <[EMAIL PROTECTED]> wrote:

> On Monday, 23 April 2007 21:30, Tim Dijkstra wrote:
> > On Sun, 22 Apr 2007 23:22:30 +0200
> > "Rafael J. Wysocki" <[EMAIL PROTECTED]> wrote:
> > 
> > > On Sunday, 22 April 2007 22:06, Tim Dijkstra wrote:
> > > > On Sun, 22 Apr 2007 21:18:46 +0200
> > > > "Rafael J. Wysocki" <[EMAIL PROTECTED]> wrote:
> > > > 
> > > > > 
> > > > > I think we have to debug the swap-file-on-LVM case more thoroughly.
> > > > 
> > > > OK, I've tried printing out /dev/resume_device + offset in mark_swap.
> > > > Does the following seem reasonable?
> > > > 
> > > > 
> > > >                 char ff[100];
> > > >                 lseek(fd, shift, SEEK_SET);
> > > >                 read(fd,ff,80);
> > > >                 printf("The header (shift %u): %80s\n", shift, ff);
> > > 
> > > Yes, it does.
> > > 
> > > > It prints nothing ...
> > > 
> > > I thought it would.
> > > 
> > > Still, swap-offset doesn't fail, so it evidently is able to find the swap
> > > signature in your file.
> > 
> > > Can you hack swap-offset.c so that it prints stat.st_rdev after calling 
> > > fstat()
> > > and run it on your swap file, then hack suspend.c so that it prints blkdev
> > > in set_swap_file() and compare these two things?
> > 
> > stat.st_rdev == 0, but I think that's logical, because the swap _file_ is 
> > not a
> > device file.
> > stat.st_dev == 64773 
> > 
> > Which is also the value of blkdev in suspend.
> 
> And which is strange, because s2disk uses stat.st_rdev .
> 
> Something fishy is going on here ...

I don't know. stat.st_rdev in suspend.c comes from a stat() on
resume_dev_name and there I've put the name of the device containing
the swap file. That seemed to be the reasonable thing to do...

grts Tim

Attachment: signature.asc
Description: PGP signature

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Suspend-devel mailing list
Suspend-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/suspend-devel

Reply via email to