VirtualBox

Ignore:
Timestamp:
Apr 30, 2019 3:48:46 AM (6 years ago)
Author:
vboxsync
Message:

winnt/vboxsf: Reworked the set-timestamp handling. Need testcase and some host service tinkering. Also optimized handle closing. bugref:9172

File:
1 edited

Legend:

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

    r78339 r78355  
    234234
    235235    PMRX_VBOX_NETROOT_EXTENSION pNetRootExtension = VBoxMRxGetNetRootExtension(capFcb->pNetRoot);
     236    PVBSFNTFCBEXT pVBoxFcbx = VBoxMRxGetFcbExtension(capFcb);
    236237    PMRX_VBOX_FOBX pVBoxFobx = VBoxMRxGetFileObjectExtension(capFobx);
    237238
     
    308309    Status = vbsfNtVBoxStatusToNt(vrc);
    309310
    310     if (Status != STATUS_SUCCESS)
    311     {
    312         /* Nothing read. */
    313         ByteCount = 0;
    314     }
     311    if (Status == STATUS_SUCCESS)
     312    {
     313        pVBoxFobx->fTimestampsImplicitlyUpdated |= VBOX_FOBX_F_INFO_LASTACCESS_TIME;
     314        if (pVBoxFcbx->pFobxLastAccessTime != pVBoxFobx)
     315            pVBoxFcbx->pFobxLastAccessTime = NULL;
     316    }
     317    else
     318        ByteCount = 0; /* Nothing read. */
    315319
    316320    RxContext->InformationToReturn = ByteCount;
     
    378382
    379383    PMRX_VBOX_NETROOT_EXTENSION pNetRootExtension = VBoxMRxGetNetRootExtension(capFcb->pNetRoot);
     384    PVBSFNTFCBEXT pVBoxFcbx = VBoxMRxGetFcbExtension(capFcb);
    380385    PMRX_VBOX_FOBX pVBoxFobx = VBoxMRxGetFileObjectExtension(capFobx);
    381386
     
    429434    Status = vbsfNtVBoxStatusToNt(vrc);
    430435
    431     if (Status != STATUS_SUCCESS)
    432     {
    433         /* Nothing written. */
    434         ByteCount = 0;
    435     }
     436    if (Status == STATUS_SUCCESS)
     437    {
     438        pVBoxFobx->fTimestampsImplicitlyUpdated |= VBOX_FOBX_F_INFO_LASTWRITE_TIME;
     439        if (pVBoxFcbx->pFobxLastWriteTime != pVBoxFobx)
     440            pVBoxFcbx->pFobxLastWriteTime = NULL;
     441    }
     442    else
     443        ByteCount = 0; /* Nothing written. */
    436444
    437445    RxContext->InformationToReturn = ByteCount;
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