linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Torsten Bronger <bronger@physik.rwth-aachen.de>
To: linux-btrfs@vger.kernel.org
Subject: Re: Why so much "btrfs send" data for "cp -a --reflink"?
Date: Tue, 06 Oct 2020 17:39:35 +0200	[thread overview]
Message-ID: <87tuv7nz2g.fsf@physik.rwth-aachen.de> (raw)
In-Reply-To: CAL3q7H5tCeFKX1-ib3Rf0udxP8vVJK4MPrF7Vs5ibaqzmsTL+g@mail.gmail.com

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

Hallöchen!

Filipe Manana writes:

> [...]
>
> But since the files are VM images, very likely what you are seeing
> are writes full of zero bytes.  This is because the current send
> protocol does not have support holes, instead it issues write
> operations with a bunch of zeros.  And holes are very common in VM
> images in general.

Thank you for your answer!  It is plausible: I created a 10G file
with random content, reflink-copied it, and the "btrfs send" is
almost nothing.

> Just look at a few write commands, grab the file name, offset and
> length, then check if after you read the corresponding file range
> you get only zeros.

I haven’t tested it, but the "btrfs send" produces 12G, 1.5G of
which are zeroes, and the source file contains 6.8GB of zeroes.  Can
this be the holes nevertheless?

Regards,
Torsten.

-- 
Torsten Bronger

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 4913 bytes --]

      reply	other threads:[~2020-10-06 15:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05  7:54 Why so much "btrfs send" data for "cp -a --reflink"? Torsten Bronger
2020-10-06 12:48 ` Torsten Bronger
2020-10-06 13:34   ` Filipe Manana
2020-10-06 15:39     ` Torsten Bronger [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=87tuv7nz2g.fsf@physik.rwth-aachen.de \
    --to=bronger@physik.rwth-aachen.de \
    --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).