You are not logged in.

#1 2021-10-26 18:27:44

Cvlc
Member
Registered: 2020-03-26
Posts: 295

[solved] GNOME Files / Btrfs COW

Hi,

I cannot find the info as to whether Gnome Files will use COW when copying files around. cp frome core-utils only recently picked up the feature by default. Any idea where I can find that ?

What about other common file manager apps, ie from other DEs?

Thanks, have a good day !

Last edited by Cvlc (2021-10-28 09:10:09)

Offline

#2 2021-10-27 19:41:52

Bevan
Member
Registered: 2009-09-08
Posts: 104

Re: [solved] GNOME Files / Btrfs COW

Hi!

Yes, it does. To find out, I did a little experiment:

dd if=/dev/random of=testfile bs=1M count=1
cp --reflink=always testfile reflinked
cp --reflink=never testfile duplicated
[copy testfile in Gnome Files to GnomeFileCp]
sync
filefrag -v *

My output:

Filesystem type is: 9123683e
File size of duplicated is 1048576 (256 blocks of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..     255:   31103033..  31103288:    256:             last,shared,eof
duplicated: 1 extent found
File size of GnomeFileCp is 1048576 (256 blocks of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..     255:   31080208..  31080463:    256:             last,shared,eof
GnomeFileCp: 1 extent found
File size of reflinked is 1048576 (256 blocks of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..     255:   31080208..  31080463:    256:             last,shared,eof
reflinked: 1 extent found
File size of testfile is 1048576 (256 blocks of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..     255:   31080208..  31080463:    256:             last,shared,eof
testfile: 1 extent found

Have a look at the physical_offset. It is the same for testfile, reflinked and GnomeFileCp but differs for duplicated.

Here are also some references on this which by the way claim that KDE's Dolphin should also do this:
https://gitlab.gnome.org/GNOME/nautilus/-/issues/1544
https://gitlab.gnome.org/GNOME/glib/-/issues/2151

Offline

#3 2021-10-28 09:09:46

Cvlc
Member
Registered: 2020-03-26
Posts: 295

Re: [solved] GNOME Files / Btrfs COW

Cool thanks very much !

Offline

Board footer

Powered by FluxBB