From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Nigel Cunningham <nigel@tuxonice.net>
Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH] PM / Hibernate: Modify signature used to mark swap
Date: Thu, 30 Sep 2010 00:02:03 +0200 [thread overview]
Message-ID: <201009300002.03412.rjw@sisk.pl> (raw)
In-Reply-To: <4CA3ADED.6090908@tuxonice.net>
On Wednesday, September 29, 2010, Nigel Cunningham wrote:
> Hi.
>
> On 30/09/10 07:13, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki<rjw@sisk.pl>
> > Subject: PM / Hibernate: Modify signature used to mark swap
> >
> > Since we are adding compression to the kernel's hibernate code,
> > change signature used by it to mark swap spaces, so that earlier
> > kernels don't attempt to restore compressed images they cannot
> > handle.
> >
> > Signed-off-by: Rafael J. Wysocki<rjw@sisk.pl>
> > ---
> > kernel/power/swap.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > Index: linux-2.6/kernel/power/swap.c
> > ===================================================================
> > --- linux-2.6.orig/kernel/power/swap.c
> > +++ linux-2.6/kernel/power/swap.c
> > @@ -29,7 +29,7 @@
> >
> > #include "power.h"
> >
> > -#define SWSUSP_SIG "S1SUSPEND"
> > +#define HIBERNATE_SIG "LINHIB0001"
> >
> > /*
> > * The swap map is a data structure used for keeping track of each page
> > @@ -195,7 +195,7 @@ static int mark_swapfiles(struct swap_ma
> > if (!memcmp("SWAP-SPACE",swsusp_header->sig, 10) ||
> > !memcmp("SWAPSPACE2",swsusp_header->sig, 10)) {
> > memcpy(swsusp_header->orig_sig,swsusp_header->sig, 10);
>
> if no compression
>
> > - memcpy(swsusp_header->sig,SWSUSP_SIG, 10);
>
> else
>
> > + memcpy(swsusp_header->sig, HIBERNATE_SIG, 10);
>
> ??
I thought about that, but we'll need to drop the old signature when the image
format changes (I think it will after your patch series) anyway. And the
benefit is not really worth it IMO (it only affects people using the in-kernel
hibernation on x86-64).
Thanks,
Rafael
next prev parent reply other threads:[~2010-09-29 22:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201009292313.23601.rjw@sisk.pl>
2010-09-29 21:21 ` [RFC][PATCH] PM / Hibernate: Modify signature used to mark swap Nigel Cunningham
[not found] ` <4CA3ADED.6090908@tuxonice.net>
2010-09-29 22:02 ` Rafael J. Wysocki [this message]
2010-10-02 20:44 ` Nigel Cunningham
2010-10-02 21:41 ` Rafael J. Wysocki
2010-10-04 17:56 ` Pavel Machek
2010-09-29 21:13 Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201009300002.03412.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=nigel@tuxonice.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox