linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Adam Borowski <kilobyte@angband.pl>
Cc: Nikolaus Rath <Nikolaus@rath.org>, linux-btrfs@vger.kernel.org
Subject: Re: fsck: to repair or not to repair
Date: Fri, 10 Jun 2016 13:39:10 -0400	[thread overview]
Message-ID: <612e8ab9-833c-3792-a89e-cb4fa02ae84a@gmail.com> (raw)
In-Reply-To: <20160610172203.GB18657@angband.pl>

On 2016-06-10 13:22, Adam Borowski wrote:
> On Fri, Jun 10, 2016 at 01:12:42PM -0400, Austin S. Hemmelgarn wrote:
>> On 2016-06-10 12:50, Adam Borowski wrote:
>>> And, as of coreutils 8.25, the default is no reflink, with "never" not being
>>> recognized even as a way to avoid an alias.  As far as I remember, this
>>> applies to every past version with support for reflinks too.
>>>
>> Odd, I could have sworn that was an option...
>>
>> And I do know there was talk at least at one point of adding it and
>> switching to reflink=auto by default.
>
> Yes please!
>
> It's hard to come with a good reason for not reflinking when it's possible
> -- the only one I see is if you have a nocow VM and want to slightly improve
> speed at a cost of lots of disk space.  And even then, there's cat a >b for
> that.
There are other arguments, the most common one being not changing user 
visible behavior.  There are (misguided) people who expect copying a 
file to mean you have two distinct copies of that file.

OTOH, it's not too hard to set up a system to do this, you just put:
alias cp='cp --reflink=auto'
into your bashrc (or something similar into whatever other shell you 
use).  I've been doing this since cp added support for it.
>
> And the cost on non-btrfs non-unmerged-xfs is a single syscall per file,
> that's utterly negligible compared to actually copying the data.
Actually, IIRC, it's an ioctl, not a syscall, which can be kind of 
expensive (I don't know how much more expensive, but ioctls are usually 
more expensive than syscalls).

Other things to keep in mind though that may impact this (either way):
1. There are other filesystems that support reflinks (OCFS2 and ZFS come 
immediately to mind).
2. Most of the filesystems that support reflinks are used more in 
enterprise situations, where the bit about not changing user visible 
behavior is a much stronger argument.
3. Even in enterprise situations, reflink capable filesystems are still 
unusual outside of petabyte scale data storage.
4. Last I checked, the most widely used filesystem that supports 
reflinks (ZFS) uses a different ioctl interface for them than most other 
Linux filesystems, which means more checking is needed than just calling 
one ioctl.

  reply	other threads:[~2016-06-10 17:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 21:10 fsck: to repair or not to repair Nikolaus Rath
2016-05-12 17:02 ` Henk Slager
2016-05-12 17:35   ` Nikolaus Rath
2016-05-12 17:55     ` Ashish Samant
2016-05-13  6:36   ` Duncan
2016-05-13 15:28     ` Nikolaus Rath
2016-05-13 21:35       ` Chris Murphy
2016-05-16 11:17         ` Austin S. Hemmelgarn
2016-05-16 11:34           ` Andrei Borzenkov
2016-05-16 11:48             ` Austin S. Hemmelgarn
2016-06-10  3:40 ` Nikolaus Rath
2016-06-10 11:05   ` Austin S. Hemmelgarn
2016-06-10 15:54     ` Nikolaus Rath
2016-06-10 16:50       ` Adam Borowski
2016-06-10 16:55         ` Nikolaus Rath
2016-06-10 17:12         ` Austin S. Hemmelgarn
2016-06-10 17:22           ` Adam Borowski
2016-06-10 17:39             ` Austin S. Hemmelgarn [this message]
2016-06-10 17:40             ` Henk Slager
2016-06-10 15:55     ` Nikolaus Rath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=612e8ab9-833c-3792-a89e-cb4fa02ae84a@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=Nikolaus@rath.org \
    --cc=kilobyte@angband.pl \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).