lkml.org 
[lkml]   [2003]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Fix SWSUSP & !SWAP
Date
Followup to:  <Pine.GSO.4.21.0304241335210.19942-100000@vervain.sonytel.be>
By author: Geert Uytterhoeven <geert@linux-m68k.org>
In newsgroup: linux.dev.kernel
>
> On Thu, 24 Apr 2003, Nigel Cunningham wrote:
> > On Thu, 2003-04-24 at 21:46, Andrew Morton wrote:
> > > > > Sorry, I still don't get it. Go through the steps for me:
> > > > >
> > > > > 1) suspend writes pages to disk
> > > > >
> > > > > 2) machine is shutdown
> > > > >
> > > > > 3) restart, journal replay
> >
> > Corruption comes here. The journal reply tidies things up that shouldn't
> > be tidied up. They shouldn't be tidied up because once we reload the
> > image, things should be in the same state as prior to suspend. If replay
> > frees a block (thinking it wasn't properly linked or something similar),
> > it introduces corruption.
>
> This has nothing to do with using a swapfile.
>
> But if you resume from swsusp, you don't really `mount' all file systems. They
> are implicitly mounted because they were mounted before the suspend operation.
>

Shouldn't we be syncing them all before the suspend anyway, to
minimize corruption in case the user chooses to mount the filesystem
*without* resuming (think a dual-boot configuration.) This would be
another application for the "supersync" operation that was discussed
at OLS 2002 -- a need for an operation which not only flushes all
blocks to disk but also forces the journal to be replayed and
truncated.

-hpa

--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.162 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site