Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Christoph Anton Mitterer <calestyo@scientia.org>,
	linux-btrfs@vger.kernel.org
Subject: Re: du --bytes show different value for btrfs and e.g. ext4 with identical data
Date: Sat, 13 Aug 2022 10:30:27 +0300	[thread overview]
Message-ID: <ab7c756d-c045-bb0f-155e-8ba94ffaf6d7@gmail.com> (raw)
In-Reply-To: <533edd660d632b46a0cc6bde07276f07435a84de.camel@scientia.org>

On 13.08.2022 03:11, Christoph Anton Mitterer wrote:
> Hey.
> 
> Forgive me if that has been answered before, but I couldn't find it on
> the list or the manpage.
> 
> I have my personal data on several backup disks, all of them except one
> (which is ext4) being btrfs.
> 
> The data on them is 100% identical (diff -qr --no-dereference brought
> no difference). On the btrfs, the whole data is always in one
> subvolume.
> 
> 
> Yet, when I do:
>   du --bytes (which implies --apparent-size)
> I get (in my case):
>   5035634863728 for (all the) btrfs
> but
>   5035836693616 for the ext4
> 
> Which is some 192 MiB more on ext4.
> 
> 
> Because of --apparent-size, this shouldn't be any refcopy or
> compression effects; also hardlinks shouldn't matter (and are the same
> on all of the filesystems anyway).
> 
> 
> Any idea why the results are different and shouldn't they be the same?

You did not show your actual command which makes it impossible for
anyone to reproduce it. But my guess is that your du invocation includes
size of directories which is different between different filesystems.

> And if not, would it make sense to have this behaviour added to
> btrfs(5)?
> 
> 
> Thanks,
> Chris.
> 


  reply	other threads:[~2022-08-13  7:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-13  0:11 du --bytes show different value for btrfs and e.g. ext4 with identical data Christoph Anton Mitterer
2022-08-13  7:30 ` Andrei Borzenkov [this message]
2022-08-13 19:29   ` Christoph Anton Mitterer

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=ab7c756d-c045-bb0f-155e-8ba94ffaf6d7@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=calestyo@scientia.org \
    --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