All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs-progs: receive: introduce new --clone-fallback option
@ 2021-09-30  0:00 Qu Wenruo
  2021-09-30  0:00 ` [PATCH 1/2] btrfs-progs: receive: fallback to buffered copy if clone failed Qu Wenruo
  2021-09-30  0:00 ` [PATCH 2/2] btrfs-progs: misc-tests: add test case for receive --clone-fallback Qu Wenruo
  0 siblings, 2 replies; 8+ messages in thread
From: Qu Wenruo @ 2021-09-30  0:00 UTC (permalink / raw)
  To: linux-btrfs

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

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                                | 60 ++++++++++++++++++-
 .../049-receive-clone-fallback/test.sh        | 60 +++++++++++++++++++
 3 files changed, 130 insertions(+), 3 deletions(-)
 create mode 100755 tests/misc-tests/049-receive-clone-fallback/test.sh

-- 
2.33.0


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

end of thread, other threads:[~2021-09-30 10:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30  0:00 [PATCH 0/2] btrfs-progs: receive: introduce new --clone-fallback option Qu Wenruo
2021-09-30  0:00 ` [PATCH 1/2] btrfs-progs: receive: fallback to buffered copy if clone failed Qu Wenruo
2021-09-30  9:39   ` Filipe Manana
2021-09-30  0:00 ` [PATCH 2/2] btrfs-progs: misc-tests: add test case for receive --clone-fallback Qu Wenruo
2021-09-30 10:03   ` Filipe Manana
2021-09-30 10:18     ` Qu Wenruo
2021-09-30 10:30       ` Filipe Manana
2021-09-30 10:42         ` Qu Wenruo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.