- Timestamp:
- May 5, 2019 5:23:17 AM (6 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/SharedFolders/driver
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/info.cpp
r78381 r78382 1149 1149 ULONG cbToCopy = 0; 1150 1150 1151 Log(("VBOXSF: MrxQueryFileInfo: Buffer = %p, Length = %x (%d) bytes, FileInformationClass = %d\n",1151 Log(("VBOXSF: VBoxMRxQueryFileInfo: Buffer = %p, Length = %x (%d) bytes, FileInformationClass = %d\n", 1152 1152 RxContext->Info.Buffer, RxContext->Info.Length, RxContext->Info.Length, RxContext->Info.FileInformationClass)); 1153 1153 … … 1171 1171 PFILE_NAMES_INFORMATION pInfo = (PFILE_NAMES_INFORMATION)RxContext->Info.Buffer; 1172 1172 PUNICODE_STRING FileName = GET_ALREADY_PREFIXED_NAME_FROM_CONTEXT(RxContext); 1173 Log(("VBOXSF: MrxQueryFileInfo: FileNamesInformation\n"));1173 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileNamesInformation\n")); 1174 1174 1175 1175 cbToCopy = RT_UOFFSETOF_DYN(FILE_NAMES_INFORMATION, FileName[FileName->Length / 2 + 1]); … … 1188 1188 { 1189 1189 PFILE_INTERNAL_INFORMATION pInfo = (PFILE_INTERNAL_INFORMATION)RxContext->Info.Buffer; 1190 Log(("VBOXSF: MrxQueryFileInfo: FileInternalInformation\n"));1190 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileInternalInformation\n")); 1191 1191 1192 1192 cbToCopy = sizeof(FILE_INTERNAL_INFORMATION); … … 1201 1201 { 1202 1202 PFILE_EA_INFORMATION pInfo = (PFILE_EA_INFORMATION)RxContext->Info.Buffer; 1203 Log(("VBOXSF: MrxQueryFileInfo: FileEaInformation\n"));1203 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileEaInformation\n")); 1204 1204 1205 1205 cbToCopy = sizeof(FILE_EA_INFORMATION); … … 1211 1211 1212 1212 case FileStreamInformation: 1213 Log(("VBOXSF: MrxQueryFileInfo: FileStreamInformation: not supported\n"));1213 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileStreamInformation: not supported\n")); 1214 1214 Status = STATUS_INVALID_PARAMETER; 1215 1215 break; 1216 1216 1217 1217 case FileAlternateNameInformation: 1218 Log(("VBOXSF: MrxQueryFileInfo: FileStreamInformation: not implemented\n"));1218 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileStreamInformation: not implemented\n")); 1219 1219 Status = STATUS_OBJECT_NAME_NOT_FOUND; 1220 1220 break; 1221 1221 1222 1222 case FileNumaNodeInformation: 1223 Log(("VBOXSF: MrxQueryFileInfo: FileNumaNodeInformation: not supported\n"));1223 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileNumaNodeInformation: not supported\n")); 1224 1224 Status = STATUS_NO_SUCH_DEVICE; /* what's returned on a samba share */ 1225 1225 break; 1226 1226 1227 1227 case FileStandardLinkInformation: 1228 Log(("VBOXSF: MrxQueryFileInfo: FileStandardLinkInformation: not supported\n"));1228 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileStandardLinkInformation: not supported\n")); 1229 1229 Status = STATUS_NOT_SUPPORTED; /* what's returned on a samba share */ 1230 1230 break; … … 1283 1283 { 1284 1284 PFILE_BASIC_INFORMATION pInfo = (PFILE_BASIC_INFORMATION)RxContext->Info.Buffer; 1285 Log(("VBOXSF: MrxQueryFileInfo: FileBasicInformation\n"));1285 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileBasicInformation\n")); 1286 1286 1287 1287 cbToCopy = sizeof(FILE_BASIC_INFORMATION); … … 1293 1293 pInfo->ChangeTime.QuadPart = RTTimeSpecGetNtTime(&pVBoxFobx->Info.ChangeTime); 1294 1294 pInfo->FileAttributes = VBoxToNTFileAttributes(pVBoxFobx->Info.Attr.fMode); 1295 Log(("VBOXSF: MrxQueryFileInfo: FileBasicInformation: File attributes: 0x%x\n",1295 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileBasicInformation: File attributes: 0x%x\n", 1296 1296 pInfo->FileAttributes)); 1297 1297 break; … … 1301 1301 { 1302 1302 PFILE_STANDARD_INFORMATION pInfo = (PFILE_STANDARD_INFORMATION)RxContext->Info.Buffer; 1303 Log(("VBOXSF: MrxQueryFileInfo: FileStandardInformation\n"));1303 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileStandardInformation\n")); 1304 1304 1305 1305 cbToCopy = sizeof(FILE_STANDARD_INFORMATION); … … 1319 1319 { 1320 1320 PFILE_NETWORK_OPEN_INFORMATION pInfo = (PFILE_NETWORK_OPEN_INFORMATION)RxContext->Info.Buffer; 1321 Log(("VBOXSF: MrxQueryFileInfo: FileNetworkOpenInformation\n"));1321 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileNetworkOpenInformation\n")); 1322 1322 1323 1323 cbToCopy = sizeof(FILE_NETWORK_OPEN_INFORMATION); … … 1339 1339 { 1340 1340 PFILE_END_OF_FILE_INFORMATION pInfo = (PFILE_END_OF_FILE_INFORMATION)RxContext->Info.Buffer; 1341 Log(("VBOXSF: MrxQueryFileInfo: FileEndOfFileInformation\n"));1341 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileEndOfFileInformation\n")); 1342 1342 1343 1343 cbToCopy = sizeof(FILE_END_OF_FILE_INFORMATION); … … 1353 1353 { 1354 1354 PFILE_ALLOCATION_INFORMATION pInfo = (PFILE_ALLOCATION_INFORMATION)RxContext->Info.Buffer; 1355 Log(("VBOXSF: MrxQueryFileInfo: FileAllocationInformation\n"));1355 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileAllocationInformation\n")); 1356 1356 1357 1357 cbToCopy = sizeof(FILE_ALLOCATION_INFORMATION); … … 1367 1367 { 1368 1368 PFILE_ATTRIBUTE_TAG_INFORMATION pInfo = (PFILE_ATTRIBUTE_TAG_INFORMATION)RxContext->Info.Buffer; 1369 Log(("VBOXSF: MrxQueryFileInfo: FileAttributeTagInformation\n"));1369 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileAttributeTagInformation\n")); 1370 1370 1371 1371 cbToCopy = sizeof(FILE_ATTRIBUTE_TAG_INFORMATION); … … 1389 1389 UCHAR Reserved[3]; 1390 1390 } *pInfo = (struct MY_FILE_COMPRESSION_INFO *)RxContext->Info.Buffer; 1391 Log(("VBOXSF: MrxQueryFileInfo: FileCompressionInformation\n"));1391 Log(("VBOXSF: VBoxMRxQueryFileInfo: FileCompressionInformation\n")); 1392 1392 1393 1393 cbToCopy = sizeof(*pInfo); … … 1420 1420 * FileProcessIdsUsingFileInformation: rcNt=0 (STATUS_SUCCESS) Ios.Status=0 (STATUS_SUCCESS) Ios.Information=0000000000000010 1421 1421 * FileNormalizedNameInformation: rcNt=0 (STATUS_SUCCESS) Ios.Status=0 (STATUS_SUCCESS) Ios.Information=00000000000000AA 1422 * => See during MoveFileEx call on W10. 1422 1423 * FileNetworkPhysicalNameInformation: rcNt=0xc000000d (STATUS_INVALID_PARAMETER) Ios={not modified} 1423 1424 * FileShortNameInformation? … … 1431 1432 */ 1432 1433 default: 1433 Log(("VBOXSF: MrxQueryFileInfo: Not supported FileInformationClass: %d!\n",1434 Log(("VBOXSF: VBoxMRxQueryFileInfo: Not supported FileInformationClass: %d!\n", 1434 1435 RxContext->Info.FileInformationClass)); 1435 1436 Status = STATUS_INVALID_PARAMETER; … … 1446 1447 AssertStmt(RxContext->Info.LengthRemaining >= 0 || Status != STATUS_SUCCESS, Status = STATUS_BUFFER_TOO_SMALL); 1447 1448 1448 Log(("VBOXSF: MrxQueryFileInfo: Returns %#x, Remaining length = %d, cbToCopy = %u (%#x)\n",1449 Log(("VBOXSF: VBoxMRxQueryFileInfo: Returns %#x, Remaining length = %d, cbToCopy = %u (%#x)\n", 1449 1450 Status, RxContext->Info.Length, cbToCopy)); 1450 1451 return Status; … … 1706 1707 1707 1708 /** 1708 * Worker for VBoxMRxSetFileInfo .1709 * Worker for VBoxMRxSetFileInfo handling FileRenameInformation. 1709 1710 * 1710 * @todo Renaming files from the guest is _very_ expensive: 1711 * 52175 ns/call on the host 1712 * 844237 ns/call from the guest 1711 * @note Renaming files from the guest is _very_ expensive: 1712 * - 52175 ns/call on the host 1713 * - 844237 ns/call from the guest 1714 * 1715 * The explanation for this is that RTPathRename translates to a 1716 * MoveFileEx call, which ends up doing a lot more than opening the 1717 * file and setting rename information on that handle (W10): 1718 * - Opens the file. 1719 * - Queries FileAllInformation. 1720 * - Tries to open the new filename (result: 0x00000000 but not 1721 * opened by our code - weird). 1722 * - Does IOCTL_REDIR_QUERY_PATH_EX on \vboxsvr\IPC$. 1723 * - Tries to open \vboxsvr\IPC$ (result: 0xc0000016) 1724 * - Opens the parent directory. 1725 * - Queries directory info with old name as filter. 1726 * - Closes parent directory handle. 1727 * - Finally does FileRenameInformation. 1728 * - Closes the handle to the renamed file. 1729 * 1713 1730 */ 1714 1731 static NTSTATUS vbsfNtRename(IN PRX_CONTEXT RxContext, -
trunk/src/VBox/Additions/WINNT/SharedFolders/driver/vbsf.cpp
r78368 r78382 447 447 NTSTATUS rcNt; 448 448 449 Log(("VBOXSF: VBoxHookMjCreate: pDevObj %p, pDevExt %p, pFileObj %p, options %#x, attr %#x, share %#x, ealength %#x, secctx %p \n",449 Log(("VBOXSF: VBoxHookMjCreate: pDevObj %p, pDevExt %p, pFileObj %p, options %#x, attr %#x, share %#x, ealength %#x, secctx %p, IrpFlags %#x\n", 450 450 pDevObj, pDevObj->DeviceExtension, pFileObj, pStack->Parameters.Create.Options, pStack->Parameters.Create.FileAttributes, 451 pStack->Parameters.Create.ShareAccess, pStack->Parameters.Create.EaLength, pStack->Parameters.Create.SecurityContext ));451 pStack->Parameters.Create.ShareAccess, pStack->Parameters.Create.EaLength, pStack->Parameters.Create.SecurityContext, pIrp->Flags)); 452 452 if (pFileObj) 453 453 Log(("VBOXSF: VBoxHookMjCreate: FileName=%.*ls\n", pFileObj->FileName.Length / sizeof(WCHAR), pFileObj->FileName.Buffer));
Note:
See TracChangeset
for help on using the changeset viewer.