Re: [Suspend-devel] Fibmap

2006-11-12 Thread Pavel Machek
Hi! > > > I think we can do one more thing. Namely, if the header is not > > > continuous, > > > the kernel will leave the first continuous PAGE_SIZE "block" of the swap > > > file > > > untouched. So, why don't we copy the swap signature into that "block", > > > to the place in which it would

Re: [Suspend-devel] Fibmap

2006-11-12 Thread Rafael J. Wysocki
On Sunday, 12 November 2006 01:00, Luca Tettamanti wrote: > On 11/11/06, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > > Hi, > > > > On Saturday, 11 November 2006 22:04, Pavel Machek wrote: > > > Hi! > > > > > > > > Yeah :) > > > > > > > > Looks good, one small comment below. > > > > > > > > _Howe

Re: [Suspend-devel] Fibmap

2006-11-12 Thread Rafael J. Wysocki
On Sunday, 12 November 2006 01:28, Luca Tettamanti wrote: > On 11/12/06, Luca Tettamanti <[EMAIL PROTECTED]> wrote: > > But AFAICS the offset is only needed for swap_type_of(); instead using > > the extents it may be possible to use somehow the 'struct file' > > (f_path? sounds interesting :D) for

Re: [Suspend-devel] Fibmap

2006-11-11 Thread Luca Tettamanti
On 11/12/06, Luca Tettamanti <[EMAIL PROTECTED]> wrote: > But AFAICS the offset is only needed for swap_type_of(); instead using > the extents it may be possible to use somehow the 'struct file' > (f_path? sounds interesting :D) for swapfiles. Ok, I think you can find the swapfile by matching swap

Re: [Suspend-devel] Fibmap

2006-11-11 Thread Luca Tettamanti
On 11/11/06, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > Hi, > > On Saturday, 11 November 2006 22:04, Pavel Machek wrote: > > Hi! > > > > > > Yeah :) > > > > > > Looks good, one small comment below. > > > > > > _However_, > > > > > > I think we can do one more thing. Namely, if the header is no

Re: [Suspend-devel] Fibmap

2006-11-11 Thread Rafael J. Wysocki
Hi, On Saturday, 11 November 2006 22:04, Pavel Machek wrote: > Hi! > > > > Yeah :) > > > > Looks good, one small comment below. > > > > _However_, > > > > I think we can do one more thing. Namely, if the header is not continuous, > > the kernel will leave the first continuous PAGE_SIZE "block

Re: [Suspend-devel] Fibmap

2006-11-11 Thread Pavel Machek
Hi! > > Yeah :) > > Looks good, one small comment below. > > _However_, > > I think we can do one more thing. Namely, if the header is not continuous, > the kernel will leave the first continuous PAGE_SIZE "block" of the swap file > untouched. So, why don't we copy the swap signature into tha

Re: [Suspend-devel] Fibmap

2006-11-10 Thread Rafael J. Wysocki
On Friday, 10 November 2006 18:59, Luca Tettamanti wrote: > Il Thu, Nov 09, 2006 at 10:35:13PM +0100, Rafael J. Wysocki ha scritto: > > 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 nee

Re: [Suspend-devel] Fibmap

2006-11-10 Thread Luca Tettamanti
Il Thu, Nov 09, 2006 at 10:35:13PM +0100, Rafael J. Wysocki ha scritto: > 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 sy

Re: [Suspend-devel] Fibmap

2006-11-09 Thread Rafael J. Wysocki
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 loo

Re: [Suspend-devel] Fibmap

2006-11-09 Thread Luca Tettamanti
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

Re: [Suspend-devel] Fibmap

2006-11-09 Thread Rafael J. Wysocki
On Thursday, 9 November 2006 17:46, Luca wrote: > Il Thu, Nov 09, 2006 at 12:38:51AM +0100, Rafael J. Wysocki ha scritto: > > On Thursday, 9 November 2006 00:32, Luca Tettamanti wrote: > > > On 11/8/06, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > > > > > On Wednesday, 8 Novemb

Re: [Suspend-devel] Fibmap

2006-11-09 Thread Luca
Il Thu, Nov 09, 2006 at 12:38:51AM +0100, Rafael J. Wysocki ha scritto: > On Thursday, 9 November 2006 00:32, Luca Tettamanti wrote: > > On 11/8/06, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > On Wednesday, 8 November 2006 18:58, Luca wrote: > > > > I've been working on a sm

Re: [Suspend-devel] Fibmap

2006-11-08 Thread Rafael J. Wysocki
On Thursday, 9 November 2006 00:32, Luca Tettamanti wrote: > On 11/8/06, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > > Hi, > > > > On Wednesday, 8 November 2006 18:58, Luca wrote: > > > I've been working on a small program to find the first valid block of a > > > swapfile. If I understand it cor

Re: [Suspend-devel] Fibmap

2006-11-08 Thread Luca Tettamanti
On 11/8/06, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > Hi, > > On Wednesday, 8 November 2006 18:58, Luca wrote: > > I've been working on a small program to find the first valid block of a > > swapfile. If I understand it correctly we need the first contiguos cluster > > of blocks (not counting

Re: [Suspend-devel] Fibmap

2006-11-08 Thread Rafael J. Wysocki
Hi, On Wednesday, 8 November 2006 18:58, Luca wrote: > I've been working on a small program to find the first valid block of a > swapfile. If I understand it correctly we need the first contiguos cluster > of blocks (not counting the header) which is at least PAGE_SIZE big and > the starting block