Skip to content

btrfs: add send/receive support for reading/writing compressed data

Omar Sandoval linux-btrfs 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v15 Latest7 patches 7 repliesIn review
  2. v147 patches 11 repliesSuperseded
  3. v1317 patches 5 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v1217 patches22 repliesSuperseded
v1114 patches22 repliesSuperseded
v1014 patches19 repliesSuperseded

Patches in v15 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7btrfs: send: remove unused send_ctx::{total,cmd}_send_sizefs/btrfs/send.c+0 -40 replies
2/7btrfs: send: explicitly number commands and attributesfs/btrfs/send.c fs/btrfs/send.h+54 -561 reply
3/7btrfs: add send stream v2 definitionsfs/btrfs/send.c fs/btrfs/send.h include/uapi/linux/btrfs.h+44 -56 replies
4/7btrfs: send: write larger chunks when using stream v2fs/btrfs/send.c+39 -80 replies
5/7btrfs: send: get send buffer pages for protocol v2fs/btrfs/send.c+23 -10 replies
6/7btrfs: send: send compressed extents with encoded writesfs/btrfs/ctree.h fs/btrfs/inode.c fs/btrfs/send.c+228 -250 replies
7/7btrfs: send: enable support for stream v2 and compressed writesfs/btrfs/send.c fs/btrfs/send.h include/uapi/linux/btrfs.h+8 -40 replies

Reviews trailers per patch

6 of 7 patches have a Reviewed-by or Acked-by.

PatchSweet Tea DorminyNikolay BorisovJosef Bacik
1/7R-b
2/7R-b
3/7R-b R-b
4/7R-b R-b
5/7
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v15 thread

Cover letter [PATCH v15 0/7] btrfs: add send/receive support for reading/writing compressed data

From: Omar Sandoval <[email protected]>

This series adds support for sending compressed data via Btrfs send and btrfs-progs support for sending/receiving compressed data and writing it with BTRFS_IOC_ENCODED_WRITE, which was previously merged into misc-next. See the previous posting for more details and benchmarks [1].

Patches 1 and 2 are cleanups for Btrfs send. Patches 3-5 prepare some protocol changes for send stream v2. Patch 6 implements compressed send. Patch 7 enables send stream v2 and compressed send in the send ioctl when requested.

Changes since v14 [2]:

- Added a comment about "put_data" to patch 4.
- Replaced hard-coded 2s with sizeof(__le16) in patch 4.
- Replaced patch 5 with new approach using vmalloc() + vmalloc_to_page() (instead of alloc_page() + vmap()) as suggested by Sweet Tea.
- Added Sweet Tea's reviewed-bys.
- Rebased on latest misc-next branch.

The btrfs-progs patches are unchanged since v14, so I'm not resending them this time.

1: https://lore.kernel.org/linux-btrfs/[email protected]/
2: https://lore.kernel.org/linux-btrfs/[email protected]/

Omar Sandoval (7):
btrfs: send: remove unused send_ctx::{total,cmd}_send_size
btrfs: send: explicitly number commands and attributes
btrfs: add send stream v2 definitions
btrfs: send: write larger chunks when using stream v2
btrfs: send: get send buffer pages for protocol v2
btrfs: send: send compressed extents with encoded writes
btrfs: send: enable support for stream v2 and compressed writes

 fs/btrfs/ctree.h           |   6 +
 fs/btrfs/inode.c           |  13 +-
 fs/btrfs/send.c            | 320 +++++++++++++++++++++++++++++++++----
 fs/btrfs/send.h            | 142 +++++++++-------
 include/uapi/linux/btrfs.h |  10 +-
 5 files changed, 392 insertions(+), 99 deletions(-)
Signature · 1 line
2.35.1