lkml.org 
[lkml]   [2008]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: no way to swapoff a deleted swap file?
Date
David Newall <davidn@davidnewall.com> wrote:
> Hugh Dickins wrote:
>> On Thu, 16 Oct 2008, Peter Zijlstra wrote:

>>> On Wed, 2008-10-15 at 17:21 -0300, Peter Cordes wrote:
>>>
>>>> I unlinked a swapfile without realizing I was still swapping on it.

[...]

> Me too. The kernel shouldn't protect the administrator against all
> possible mistakes; and this mistake is one of them. Besides, who's to
> say it's always a mistake? Somebody might want their swap file to have
> zero links.

Somebody might want their swapfiles to have zero links, _and_ the possibility
of doing swapoff. If you can do it by keeping some fds open to let
/proc/pid/fd point to the files, I think it's OK.



\
 
 \ /
  Last update: 2008-10-17 10:13    [W:0.051 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site