Re: Fix SWSUSP & !SWAP

Pavel Machek (pavel@ucw.cz)
Thu, 24 Apr 2003 11:12:36 +0200


Hi!

> > > I'm curious. What does a swapfile solve that a swapdev does not? Either
> > > way you need to prealloc the case (either have a chunky file in a
> > > partition or a partition set aside) or you need to keep enough room
> > > avail to fit the file when it's needed.
> >
> > Nothing but further bloat in swsusp :> With a swapfile, we need to know
> > the location of the file (and be able to find it again when it changes,
> > and know how to find the next block in the file system - it might be
> > fragmented).
>
> That's because swsusp is using the mm/page_io.c functions for suspend, but
> is using the fs/buffer.c functions direct to the blockdev for resume.
>
> If you can use the swapper_space a_ops for both suspend and resume (say:
> "cleanup") then it will just work.

No, ext3 will be "unclean" during resume (you can't really unmount it
during suspend!) and r-o mounting of ext3 will replay journal and
cause data corruption.
Pavel

-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
-
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/