From: Adam Borowski <kilobyte@angband.pl>
To: Eric Levy <ericlevy@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: de-duplicating +C files
Date: Wed, 7 Oct 2020 12:07:58 +0200 [thread overview]
Message-ID: <20201007100757.GB11861@angband.pl> (raw)
In-Reply-To: <CA++hEgxkGhnbKBhwuwSAJn2BtZ+RAPuN+-ovkKLsUUfTRnD1_g@mail.gmail.com>
On Wed, Oct 07, 2020 at 02:29:34AM -0400, Eric Levy wrote:
> Recently a discussion [1] began about the desirability or risk of
> applying a de-duplication operation on files with a C (no-CoW)
> attribute set. The controversy rests largely on the observation that
> calls to Btrfs currently fail for de-duplication between two files if
> exactly one has the attribute set, but succeed in other cases, even in
> which both have the attribute set. It may seem more natural that
> success depends on neither file having the attribute set.
Why? It's just that the flag is misnamed, it should be "overwrite in-place"
as it doesn't block CoW in any way. It works like most uses of the word
"CoW" elsewhere: a page is CoWed once whenever it's written to when its
refcount is more than 1.
You can already reflink by snapshotting the subvolume that contains your
file, thus there's no point in blocking explicit deduplication.
The behaviour when trying to dedupe a -C extent with a +C one is less clear.
I'd argue to either:
* prefer the -C copy, or
* refuse (current state)
Meow!
--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Imagine there are bandits in your house, your kid is bleeding out,
⢿⡄⠘⠷⠚⠋⠀ the house is on fire, and seven giant trumpets are playing in the
⠈⠳⣄⠀⠀⠀⠀ sky. Your cat demands food. The priority should be obvious...
next prev parent reply other threads:[~2020-10-07 10:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-07 6:29 de-duplicating +C files Eric Levy
2020-10-07 10:07 ` Adam Borowski [this message]
2020-10-07 10:12 ` Nikolay Borisov
2020-10-07 11:35 ` Eric Levy
2020-10-07 11:57 ` Zygo Blaxell
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=20201007100757.GB11861@angband.pl \
--to=kilobyte@angband.pl \
--cc=ericlevy@gmail.com \
--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).