[lkml]   [1997]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Swap Files
> > I find this annoying: at shutdown, swapfiles are never turned off.
> > This keeps the partiton busy, and hence it needs to be fsck'ed at
> > next boot.
> >
> > Should something be put into the kernel shutdown to release all
> > swap files and umount all fs?
> This is a local configuration problem. I'm running kernel
> 2.1.17 + Debian 1.2 + sysvinit 2.6 and I don't have this
> problem.

I bet you don't use swap files! If so, then please explain what is wrong.
Try this yourself:
dd if=/dev/zero of=swap bs=1024 count=1028
mkswap swap
free ; swapon -v swap
free ; swapoff -a ; free
You'll then see what I mean - the swap file stays active.

An strace of "swapoff -a" shows that it is the problem, as it
only affects swap partitions and not swap files. IMHO, it should
affect swap files too - this may require a /proc entry listing
all swap sources and their types (so that a "new" swapoff could
read it, and turn off all swap sources. Or, the kernel system call
(I assume there already is one) could be expanded to handle this
special case (turning off all swap files).

Andrew E. Mileski
Linux Plug-and-Play Kernel Project
XFree86 Matrox Team

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