Re: Swap Files

W. Reilly Cooley (wcooley@navi.net)
Sat, 18 Jan 1997 23:42:00 -0800 (PST)


On Sat, 18 Jan 1997, Ion Badulescu wrote:

> Hi everyone,
>
> I know (from my own experience with modutils) that people are much more
> reluctant to get a new package via ftp than to look over a patch coming
> from linux-kernel. So here it is. :)
>
> The patch is against 2.0.28, but likely to go in any reasonably new kernel
> without any troubles (works with 2.1.21, too). It implements a /proc/swap
> entry (similar to /proc/mounts) that lists the partitions and files used
> for swapping.
>
> Again, a modified version of swapoff can be downloaded from
>
> ftp://moisil.wal.rhno.columbia.edu/pub/linux/mount-2.6a1.tar.gz
>
> Please give it a try, and let me know if there are any problems. Also, let
> me know if (and why) you think this feature does not belong in the kernel.
>
> Comments, flames, etc welcome. :-)
>
>
> Ionut
>
[PATCH CLIPPED FOR BREVITY]

Perhaps rather than modifying the kernel proper it would be easier to
mount swapfiles using the loop device, then a swapoff -a would (if, of
course, it were configured as such in fstab) indeed permit the fs to be
umounted at shutdown. If this were to become standard, then the swap
utils could be reduced to handling nothing but swap partitions, making
them all the more simple. It would, however, introduce some
incompatabilities between the versions of the swap utils and
configurations. Sorry, but I haven't tried this, as I don't use
swapfiles.

W. Reilly Cooley
----------------------------------------------------------------
wcooley@navi.net
http://www.navi.net/~wcooley

A horse walks into a bar and the bartender says, "Hey, why the long
face?"