Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 528316

Summary: sys-apps/coreutils: enable --reflink=auto by default
Product: Gentoo Linux Reporter: Phil Tooley <phil.tooley>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED DUPLICATE    
Severity: normal CC: sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://lists.gnu.org/archive/html/coreutils/2014-09/msg00046.html
See Also: https://bugs.gentoo.org/show_bug.cgi?id=118117
Whiteboard:
Package list:
Runtime testing required: ---

Description Phil Tooley 2014-11-05 13:05:01 UTC
Can we consider enabling reflinking by default for btrfs in bashrc?

Adding the aliases

alias mv='mv --reflink=auto'
alias cp='cp --reflink=auto'

in the default /etc/bash/bashrc would be potentially useful for everyone using btrfs without negatively affecting non-btrfs users.

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-05 13:16:04 UTC
By default? What about all the users who don't happen to run btrfs?
Comment 2 Phil Tooley 2014-11-05 13:41:02 UTC
The point of the reflink=auto option is that it doesn't affect anything on filesystems which don't support reflinks.

Compare with the reflink=always option which *would* break things on non-btrfs filesystems.

Also this is only relevant to cp, not to mv, I somehow mixed hings up and thought mv had a reflink option also, but it does things automatically internally.
Comment 3 SpanKY gentoo-dev 2014-11-05 16:25:38 UTC
i don't think this is something that should be aliased like this.  if the behavior is safe, then it should be the default all the time.  if the behavior is not safe, then it shouldn't even be in the shell alias env.

looks like upstream coreutils is already looking into it.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-26 07:36:19 UTC

*** This bug has been marked as a duplicate of bug 498162 ***