From d38bf6efbd3cb44fd2c13d5342ba28924e8959c4 Mon Sep 17 00:00:00 2001 From: Mingye Wang Date: Fri, 8 Nov 2019 16:24:40 +0800 Subject: [PATCH] cp, install: use auto reflink by default This patch is not for upstream consumption. It is only intended for users of CoW filesystems that will always deduplicate things. For them REFLINK_NEVER is about the same as REFLINK_AUTO with a week of delay. The concern is usually minimized by the dedupe block size and the light weight of the "deltas". See: https://unix.stackexchange.com/questions/80351 --- src/cp.c | 2 +- src/install.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cp.c b/src/cp.c index 707f3984a0..118eddba62 100644 --- a/src/cp.c +++ b/src/cp.c @@ -793,7 +793,7 @@ cp_option_init (struct cp_options *x) x->move_mode = false; x->install_mode = false; x->one_file_system = false; - x->reflink_mode = REFLINK_NEVER; + x->reflink_mode = REFLINK_AUTO; x->preserve_ownership = false; x->preserve_links = false; diff --git a/src/install.c b/src/install.c index bde69c994d..915991107f 100644 --- a/src/install.c +++ b/src/install.c @@ -264,7 +264,7 @@ cp_option_init (struct cp_options *x) { cp_options_default (x); x->copy_as_regular = true; - x->reflink_mode = REFLINK_NEVER; + x->reflink_mode = REFLINK_AUTO; x->dereference = DEREF_ALWAYS; x->unlink_dest_before_opening = true; x->unlink_dest_after_failed_open = false;