Skip to content

btrfs-progs: receive: introduce new --clone-fallback option

Qu Wenruo linux-btrfs 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesNew
  2. v22 patches 5 repliesSuperseded
  3. v12 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- Add an overview of failed clone operations for --clone-fallback option

- Update doc words again

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs-progs: receive: fallback to buffered copy if clone failedDocumentation/btrfs-receive.asciidoc cmds/receive.c+90 -30 replies
2/2btrfs-progs: misc-tests: add test case for receive --clone-fallbacktests/common tests/misc-tests/049-receive-clone-fallback/test.sh+67 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchFilipe Manana
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] btrfs-progs: receive: introduce new --clone-fallback option

When parent stream and incremental stream are received with different nodatasum mount options, any clone opeartion in the incremental stream will be rejected by kernel.

There are more situations to cause clone failure, like receiving a stream on a fs with different sectorsize.

Thus this patchset will introduce a new option, --clone-fallback, for btrfs receive to fall back to buffered write when clone failed.

This fall back behavior will only happen if the new option is explicitly specified, as such behavior can hide some send bugs, and under most sane cases users don't need such option.

Also add a test case for the new option.

Changelog:
RFC->v1:
- Introduce a new option for the fallback behavior To avoid hide send bugs.

- Hide the warning message behind -v option
Since we have a special option for it thus users are aware of what they are doing, there is no need to output such warning by default.

- Add a new test case for it

v2:
- Add the missing help string for --clone-fallback option

- Rephrase the words in comments and commit messages

- Add run_check_remount_test_dev() helper

v3:
- Add an overview of failed clone operations for --clone-fallback option

- Update doc words again

Qu Wenruo (2):
btrfs-progs: receive: fallback to buffered copy if clone failed
btrfs-progs: misc-tests: add test case for receive --clone-fallback

 Documentation/btrfs-receive.asciidoc          | 13 +++
 cmds/receive.c                                | 80 ++++++++++++++++++-
 tests/common                                  |  9 +++
 .../049-receive-clone-fallback/test.sh        | 58 ++++++++++++++
 4 files changed, 157 insertions(+), 3 deletions(-)
 create mode 100755 tests/misc-tests/049-receive-clone-fallback/test.sh
Signature · 1 line
2.33.0