disk_free_space in combination with btrfs
| From: | Georg Großmann | Date: | Fri, 04 Sep 2020 08:17:38 +0000 |
| Subject: | disk_free_space in combination with btrfs | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-228877@lists.php.net to get a copy of this message | ||
Dear php developers,
I am using nextcloud which is developed on the base of php.
My system:
Open Suse Leap 15.2
PHP 7.4
Filesystem: BTRFS (configured as raid1)
As far as I can see, nextcloud uses a php build-in function called
"@disk_free_space"
(https://github.com/nextcloud/server/blob/41d95d9e5a8b4fe0ee1ad8f80243bde29a61ac50/lib/private/Files/Storage/Local.php#L372).
Unfortunately, on my filesystem, the returned value is wrong. I can't
find anything regarding this function and BTRFS except for a statement
from some guy on github, who refers to the php documentation. I had a
look there as well but I did not find this note anymore, which he refers
to. (Other conversation on github:
https://github.com/osclass/Osclass/issues/533#issuecomment-10716859:
"we
should not rely on this function on Linux BTRFS filesystems".)
Is this function ment to work on BTRFS or is it a known bug? Is it
possible to implement a fix? I guess this fix should be done directly
in php instead of in the nextcloud code (check filesystem and use
different method to get the free space...)
Kind regards
Georg