Bug 223738 - Incorrect free space reported in status bar when accessing an NFS share
Summary: Incorrect free space reported in status bar when accessing an NFS share
Status: RESOLVED WORKSFORME
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: SVN
Platform: FreeBSD Ports FreeBSD
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-22 04:05 UTC by timothy.wilson87
Modified: 2021-03-04 04:33 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description timothy.wilson87 2010-01-22 04:05:26 UTC
Version:           1.3 (using KDE 4.3.4)
Compiler:          GCC 4.2.1 20070719 
OS:                FreeBSD
Installed from:    FreeBSD Ports

I have an OpenSolaris server exporting ZFS systems via NFS. If I mount one of these volumes on my FreeBSD box and turn on "Show space information", a much larger amount of free space is reported. I have about 400GB free, but Dolphin reports 24.2TB is free.

This may not be a bug in Dolphin, but I thought I should report it just in case.

Steps to reproduce:
1. Create a zfs filesystem
2. Share with nfs
3. Mount the share on the machine with KDE4.3
4. Open Dolphin. Go to "Settings" -> "Configure Dolphin" -> "General" -> "Status bar" and tick "Show space information".
5. Using Dolphin, navigate to the directory where the NFS share has been mounted

Expected behaviour: Dolphin should show the correct amount of free space
Comment 1 Peter Penz 2010-01-22 09:09:23 UTC
Thanks Timothy for the report! One information would be very useful for me to be able to fix this bug (as I've no NFS here): Could you please go to you mount point, open the context menu and select "Properties"? At the bottom there is a bar "device usage" - does it also show the same problem as the space information of the statusbar? Thanks in advance!
Comment 2 timothy.wilson87 2010-01-24 00:57:08 UTC
Hello Peter,

Yes, the "Device usage" under "Properties" is also wrong. It too shows the same incorrect size that is being reported in the status bar.

Something I didn't mention is that "df -h" shows the correct usage on the NFS client.

Is there any other information I can provide?

Thanks!
Timothy.
Comment 3 Peter Penz 2010-01-25 10:11:19 UTC
@David: Dolphin and KPropertiesDialog use KDiskFreeSpaceInfo::freeSpaceInfo() to get the free disk space.
Comment 4 David Faure 2010-12-22 18:57:45 UTC
Hmm I can't reproduce this, with a linux NFS mount. df says 808G free and the properties dialog says 807.9 GiB free, seems pretty correct.

The relevant code from KDiskSpaceFreeInfo is:
    struct statvfs statvfs_buf;
    // Prefer mountPoint if available, so that it even works with non-existing files.
    const QString pathArg = info.d->mountPoint.isEmpty() ? path : info.d->mountPoint;
    if (!statvfs(QFile::encodeName(pathArg).constData(), &statvfs_buf)) {
        const quint64 blksize = quint64(statvfs_buf.f_frsize); // cast to avoid overflow
        info.d->available = statvfs_buf.f_bavail * blksize;
        info.d->size = statvfs_buf.f_blocks * blksize;
        info.d->valid = true;
    }

Actually the "use frsize" fix is from July, and the "overflow" fix is from February, and both could be the cause for your bug.
I see a huge chance that this is fixed already, can you update to a more recent KDE version (4.5.x) and test again?
Comment 5 Jonathan Marten 2021-02-02 12:22:22 UTC
Reported for KDE4.
Please confirm if the problem is still seen with current version.
Comment 6 Bug Janitor Service 2021-02-17 04:33:10 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2021-03-04 04:33:21 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!