linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Omar Sandoval <osandov@osandov.com>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org
Subject: Re: [PATCH v7 2/6] mm: export add_swap_extent()
Date: Wed, 19 Sep 2018 14:43:31 -0400	[thread overview]
Message-ID: <20180919184331.GA20181@cmpxchg.org> (raw)
In-Reply-To: <20180919182800.GK479@vader>

On Wed, Sep 19, 2018 at 11:28:00AM -0700, Omar Sandoval wrote:
> On Wed, Sep 19, 2018 at 02:09:09PM -0400, Johannes Weiner wrote:
> > On Tue, Sep 11, 2018 at 03:34:45PM -0700, Omar Sandoval wrote:
> > > From: Omar Sandoval <osandov@fb.com>
> > > 
> > > Btrfs will need this for swap file support.
> > > 
> > > Signed-off-by: Omar Sandoval <osandov@fb.com>
> > 
> > That looks reasonable. After reading the last patch, it's somewhat
> > understandable why you cannot simply implemnet ->bmap and use the
> > generic activation code. But it would be good to explain the reason(s)
> > for why you can't here briefly to justify this patch.
> 
> I'll rewrite it to:
> 
> Btrfs currently does not support swap files because swap's use of bmap
> does not work with copy-on-write and multiple devices. See 35054394c4b3
> ("Btrfs: stop providing a bmap operation to avoid swapfile
> corruptions"). However, the swap code has a mechanism for the filesystem
> to manually add swap extents using add_swap_extent() from the
> ->swap_activate() aop. iomap has done this since 67482129cdab ("iomap:
> add a swapfile activation function"). Btrfs will do the same in a later
> patch, so export add_swap_extent().

That explains it perfectly. Thanks!

  reply	other threads:[~2018-09-20  0:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 22:34 [PATCH v7 0/6] Btrfs: implement swap file support Omar Sandoval
2018-09-11 22:34 ` [PATCH v7 1/6] mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS Omar Sandoval
2018-09-19 18:02   ` Johannes Weiner
2018-09-19 18:12     ` Omar Sandoval
2018-09-19 18:41       ` Johannes Weiner
2018-10-12 20:59   ` Andrew Morton
2018-10-16 10:20     ` David Sterba
2018-09-11 22:34 ` [PATCH v7 2/6] mm: export add_swap_extent() Omar Sandoval
2018-09-19 18:09   ` Johannes Weiner
2018-09-19 18:28     ` Omar Sandoval
2018-09-19 18:43       ` Johannes Weiner [this message]
2018-10-12 20:59   ` Andrew Morton
2018-09-11 22:34 ` [PATCH v7 3/6] vfs: update swap_{,de}activate documentation Omar Sandoval
2018-09-11 22:34 ` [PATCH v7 4/6] Btrfs: prevent ioctls from interfering with a swap file Omar Sandoval
2018-09-11 22:34 ` [PATCH v7 5/6] Btrfs: rename get_chunk_map() and make it non-static Omar Sandoval
2018-09-11 22:34 ` [PATCH v7 6/6] Btrfs: support swap files Omar Sandoval
2018-09-19 17:29 ` [PATCH v7 0/6] Btrfs: implement swap file support Omar Sandoval

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=20180919184331.GA20181@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=osandov@osandov.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).