Changeset 78548 in vbox
- Timestamp:
- May 16, 2019 1:53:39 PM (6 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/SharedFolders/driver
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/file.cpp
r78544 r78548 438 438 if (pVBoxFcbx->pFobxLastWriteTime != pVBoxFobx) 439 439 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 } 440 454 } 441 455 else -
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/info.cpp
r78543 r78548 1209 1209 FileSizes.ValidDataLength.QuadPart = cbFileNew; 1210 1210 1211 1211 1212 /* RDBSS leave the lock before calling CcSetFileSizes, so we do that too then.*/ 1212 1213 if (NT_SUCCESS(rcNtLock)) … … 1225 1226 Log(("vbsfNtUpdateFcbSize: CcSetFileSizes -> %#x\n", rcNt)); 1226 1227 #endif 1227 } 1228 return; 1229 } 1230 Log2(("vbsfNtUpdateFcbSize: Updated Size+VDL from %#RX64 to %#RX64; Alloc %#RX64\n", 1231 cbFileOld, cbFileNew, FileSizes.AllocationSize)); 1228 1232 return; 1229 1233 } 1230 1234 /** @todo should we flag this so we can try again later? */ 1231 1235 } 1236 1237 Log2(("vbsfNtUpdateFcbSize: Updated sizes: cb=%#RX64 VDL=%#RX64 Alloc=%#RX64 (old cb=#RX64)\n", 1238 pFcb->Header.FileSize.QuadPart, pFcb->Header.ValidDataLength.QuadPart, pFcb->Header.AllocationSize.QuadPart, cbFileOld)); 1232 1239 } 1233 1240 else … … 1237 1244 if (NT_SUCCESS(rcNtLock)) 1238 1245 { 1239 RxReleasePagingIoResource(NULL, pFcb); 1246 RxReleasePagingIoResource(NULL, pFcb); /* requires {} */ 1240 1247 } 1241 1248 } … … 2159 2166 * 2160 2167 * https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/d4bc551b-7aaf-4b4f-ba0e-3a75e7c528f0#Appendix_A_83 2168 * 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) 2161 2172 */ 2162 2173 case FileAllocationInformation: … … 2166 2177 pInfo->AllocationSize.QuadPart, capFcb->Header.FileSize.QuadPart)); 2167 2178 2168 if (pInfo->AllocationSize.QuadPart >= capFcb->Header.FileSize.QuadPart)2179 if (pInfo->AllocationSize.QuadPart >= pVBoxFobx->Info.cbObject) 2169 2180 Status = STATUS_SUCCESS; 2170 2181 else -
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/path.cpp
r78543 r78548 561 561 if (capFcb->OpenCount == 0) 562 562 { 563 Log(("VBOXSF: MRxCreate: Initializing the FCB.\n")); 563 564 FCB_INIT_PACKET InitPacket; 564 565 FILE_NETWORK_OPEN_INFORMATION Data;
Note:
See TracChangeset
for help on using the changeset viewer.