From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261907AbTDXIx3 (ORCPT ); Thu, 24 Apr 2003 04:53:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261916AbTDXIx3 (ORCPT ); Thu, 24 Apr 2003 04:53:29 -0400 Received: from mail.jlokier.co.uk ([81.29.64.88]:2952 "EHLO mail.jlokier.co.uk") by vger.kernel.org with ESMTP id S261907AbTDXIx0 (ORCPT ); Thu, 24 Apr 2003 04:53:26 -0400 Date: Thu, 24 Apr 2003 10:05:19 +0100 From: Jamie Lokier To: Pavel Machek Cc: Andrew Morton , mbligh@aracnet.com, ncunningham@clear.net.nz, gigerstyle@gmx.ch, geert@linux-m68k.org, linux-kernel@vger.kernel.org Subject: Re: Fix SWSUSP & !SWAP Message-ID: <20030424090519.GI28253@mail.jlokier.co.uk> References: <1051136725.4439.5.camel@laptop-linux> <1584040000.1051140524@flay> <20030423235820.GB32577@atrey.karlin.mff.cuni.cz> <20030423170759.2b4e6294.akpm@digeo.com> <20030424002544.GC2925@elf.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030424002544.GC2925@elf.ucw.cz> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Pavel Machek wrote: > Swapfile does not work, because even readonly mount wants to replay > logs, and that'd be disk corruption. I don't understand. During suspend, you just need a list of blocks to write to from the swapfile. You can get that list before starting the actual suspend, so that writing doesn't imply any filesystem activity. When you're resuming, you just need a list of which disk blocks to resume from. Can't that list be stored in a few blocks of the swapfile itself, with the only critical parameter being the first block number to resume from? (A bit like LILO has a map file containing the list of blocks which contain the kernel to boot.) -- Jamie