All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Mike Fedyk <mfedyk@matchmail.com>
Cc: hugh@veritas.com, marcel@kriminell.com, linux-kernel@vger.kernel.org
Subject: Re: 2.6.1: kernel BUG at mm/swapfile.c:806
Date: Fri, 16 Jan 2004 10:43:10 -0800	[thread overview]
Message-ID: <20040116104310.0a5e70cd.akpm@osdl.org> (raw)
In-Reply-To: <20040116182915.GL1748@srv-lnx2600.matchmail.com>

Mike Fedyk <mfedyk@matchmail.com> wrote:
>
> On Fri, Jan 16, 2004 at 05:05:55PM +0000, Hugh Dickins wrote:
> > On Fri, 16 Jan 2004, marcel cotta wrote:
> > > i just tried to less it - the process went right into D state :p
> > 
> > That sounds like an issue that came up a month or two back: seems that
> > sys_swapon intentionally leaves a semaphore down on a swapfile, until
> > sys_swapoff.  I don't like that at all!  The noble reason was to stop
> > that file from being deleted or truncated while in use for swap,
> > but perhaps we can devise a better way to achieve that sometime -
> > set S_IMMUTABLE?
> 
> Can't the kernel just keep a reference to the inode while it is used for
> swap, and let it unlink after swapoff (and all other refs are gone) using
> normal unix semantics? 

Unlink is not the problem.  The problem is truncation.  swapon holds i_sem
to prevent people from adding or removing blocks while the swapfile is in
use.


      reply	other threads:[~2004-01-16 18:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-16  2:51 2.6.1: kernel BUG at mm/swapfile.c:806 marcel cotta
2004-01-16  4:34 ` Andrew Morton
     [not found]   ` <40076B62.9000108@kriminell.com>
     [not found]     ` <20040115204302.2909af64.akpm@osdl.org>
2004-01-16  5:21       ` marcel cotta
2004-01-16  5:22       ` marcel cotta
2004-01-16  6:43         ` marcel cotta
2004-01-16 17:05           ` Hugh Dickins
2004-01-16 18:29             ` Mike Fedyk
2004-01-16 18:43               ` Andrew Morton [this message]

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=20040116104310.0a5e70cd.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@kriminell.com \
    --cc=mfedyk@matchmail.com \
    /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.