Difference between
modified post 952ef by Anonymous on Sat 16th Aug 2025 13:43
original post c290b01 by Anonymous on Thu 31st Jul 2025 12:22
Download diff
Show
old version |
new version |
both versions
| 1 | 1 | # ---- snip ---- | |
| 2 | 2 | # $ powershell -Command 'Mount-DiskImage -ImagePath "\\10.49.202.230@2049\nfs4\xfstestfs001\test2\vhdtest\v2.img"' | |
| 3 | - | # Mount-DiskImage : Die Anforderung wird nicht unterstützt. | |
| 3 | + | # Mount-DiskImage : Der angeforderte Vorgang konnte aufgrund einer Dateisystemeinschränkung nicht abgeschlossen werden. | |
| 4 | 4 | # In Zeile:1 Zeichen:1 | |
| 5 | - | # + Mount-DiskImage -ImagePath "\\10.49.202.230@2049\nfs4\xfstestfs001\te ... | |
| 5 | + | # + Mount-DiskImage -ImagePath L:\download\debian-12.4.0-amd64-DVD-1.iso | |
| 6 | - | # + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 6 | + | # + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 7 | - | # + CategoryInfo : InvalidOperation: (MSFT_DiskImage:ROOT/Microsoft/.../MSFT_DiskImage) [Mount-DiskImage], CimException | |
| 7 | + | # + CategoryInfo : NotSpecified: (MSFT_DiskImage:ROOT/Microsoft/.../MSFT_DiskImage) [Mount-DiskImage], CimException | |
| 8 | - | # + FullyQualifiedErrorId : HRESULT 0x80070032,Mount-DiskImage | |
| 8 | + | # + FullyQualifiedErrorId : HRESULT 0x80070299,Mount-DiskImage | |
| 9 | 9 | # ---- snip ---- | |
| 10 | 10 | ||
| 11 | - | diff --git a/daemon/nfs41_superblock.c b/daemon/nfs41_superblock.c | |
| 11 | + | diff --git a/daemon/fileinfoutil.c b/daemon/fileinfoutil.c | |
| 12 | - | index 977a4c1..8812eb4 100644 | |
| 12 | + | index 2556c87..925f537 100644 | |
| 13 | - | --- a/daemon/nfs41_superblock.c | |
| 13 | + | --- a/daemon/fileinfoutil.c | |
| 14 | - | +++ b/daemon/nfs41_superblock.c | |
| 14 | + | +++ b/daemon/fileinfoutil.c | |
| 15 | - | @@ -194,6 +194,7 @@ void nfs41_superblock_fs_attributes( | |
| 15 | + | @@ -221,7 +221,7 @@ void nfs_to_remote_protocol_info( | |
| 20 | 16 | ||
| 21 | - | if (superblock->link_support) | |
| 17 | + | rpi_out->StructureVersion = 4; | |
| 22 | - | FsAttrs->FileSystemAttributes |= FILE_SUPPORTS_HARD_LINKS; | |
| 18 | + | rpi_out->StructureSize = sizeof(FILE_REMOTE_PROTOCOL_INFORMATION); | |
| 23 | - | diff --git a/sys/nfs41sys_fileinfo.c b/sys/nfs41sys_fileinfo.c | |
| 19 | + | - rpi_out->Protocol = WNNC_NET_RDR2SAMPLE; /* FIXME! */ | |
| 24 | - | index d7dc5e7..70f211a 100644 | |
| 20 | + | + rpi_out->Protocol = WNNC_NET_SMB; // WNNC_NET_RDR2SAMPLE; /* FIXME! */ | |
| 25 | - | --- a/sys/nfs41sys_fileinfo.c | |
| 21 | + | ||
| 26 | - | +++ b/sys/nfs41sys_fileinfo.c | |
| 22 | + | /* ToDo: Add pNFS info */ | |
| 27 | - | @@ -374,13 +374,13 @@ NTSTATUS nfs41_QueryFileInformation( | |
| 23 | + | rpi_out->ProtocolMajorVersion = 4; | |
| 28 | - | case FileInternalInformation: | |
| 24 | + | diff --git a/daemon/nfs41_superblock.c b/daemon/nfs41_superblock.c | |
| 29 | - | case FileAttributeTagInformation: | |
| 25 | + | index eb8a938..92cfeac 100644 | |
| 30 | - | case FileNetworkOpenInformation: | |
| 26 | + | --- a/daemon/nfs41_superblock.c | |
| 31 | - | - case FileRemoteProtocolInformation: | |
| 27 | + | +++ b/daemon/nfs41_superblock.c | |
| 32 | - | case FileIdInformation: | |
| 28 | + | @@ -194,6 +194,7 @@ void nfs41_superblock_fs_attributes( | |
| 33 | - | #ifdef NFS41_DRIVER_WSL_SUPPORT | |
| 29 | + | FsAttrs->FileSystemAttributes |= FILE_SUPPORTS_SPARSE_FILES; | |
| 34 | - | case FileStatInformation: | |
| 30 | + | /* NFSv4 protocol uses Unicode by default */ | |
| 35 | - | case FileStatLxInformation: | |
| 31 | + | FsAttrs->FileSystemAttributes |= FILE_UNICODE_ON_DISK; | |
| 36 | - | #endif /* NFS41_DRIVER_WSL_SUPPORT */ | |
| 32 | + | + FsAttrs->FileSystemAttributes |= FILE_SUPPORTS_OBJECT_IDS; | |
| 37 | - | break; | |
| 33 | + | ||
| 38 | - | + case FileRemoteProtocolInformation: | |
| 34 | + | /* We support |FileCaseSensitiveInformation| to query each dir */ | |
| 39 | - | default: | |
| 35 | + | FsAttrs->FileSystemAttributes |= FILE_SUPPORTS_CASE_SENSITIVE_DIRS; | |
| 40 | - | print_error("nfs41_QueryFileInformation: unhandled class %d\n", InfoClass); | |
| 36 | + | @@ -218,8 +219,8 @@ void nfs41_superblock_fs_attributes( | |
| 41 | - | status = STATUS_NOT_SUPPORTED; | |
| 37 | + | ||
| 42 | - | diff --git a/sys/nfs41sys_fsctl.c b/sys/nfs41sys_fsctl.c | |
| 38 | + | /* let the driver fill in FileSystemName */ | |
| 43 | - | index c1a3f2b..972792c 100644 | |
| 39 | + | #if ((NFS41_DRIVER_DEBUG_FS_NAME) == 1) | |
| 44 | - | --- a/sys/nfs41sys_fsctl.c | |
| 40 | + | - (void)wcscpy(FsAttrs->FileSystemName, L"NFS"); | |
| 45 | - | +++ b/sys/nfs41sys_fsctl.c | |
| 41 | + | - FsAttrs->FileSystemNameLength = 3*sizeof(wchar_t); | |
| 46 | - | @@ -895,6 +895,24 @@ NTSTATUS nfs41_FsCtl( | |
| 42 | + | + (void)wcscpy(FsAttrs->FileSystemName, L"NTFS"); | |
| 47 | - | case FSCTL_DUPLICATE_EXTENTS_TO_FILE: | |
| 43 | + | + FsAttrs->FileSystemNameLength = 4*sizeof(wchar_t); | |
| 48 | - | status = nfs41_DuplicateData(RxContext); | |
| 44 | + | #elif ((NFS41_DRIVER_DEBUG_FS_NAME) == 2) | |
| 49 | - | break; | |
| 45 | + | (void)wcscpy(FsAttrs->FileSystemName, L"DEBUG-NFS41"); | |
| 50 | - | + case FSCTL_CREATE_OR_GET_OBJECT_ID: | |
| 46 | + | FsAttrs->FileSystemNameLength = 11*sizeof(wchar_t); | |
| 51 | - | + case FSCTL_GET_OBJECT_ID: | |
| 47 | + | diff --git a/daemon/volume.c b/daemon/volume.c | |
| 52 | - | + __notnull XXCTL_LOWIO_COMPONENT *FsCtl = | |
| 48 | + | index dbb2431..e836d74 100644 | |
| 53 | - | + &RxContext->LowIoContext.ParamsFor.FsCtl; | |
| 49 | + | --- a/daemon/volume.c | |
| 54 | - | + __notnull PNFS41_FCB nfs41_fcb = NFS41GetFcbExtension(RxContext->pFcb); | |
| 50 | + | +++ b/daemon/volume.c | |
| 55 | - | + __notnull PFILE_OBJECTID_BUFFER objidbuf = | |
| 51 | + | @@ -36,7 +36,7 @@ | |
| 56 | - | + (PFILE_OBJECTID_BUFFER)FsCtl->pOutputBuffer; | |
| 52 | + | /* windows volume queries want size in 'units', so we have to | |
| 57 | - | + if (objidbuf) { | |
| 53 | + | * convert the nfs space_* attributes from bytes to units */ | |
| 58 | - | + ULONGLONG xor_fsid = nfs41_fcb->fsid_major ^ nfs41_fcb->fsid_minor; | |
| 54 | + | #define SECTORS_PER_UNIT 8 | |
| 59 | - | + (void)memset(objidbuf, 0, sizeof(FILE_OBJECTID_BUFFER)); | |
| 55 | + | -#define BYTES_PER_SECTOR 1024 | |
| 60 | - | + (void)memcpy(&objidbuf->ObjectId[0], &nfs41_fcb->fileid, sizeof(ULONGLONG)); | |
| 56 | + | +#define BYTES_PER_SECTOR 512 | |
| 61 | - | + (void)memcpy(&objidbuf->ObjectId[8], &xor_fsid, sizeof(ULONGLONG)); | |
| 57 | + | #define BYTES_PER_UNIT (SECTORS_PER_UNIT * BYTES_PER_SECTOR) | |
| 62 | - | + status = STATUS_SUCCESS; | |
| 58 | + | ||
| 63 | - | + } | |
| 59 | + | #define TO_UNITS(bytes) (bytes / BYTES_PER_UNIT) | |
| 64 | - | + else { | |
| 60 | + | diff --git a/sys/nfs41sys_fsctl.c b/sys/nfs41sys_fsctl.c | |
| 65 | - | + status = STATUS_INVALID_USER_BUFFER; | |
| 61 | + | index c1a3f2b..972792c 100644 | |
| 66 | - | + } | |
| 62 | + | --- a/sys/nfs41sys_fsctl.c | |
| 67 | - | + break; | |
| 63 | + | +++ b/sys/nfs41sys_fsctl.c | |
| 68 | - | default: | |
| 64 | + | @@ -895,6 +895,24 @@ NTSTATUS nfs41_FsCtl( | |
| 65 | + | case FSCTL_DUPLICATE_EXTENTS_TO_FILE: | |
| 69 | 67 | break; | |
| 70 | - | } | |
| 68 | + | + case FSCTL_CREATE_OR_GET_OBJECT_ID: | |
| 71 | - | diff --git a/sys/nfs41sys_volinfo.c b/sys/nfs41sys_volinfo.c | |
| 69 | + | + case FSCTL_GET_OBJECT_ID: | |
| 72 | - | index e663d0b..1824c6c 100644 | |
| 70 | + | + __notnull XXCTL_LOWIO_COMPONENT *FsCtl = | |
| 73 | - | --- a/sys/nfs41sys_volinfo.c | |
| 71 | + | + &RxContext->LowIoContext.ParamsFor.FsCtl; | |
| 74 | - | +++ b/sys/nfs41sys_volinfo.c | |
| 72 | + | + __notnull PNFS41_FCB nfs41_fcb = NFS41GetFcbExtension(RxContext->pFcb); | |
| 75 | - | @@ -177,11 +177,31 @@ NTSTATUS nfs41_QueryVolumeInformation( | |
| 73 | + | + __notnull PFILE_OBJECTID_BUFFER objidbuf = | |
| 76 | - | goto out; | |
| 74 | + | + (PFILE_OBJECTID_BUFFER)FsCtl->pOutputBuffer; | |
| 77 | - | } | |
| 75 | + | + if (objidbuf) { | |
| 78 | - | pDevInfo->DeviceType = RxContext->pFcb->pNetRoot->DeviceType; | |
| 76 | + | + ULONGLONG xor_fsid = nfs41_fcb->fsid_major ^ nfs41_fcb->fsid_minor; | |
| 79 | - | - pDevInfo->Characteristics = FILE_REMOTE_DEVICE | FILE_DEVICE_IS_MOUNTED; | |
| 77 | + | + (void)memset(objidbuf, 0, sizeof(FILE_OBJECTID_BUFFER)); | |
| 80 | - | + pDevInfo->Characteristics = /*FILE_REMOTE_DEVICE |*/ FILE_DEVICE_IS_MOUNTED; | |
| 78 | + | + (void)memcpy(&objidbuf->ObjectId[0], &nfs41_fcb->fileid, sizeof(ULONGLONG)); | |
| 81 | - | RxContext->Info.LengthRemaining -= SizeUsed; | |
| 79 | + | + (void)memcpy(&objidbuf->ObjectId[8], &xor_fsid, sizeof(ULONGLONG)); | |
| 82 | - | status = STATUS_SUCCESS; | |
| 80 | + | + status = STATUS_SUCCESS; | |
| 83 | - | goto out; | |
| 81 | + | + } | |
| 82 | + | + else { | |
| 84 | 88 | } | |
| 89 | + | diff --git a/sys/nfs41sys_volinfo.c b/sys/nfs41sys_volinfo.c | |
| 85 | 97 | + case FileFsObjectIdInformation: | |
| 86 | 98 | + { | |
| 87 | 99 | + PFILE_FS_OBJECTID_INFORMATION pObjIdInfo = RxContext->Info.Buffer; | |
| 88 | 100 | + | |
| 89 | 101 | + SizeUsed = sizeof(FILE_FS_OBJECTID_INFORMATION); | |
| 90 | 102 | + if (RemainingLength < SizeUsed) { | |
| 91 | 103 | + status = STATUS_BUFFER_TOO_SMALL; | |
| 92 | 104 | + RxContext->InformationToReturn = SizeUsed; | |
| 93 | 105 | + goto out; | |
| 94 | 106 | + } | |
| 95 | 107 | + | |
| 96 | 108 | + (void)memset(pObjIdInfo, 0, sizeof(FILE_FS_OBJECTID_INFORMATION)); | |
| 97 | 109 | + const ULONGLONG nfs41GUID = 0xDEADBEEF; | |
| 98 | 110 | + (void)memcpy(&pObjIdInfo->ObjectId[0], &nfs41GUID, sizeof(ULONGLONG)); | |
| 99 | 111 | + | |
| 100 | 112 | + RxContext->Info.LengthRemaining -= SizeUsed; | |
| 101 | 113 | + status = STATUS_SUCCESS; | |
| 102 | 114 | + goto out; | |
| 103 | 115 | + } | |
| 104 | 116 | + | |
| 105 | 117 | ||
| 106 | 118 | case FileFsAttributeInformation: | |
| 107 | 119 | case FileFsSizeInformation: | |
| 108 | 120 |
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
nrubsig.kpaste.net RSS