[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Please How do I calculate the offset of a file within a ext3 partition

On Jul 23, 2007  14:17 -0500, William Tambe wrote:
> Thank you for warning me, I am already using a specific file as my swap, 
> so I had already done mkswap on it.
> I only wanted to be able suspend on it and resume from it using swsusp.
> To do that I needed to give to the kernel as arguments the following:
> resume=<swap_file_partition> resume_offset=<swap_file_header_offset>

This is in fact very dangerous (I think, though I'm no swsusp user).
There is no guarantee at all that the swap file is contiguous on disk.

If it isn't working at the level of a regular file (at which point it
could just use ->bmap() to find this information itself) then it is
likely expecting some contigous number of blocks and it may clobber
your filesystem.

Cheers, Andreas
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]