Bug 473074 - Refuses to copy a copyable folder with "not enough space on destination" on BTRFS with compression
Summary: Refuses to copy a copyable folder with "not enough space on destination" on B...
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 22.12.3
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-06 14:03 UTC by Martin Steigerwald
Modified: 2023-08-06 14:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Steigerwald 2023-08-06 14:03:35 UTC
SUMMARY

Dolphin refused to copy a folder with 101,7 GiB from zstd, level 3, compressed BTRFS to another zstd, level 3, compressed BTRFS with about 99 GiB free space.

But the folder can still be copied cause in compressed form it only requires about 35 GiB. So after the copy BTRFS still reports 62,3 GiB free.

I even checked beforehand that the copy can still succeed with the compsize command that is available in Debian package btrfs-compsize. Unfortunately that command requires superuser permissions to determine the compression state of files. And it would only help in case the source is also a compressing filesystem with same or at least similar compression levels.


STEPS TO REPRODUCE

1. Create a small filesystem with compression, like BTRFS with zstd.
2. Copy a folder with compressible files that is larger in total size to that filesystem


OBSERVED RESULT

Dolphin refuses to copy the folder to the destination without giving the user any option to override that behavior with some kind of "I know what I am doing".


EXPECTED RESULT

Dolphin offers some copy it anyway option, probably with an explanation that the copy could still succeed in case the filesystem compresses data.

Another idea would be to turn of that check in case KDE detects a compressing filesystem.

A third would be to somehow determine whether the copy can succeed with accounting for compression, but that would be challenging to get right. I think it would require to test compress the data the way the filesystem does it.


SOFTWARE/OS VERSIONS

Linux: Devuan GNU/Linux 6 aka Daedalus with self-compiled 6.4.7 kernel.
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10


ADDITIONAL INFORMATION

By default BTRFS does not compress. So that limits the scope of the issues to users who activate compression by themselves.