lkml.org 
[lkml]   [1997]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectswap oddities in 2.1.4[567]
Hi!

Something is wrong with /proc/swaps...

pavel@Elf:~$ cat /proc/swaps
Filename Type Size Used
Priority
hda3 file 22172 28 -1
~~~~ partition should be written
here... I really do not call files 'hda3'. Also, swapoff -a seems not
to work... And it used to.

Under 2.1.42 it worked. I do not remember 2.1.43, but I think that
under 2.1.45 it did not... [Never tried 2.1.44 :-) ]

Hmm, if you look at code

if (ptr->swap_file)
len += sprintf(buf + len, "file\t\t");
else
len += sprintf(buf + len,
"partition\t");

Where name is printed as

ptr->swap_file->d_name.name

so swap_file can never be NULL (you would see oops).

BTW why to print swapfile's type. If it wrote full path, it would be
possible to ls -l `cat /proc/swaps` and see that... And btw
'partition' is pretty misleading, also. I may also want to swap on
/dev/hda, or even /dev/nd0 - and you would not call _that_ partition.

Pavel
--
I'm really pavel@atrey.karlin.mff.cuni.cz. Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).

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