lkml.org 
[lkml]   [2008]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectno way to swapoff a deleted swap file?
 I unlinked a swapfile without realizing I was still swapping on it.
Now my /proc/swaps looks like this:
Filename Type Size Used Priority
/var/tmp/EXP/cache/swap/1\040(deleted) file 1288644 1448 -1
/var/tmp/EXP/cache/swap/2\040(deleted) file 1433368 0 -2

AFAICT, there's nothing I can pass to swapoff(2) that will make the
kernel let go of them. If that's the case, please consider this a
feature request for a way to do this. Now I'm going to have to reboot
before I can mkfs that partition.

If kswapd0 had a fd open on the swap files, swapoff /proc/$PID/fd/3
could possibly work. But it looks like the files are open but with no
user-space accessable file descriptors to them. Which makes sense,
except for this case.

thanks, and happy hacking,

--
#define X(x,y) x##y
Peter Cordes ; e-mail: X(peter@cor , des.ca)

"The gods confound the man who first found out how to distinguish the hours!
Confound him, too, who in this place set up a sundial, to cut and hack
my day so wretchedly into small pieces!" -- Plautus, 200 BC


\
 
 \ /
  Last update: 2008-10-15 22:55    [W:0.048 / U:1.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site