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

QFile::flush() does not wait until data stored on disk ( no sync() -like call)

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Out of scope
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 4.6.3, 4.7.0, 4.7.1, 4.8.0, 4.8.x, 5.0.0, Some future release
    • Core: I/O, Documentation
    • None

      http://doc.qt.nokia.com/4.7-snapshot/qfile.html#flush
      does not say about fsync() sync() fdatasync() syscalls.
      I don't understand - after flush() does my data will be written to the disk? ot just to FS cache ?

      man fflush():

      NOTES
      Note that fflush() only flushes the user space buffers provided by the C library. To ensure that the data is physically stored on
      disk the kernel buffers must be flushed too, for example, with sync(2) or fsync(2).

      I think, flush() should be extended with QFile::flush(bool sync=false)

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

            biochimia João Abecasis
            socketpair@gmail.com Коренберг Марк
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes