Uploaded image for project: 'rcX - Operating System'
  1. rcX - Operating System
  2. RCX-765

Mid_FatFlushFile does not update the file information (file size) correctly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V2.1.11.0, V2.1.11.1, V2.1.11.2, V2.1.11.3
    • Fix Version/s: V2.1.11.4, V2.1.12.0
    • Component/s: Middleware
    • Labels:
      None
    • Account:
      SDO rcX (SDORCX)

      Description

      Mid_FatFlushFile does not update the file information correctly.

      Mid_FatFlushFile() updates the physical file information but overwrites the cached file size by the previous parameter (size before the flush).

      This results in the following behaviour:
      A call to Mid_FatGetFileSize(), after writing to the file, returns the current file size (including cached data). A subsequent call to Mid_FatFlushFile() updates the physical file information and resets the cached file size to the previous physical size (size before the flush). So the next call of Mid_FatGetFileSize() returns an incorrect size but the physical filesystem is consistent.
      A second call to Mid_FatFlushFile() then again exchanges the file size information. A call to Mid_FatGetFileSize() returns the correct size but the physical filesystem information keeps the size before the write.
      NOTE: Mid_FatCloseFile() and Mid_FatReadFile() may also internally call Mid_FatFlushFile().

        Attachments

          Issue Links

            Expenses

              Activity

                Status Description

                  People

                  • Reporter:
                    SDoell Sebastian Döll
                  • Votes:
                    0 Vote for this issue
                    Watchers:
                    1 Start watching this issue

                    Dates

                    • Created:
                      Updated:
                      Resolved: