Bug 453856 - Free space not correctly detected on nested remote mount
Summary: Free space not correctly detected on nested remote mount
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 21.12.3
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-15 20:52 UTC by admin
Modified: 2022-05-15 20:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description admin 2022-05-15 20:52:35 UTC
SUMMARY

When multiple remote mount points are mounted on a single mount point using sshfs in a nested way, free space of sub mount points are not detected correctly, free space of root mount point is used for all sub mount points.

== Server ==
Multiple volumes are exported with SFTPGo, with /var/run as the root mount point.
> df -h
> Filesystem      Size  Used   Avail Use% Mounted on
> tmpfs           4G     0     4G    1%   /var/run
> MNT1            10T    1M    10T   1%   /MNT1
> MNT2            10T    456K  10T   1%   /MNT2

== Client ==
KDE is installed on this system.

These volumes are mounted with sshfs.
> tree -L 1 /mnt/sftp/
> /mnt/sftp/
> ├── MNT1
> ├── MNT2

"df" can show free spaces of sub mount points correctly:
>df -h /mnt/sftp/
>Filesystem          Size  Used Avail Use% Mounted on
>ftp@xxxx.com:       4G     0   4G    0%   /mnt/sftp
>
>df -h /mnt/sftp/MNT1
>Filesystem          Size  Used Avail Use% Mounted on
>ftp@xxxx.com:       10T    1M   10T    1%   /mnt/sftp

STEPS TO REPRODUCE
1.  Create a volume on a remote server, for example `mount -t tmpfs tmpfs /mnt/submnt -o size=1g`, expose /mnt with sshfs.
2.  On client mount /mnt with sshfs, confirm "df" can show free space of /mnt and /mnt/submnt correctly.
3.  Enter /mnt/submnt  with Dolphin, free space of /mnt is showed instead of /mnt/submnt, copy file into /mnt/submnt also limited by the free sapce of /mnt

OBSERVED RESULT

Copy file into sub mount points will fail with "not enough space" if root mount point is not large enough. "Free space" display of bottom bar always show the free space of root mount point even inside a sub mount point.

EXPECTED RESULT

Free space of current mount point should be used instead of root mount point. Something like `df $PWD` instead of `df /`

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 21.12
(available in About System)
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3