lkml.org 
[lkml]   [1997]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Does linux locks swap file?
    On Sun, 19 Jan 1997, Boris Tobotras wrote:

    > If I've understood sys_swapon() correctly, there is no increment
    > of inode's usage counter if swapping goes to regular file. If this
    > assumption is correct, it is definitely a bug. If it is wrong, please
    > tell me why :)

    No, sys_swapon is fine, because namei() increments the inode's i_count.

    > This was inspired by report of someone who was able to crash
    > system just by removing active swap file.

    Hmm... strange. I'm unable to replicate this behavior, and the space used
    by the swapfile does _not_ get deallocated when the file is unlinked.
    However, there is a (small) problem here: since the swapoff procedure is
    filename-based and there is no way to reference an unlinked file by
    filename, you can't swapoff that file.

    Correcting this problem implies changing the parameters for sys_swapoff,
    which I definitely don't want to do.


    Ionut

    --
    It is better to keep your mouth shut and be thought a fool,
    than to open it and remove all doubt.


    \
     
     \ /
      Last update: 2005-03-22 13:38    [W:0.016 / U:59.784 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site