public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: Dmitri Nikulin <dnikulin@gmail.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs and swap files on SSD's ?
Date: Tue, 20 Jan 2009 09:31:42 -0500	[thread overview]
Message-ID: <1232461902.15042.19.camel@think.oraclecorp.com> (raw)
In-Reply-To: <3a7f57190901200551s7e9ee262mc3720b5b1452b8dc@mail.gmail.com>

On Wed, 2009-01-21 at 00:51 +1100, Dmitri Nikulin wrote:
> On Wed, Jan 21, 2009 at 12:02 AM, Chris Mason <chris.mason@oracle.com> wrote:
> > There are patches to support swap over NFS that might make it safe to
> > use on btrfs. At any rate, it is a fixable problem.
> 
> FreeBSD has been able to run swap over NFS for as long as I can
> remember, what is different in Linux that makes it especially
> difficult?

There are two sides to this.  First is the part where writing to NFS can
cause memory allocations which can cause problems when you're trying to
swap so you can do memory allocations.  The swap over NFS patches add
code to deal with that.

The second is an implementation detail of the linux swap file code.  It
expects filesystems don't move blocks around, and takes a mapping of the
blocks in the FS once.

This doesn't work with btrfs because we do move blocks around all the
time.

-chris



  reply	other threads:[~2009-01-20 14:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-17  0:10 btrfs and swap files on SSD's ? Chris Samuel
2009-01-19 16:22 ` Chris Mason
2009-01-20 10:41   ` Kaspar Schleiser
2009-01-20 13:02     ` Chris Mason
2009-01-20 13:51       ` Dmitri Nikulin
2009-01-20 14:31         ` Chris Mason [this message]
2009-01-20 16:35           ` Anthony Roberts
2009-01-20 16:41             ` Chris Mason
2009-01-21  6:15         ` Andi Kleen

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=1232461902.15042.19.camel@think.oraclecorp.com \
    --to=chris.mason@oracle.com \
    --cc=dnikulin@gmail.com \
    --cc=linux-btrfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox