Re: Fix SWSUSP & !SWAP

Nigel Cunningham
2003-04-24T11:14:22Z

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.

> swapfiles are not journalled - the swap a_ops write direct to the swapfile's
> blocks with submit_bio(). Journal replay wouldn't touch the swapfile.
>
> I can see that locating the swapfile for the resume-time swapon could be a
> problem, but the corruption thing still escapes me.

Regards,

Nigel

--
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

Be diligent to present yourself approved to God as a workman who does
not need to be ashamed, handling accurately the word of truth.
-- 2 Timothy 2:14, NASB.