linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/6] Btrfs: implement swap file support
@ 2018-09-07  7:39 Omar Sandoval
  2018-09-07  7:39 ` [PATCH v6 1/6] mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS Omar Sandoval
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Omar Sandoval @ 2018-09-07  7:39 UTC (permalink / raw)
  To: linux-btrfs; +Cc: kernel-team, linux-mm

From: Omar Sandoval <osandov@fb.com>

Hi,

This series implements swap file support for Btrfs.

Compared to v5 [1], this is pretty much feature-complete. It now
supports:

- Balance (skips block groups containing an active swap file)
- Resize (error if trying to shrink past a block group containing an
  active swap file, allowed otherwise)
- Device delete/replace (as long as the device in question does not
  contain an active swap file)

This implementation Chris and I came up with is much cleaner than my
earlier ideas: instead of adding any counters to struct
btrfs_block_group_cache or struct btrfs_device, we just have a small
red-black tree of block groups and devices which contain an active
swapfile.

I updated the xfstests for this series [2] to test this new
functionality, and put it through the same tests as v5.

Based on v4.19-rc2, please take a look.

Thanks!

1: https://www.spinics.net/lists/linux-btrfs/msg81550.html
2: https://github.com/osandov/xfstests/tree/btrfs-swap

Omar Sandoval (6):
  mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS
  mm: export add_swap_extent()
  vfs: update swap_{,de}activate documentation
  Btrfs: prevent ioctls from interfering with a swap file
  Btrfs: rename get_chunk_map() and make it non-static
  Btrfs: support swap files

 Documentation/filesystems/Locking |  17 +-
 Documentation/filesystems/vfs.txt |  12 +-
 fs/btrfs/ctree.h                  |  24 +++
 fs/btrfs/dev-replace.c            |   8 +
 fs/btrfs/disk-io.c                |   4 +
 fs/btrfs/inode.c                  | 316 ++++++++++++++++++++++++++++++
 fs/btrfs/ioctl.c                  |  31 ++-
 fs/btrfs/relocation.c             |  18 +-
 fs/btrfs/volumes.c                |  71 +++++--
 fs/btrfs/volumes.h                |   9 +
 include/linux/swap.h              |  13 +-
 mm/page_io.c                      |   6 +-
 mm/swapfile.c                     |  14 +-
 13 files changed, 492 insertions(+), 51 deletions(-)

-- 
2.18.0

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-09-07 18:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-07  7:39 [PATCH v6 0/6] Btrfs: implement swap file support Omar Sandoval
2018-09-07  7:39 ` [PATCH v6 1/6] mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS Omar Sandoval
2018-09-07  7:39 ` [PATCH v6 2/6] mm: export add_swap_extent() Omar Sandoval
2018-09-07  7:39 ` [PATCH v6 3/6] vfs: update swap_{,de}activate documentation Omar Sandoval
2018-09-07  7:39 ` [PATCH v6 4/6] Btrfs: prevent ioctls from interfering with a swap file Omar Sandoval
2018-09-07  7:39 ` [PATCH v6 5/6] Btrfs: rename get_chunk_map() and make it non-static Omar Sandoval
2018-09-07  7:54   ` Nikolay Borisov
2018-09-07 10:26     ` David Sterba
2018-09-07  7:39 ` [PATCH v6 6/6] Btrfs: support swap files Omar Sandoval
2018-09-07  8:39   ` Nikolay Borisov
2018-09-07 18:04     ` Omar Sandoval
2018-09-07 18:17       ` Omar Sandoval

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).