From b47231be6813e6cb5305266e391b4bb745f27f13 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 24 Sep 2014 11:15:05 +0100 Subject: mv: use reflink=auto mode by default On some filesystems (BTRFS), moving a file within the filesystem may cross subvolume boundaries and we can use a lightweight reflink copy, similar to what cp(1) can do, which is faster than a full file copy. This is enabled by default because it's only an optimization for the fall back copy and does not break user expectations or usability. * src/mv.c (cp_option_init): Set the reflink mode to AUTO. * NEWS: Mention the improvement. --- src/mv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mv.c b/src/mv.c index 6112419e2..2eacb2ca6 100644 --- a/src/mv.c +++ b/src/mv.c @@ -107,7 +107,7 @@ cp_option_init (struct cp_options *x) cp_options_default (x); x->copy_as_regular = false; /* FIXME: maybe make this an option */ - x->reflink_mode = REFLINK_NEVER; + x->reflink_mode = REFLINK_AUTO; x->dereference = DEREF_NEVER; x->unlink_dest_before_opening = false; x->unlink_dest_after_failed_open = false; -- cgit v1.2.3-54-g00ecf