All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: Andrei Borzenkov <arvidjaar@gmail.com>
Cc: Chris Murphy <lists@colorremedies.com>,
	"Gervais, Francois" <FGervais@distech-controls.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: CoW behavior when writing same content
Date: Tue, 9 Oct 2018 16:31:29 -0600	[thread overview]
Message-ID: <CAJCQCtRxKyBR3ZkuMEhPWtoY_UQkq1G1J-YfU_P+zBzrtQW4zw@mail.gmail.com> (raw)
In-Reply-To: <7ea431d5-2966-f0e5-9dec-882e46743a69@gmail.com>

On Tue, Oct 9, 2018 at 11:25 AM, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
> 09.10.2018 18:52, Chris Murphy пишет:

>>> In this case is root/big_file and snapshot/big_file still share the same data?
>>
>> You'll be left with three files. /big_file and root/big_file will
>> share extents,
>
> How comes they share extents? This requires --reflink, is it default now?

Good catch. It's not the default. I meant to write that initially only

root/big_file and snapshot/big_file have shared extents

And the shared extents are lost when snapshot/big_file is
"overwritten" by the copy into snapshot/


>> and snapshot/big_file will have its own extents. You'd
>> need to copy with --reflink for snapshot/big_file to have shared
>> extents with /big_file - or deduplicate.
>>
> This still overwrites the whole file in the sense original file content
> of "snapshot/big_file" is lost. That new content happens to be identical
> and that new content will probably be reflinked does not change the fact
> that original file is gone.

Agreed.

-- 
Chris Murphy

      reply	other threads:[~2018-10-09 22:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 14:48 CoW behavior when writing same content Gervais, Francois
2018-10-09 15:52 ` Chris Murphy
2018-10-09 16:21   ` Roman Mamedov
2018-10-09 17:25   ` Andrei Borzenkov
2018-10-09 22:31     ` Chris Murphy [this message]

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=CAJCQCtRxKyBR3ZkuMEhPWtoY_UQkq1G1J-YfU_P+zBzrtQW4zw@mail.gmail.com \
    --to=lists@colorremedies.com \
    --cc=FGervais@distech-controls.com \
    --cc=arvidjaar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.