On Thursday, 9 November 2006 22:30, Luca Tettamanti wrote: > On 11/9/06, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > > I think that the swap header need not be continuous. This actually also > > follows from the sys_swapon() code which reads one page from the file > > using its mapping. It looks like setup_swap_extents() omits the first > > continuous PAGE_SIZE "block" just in case it contains the header, but > > the swap-handling will work even if it doesn't. > > > > However, in case this happens, swsusp and s2disk/s2both won't be > > able to use the swap file for the suspend, because swap_type_of() will > > fail. > > > > Now if that really is what happens (could you please verify with your > > setup?), > > It seems so. What I see is the following: > > 0x0000-0x1000: header, not contiguous > 0x1000-0x2000: nothing, this page is left empty > 0x2000-EOF: swap data > > > it would be nice if your program detected such situations and informed the > > user that the swap file could not be used. > > Basically: > - find the first block of the swapfile > - check that there's a contiguous PAGE_SIZE cluster > - check signature
... and print the number if everything fits. Rafael -- 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