Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-45137

QStorageInfo: bytesAvailable(), bytesFree(), bytesTotal() are calculated incorrectly on Unix systems

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.4.1, 5.5.0 Alpha
    • Fix Version/s: 5.4.2, 5.5.0
    • Component/s: Core: I/O
    • Labels:
      None
    • Environment:
      Fedora 21 x86_64 (Linux 3.18)
    • Commits:
      02e448784543df2d81135ac583c39df6237dac69

      Description

      struct statvfs contains a not exactly intuitive quirk: the f_blocks, f_bfree and f_bavail members refer to the number of fundamental blocks ("fragments"), whose size is given in f_frsize and not, as one might guess, in f_bsize. To make matters worse, f_bsize is often equal to f_frsize, except when it isn't (e.g. on a tmpfs).

      Qt gets it wrong.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              thiago Thiago Macieira
              Reporter:
              rgcjonas Jonas Kümmerlin
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes