VirtualBox

Ignore:
Timestamp:
May 16, 2019 7:03:38 PM (6 years ago)
Author:
vboxsync
Message:

winnt/vboxsf: More words describing the FileAllocationInformation setting scenario. bugref:9172

File:
1 edited

Legend:

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

    r78548 r78550  
    21672167         * https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/d4bc551b-7aaf-4b4f-ba0e-3a75e7c528f0#Appendix_A_83
    21682168         *
    2169          * Note! The AllocationSize and FileSize could be set by RxSetAllocationInfo
    2170          *       before it calls us, so we must use our own copy of the file size here
    2171          *       when we try avoid calling the host!  (open+truncate test failure)
     2169         * Note! The RDBSS caller, RxSetAllocationInfo, will always update the
     2170         *       AllocationSize field of the FCB header before calling us.  If
     2171         *       the change is perceived to be truncating the file (new alloc
     2172         *       size smaller than cached file size from header), the FileSize
     2173         *       and (probably also the) ValidateDataLength FCB fields will be
     2174         *       modified as well _before_ we're called.
     2175         *
     2176         *       Therefore, we cannot use the file size from the FCB to determin
     2177         *       whether it's okay to skip the EOF setting host call or not, we
     2178         *       must use our own cached file size value.  (Cause of broken test
     2179         *       of opening w/ truncation.)
     2180         *
     2181         * P.S.  When opening a file with the trunction flag set, it seems to be
     2182         *       the NT I/O manager doing the truncation after opening the file
     2183         *       as a separate setting FileAllocationInformation operation (no
     2184         *       EOF or VDL setting).
    21722185         */
    21732186        case FileAllocationInformation:
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