VirtualBox

Ignore:
Timestamp:
May 16, 2019 1:53:39 PM (6 years ago)
Author:
vboxsync
Message:

winnt/vboxsf: Fixed none-working open+truncate testcase caused by an old misconception in the FileAllocationInformation wrt when the incoming sizes would be updated (before call, as it turns out). bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/file.cpp

    r78544 r78548  
    438438        if (pVBoxFcbx->pFobxLastWriteTime != pVBoxFobx)
    439439            pVBoxFcbx->pFobxLastWriteTime = NULL;
     440
     441        /* Make sure our cached file size value is up to date: */
     442        if (ctx.cbData > 0)
     443        {
     444            RTFOFF offEndOfWrite = LowIoContext->ParamsFor.ReadWrite.ByteOffset + ctx.cbData;
     445            if (pVBoxFobx->Info.cbObject < offEndOfWrite)
     446                pVBoxFobx->Info.cbObject = offEndOfWrite;
     447
     448            if (pVBoxFobx->Info.cbAllocated < offEndOfWrite)
     449            {
     450                pVBoxFobx->Info.cbAllocated = offEndOfWrite;
     451                pVBoxFobx->nsUpToDate       = 0;
     452            }
     453        }
    440454    }
    441455    else
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette