lkml.org 
[lkml]   [1997]   [Jul]   [28]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 27 Jul 1997 22:08:29 +0200
FromPavel Machek <>
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    [from the cache]
©2003-2008