From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Dave Jones <davej@redhat.com>
Cc: Pavel Machek <pavel@ucw.cz>, Andrew Morton <akpm@osdl.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -mm 5/6] mm: Print first block offset for swap areas
Date: Fri, 22 Sep 2006 00:46:31 +0200 [thread overview]
Message-ID: <200609220046.32233.rjw@sisk.pl> (raw)
In-Reply-To: <20060921221058.GM26683@redhat.com>
On Friday, 22 September 2006 00:10, Dave Jones wrote:
> On Thu, Sep 21, 2006 at 11:32:53PM +0200, Pavel Machek wrote:
> > On Wed 2006-09-20 21:54:38, Rafael J. Wysocki wrote:
> > > In order to use a swap file with swsusp we need to know the offset at which
> > > its swap header is located. However, the swap header is always located in the
> > > first block of the swap file and it's quite easy to make sys_swapon() print
> > > the offset of the swap file's (or swap partition's) first block.
> > >
> > > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > ACK.
> >
> > (main point of this is that it changes user-visible printk, but that's
> > probably okay, and way better than changing /proc files...)
>
> As a user-interface, "read the number from dmesg that swapon printk'd
> and add that to your boot command line" is pretty damned awful.
Yes, it is. However, the only solution I've invented so far is to print
that number in /proc/swaps, but that would be changing the
kernel-user interface quite badly ...
> It means that it's next to impossible for a distro installer to support
> suspend-to-swapfile.
Not necessarily. After creating the swap file the installer can bmap it
and figure out the offset from there (it will require some rescaling, but the
code for that is in mm/swapfile.c).
> It's also incredibly fragile to rely on that file always remaining in that
> part of the disk.
Well, if you don't delete it, it'll stay there. ;-)
The entire problem is we can't use file names during resume, because we can't
mount filesystems at that time, so we need to represent the swap header's
location in a filesystem-independent way.
Greetings,
Rafael
--
You never change things by fighting the existing reality.
R. Buckminster Fuller
next prev parent reply other threads:[~2006-09-21 22:43 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-20 19:20 [PATCH -mm 0/6] swsusp: Add support for swap files Rafael J. Wysocki
2006-09-20 19:31 ` [PATCH -mm 1/6] swsusp: Use device and offset to intentify swap areas Rafael J. Wysocki
2006-09-21 21:27 ` Pavel Machek
2006-09-20 19:34 ` [PATCH -mm 2/6] swsusp: Rearrange swap-handling code Rafael J. Wysocki
2006-09-21 21:28 ` Pavel Machek
2006-09-20 19:41 ` [PATCH -mm 3/6] swsusp: Use block device offsets to identify swap locations Rafael J. Wysocki
2006-09-21 21:30 ` Pavel Machek
2006-09-21 22:21 ` Rafael J. Wysocki
2006-09-20 19:46 ` [PATCH -mm 4/6] swsusp: Add resume_offset command line parameter Rafael J. Wysocki
2006-09-21 21:31 ` Pavel Machek
2006-09-21 22:18 ` Rafael J. Wysocki
2006-09-22 13:34 ` Pavel Machek
2006-09-20 19:54 ` [PATCH -mm 5/6] mm: Print first block offset for swap areas Rafael J. Wysocki
2006-09-21 21:32 ` Pavel Machek
2006-09-21 22:10 ` Dave Jones
2006-09-21 22:46 ` Rafael J. Wysocki [this message]
2006-09-21 23:58 ` Jason Lunz
2006-09-22 10:57 ` Rafael J. Wysocki
2006-09-22 14:13 ` Jason Lunz
2006-09-22 14:18 ` Pavel Machek
2006-09-22 14:35 ` Jason Lunz
2006-09-22 14:37 ` Pavel Machek
2006-09-22 14:32 ` Rafael J. Wysocki
2006-09-22 14:33 ` Pavel Machek
2006-09-20 20:01 ` [PATCH -mm 6/6] swsusp: Document support for swap files Rafael J. Wysocki
2006-09-21 21:33 ` Pavel Machek
2006-09-22 1:01 ` [PATCH -mm 0/6] swsusp: Add " Nigel Cunningham
2006-09-22 5:23 ` Pavel Machek
2006-09-22 11:28 ` Rafael J. Wysocki
2006-09-22 22:18 ` Nigel Cunningham
2006-09-23 22:18 ` Rafael J. Wysocki
2006-09-23 22:49 ` Nigel Cunningham
2006-09-23 22:59 ` Pavel Machek
2006-09-23 23:24 ` Nigel Cunningham
-- strict thread matches above, loose matches on Subject: below --
2006-09-23 9:57 [PATCH -mm] " Rafael J. Wysocki
2006-09-23 10:10 ` [PATCH -mm 5/6] mm: Print first block offset for swap areas Rafael J. Wysocki
2006-09-26 19:39 ` Andrew Morton
2006-09-26 20:13 ` Rafael J. Wysocki
2006-09-26 20:49 ` Andrew Morton
2006-09-26 21:04 ` 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=200609220046.32233.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@osdl.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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