All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Cordes <peter@cordes.ca>
To: linux-kernel@vger.kernel.org
Subject: no way to swapoff a deleted swap file?
Date: Wed, 15 Oct 2008 17:21:41 -0300	[thread overview]
Message-ID: <20081015202141.GX26067@cordes.ca> (raw)

 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

             reply	other threads:[~2008-10-15 20:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-15 20:21 Peter Cordes [this message]
2008-10-16  8:28 ` no way to swapoff a deleted swap file? Peter Zijlstra
2008-10-16  8:28   ` Peter Zijlstra
2008-10-16 22:38   ` Hugh Dickins
2008-10-16 22:38     ` Hugh Dickins
2008-10-17  6:28     ` David Newall
2008-10-17  6:28       ` David Newall
     [not found] <bnlDw-5vQ-7@gated-at.bofh.it>
     [not found] ` <bnwpg-2EA-17@gated-at.bofh.it>
     [not found]   ` <bnJFK-3bu-7@gated-at.bofh.it>
2008-10-16 23:43     ` Bodo Eggert
2008-10-16 23:43       ` Bodo Eggert
2008-10-16 23:43     ` Bodo Eggert
     [not found]     ` <bnR0A-4kq-1@gated-at.bofh.it>
2008-10-17  8:20       ` Bodo Eggert
2008-10-17  8:20       ` Bodo Eggert
2008-10-17  8:20         ` Bodo Eggert
2008-10-17 12:17         ` Hugh Dickins
2008-10-17 12:17           ` Hugh Dickins
2008-10-17 12:36           ` David Newall
2008-10-17 12:36             ` David Newall
2008-10-17 22:42           ` Bodo Eggert
2008-10-17 22:42             ` Bodo Eggert
2008-10-18  0:31           ` Peter Cordes
2008-10-18  0:31             ` Peter Cordes
2008-10-18  5:18             ` Willy Tarreau
2008-10-18  5:18               ` Willy Tarreau
2008-10-18 20:45               ` Hugh Dickins
2008-10-18 20:45                 ` Hugh Dickins
2008-10-18 20:49                 ` Christoph Hellwig
2008-10-18 20:49                   ` Christoph Hellwig
2008-10-18 20:56                   ` Willy Tarreau
2008-10-18 20:56                     ` Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081015202141.GX26067@cordes.ca \
    --to=peter@cordes.ca \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.