- # ---- snip ----
- # $ powershell -Command 'Mount-DiskImage -ImagePath "\\10.49.202.230@2049\nfs4\xfstestfs001\test2\vhdtest\v2.img"'
- # Mount-DiskImage : Die Anforderung wird nicht unterstützt.
- # In Zeile:1 Zeichen:1
- # + Mount-DiskImage -ImagePath "\\10.49.202.230@2049\nfs4\xfstestfs001\te ...
- # + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # + CategoryInfo : InvalidOperation: (MSFT_DiskImage:ROOT/Microsoft/.../MSFT_DiskImage) [Mount-DiskImage], CimException
- # + FullyQualifiedErrorId : HRESULT 0x80070032,Mount-DiskImage
- # ---- snip ----
- diff --git a/daemon/nfs41_superblock.c b/daemon/nfs41_superblock.c
- index 977a4c1..8812eb4 100644
- --- a/daemon/nfs41_superblock.c
- +++ b/daemon/nfs41_superblock.c
- @@ -194,6 +194,7 @@ void nfs41_superblock_fs_attributes(
- FsAttrs->FileSystemAttributes |= FILE_SUPPORTS_SPARSE_FILES;
- /* NFSv4 protocol uses Unicode by default */
- FsAttrs->FileSystemAttributes |= FILE_UNICODE_ON_DISK;
- + FsAttrs->FileSystemAttributes |= FILE_SUPPORTS_OBJECT_IDS;
- if (superblock->link_support)
- FsAttrs->FileSystemAttributes |= FILE_SUPPORTS_HARD_LINKS;
- diff --git a/sys/nfs41sys_fileinfo.c b/sys/nfs41sys_fileinfo.c
- index d7dc5e7..70f211a 100644
- --- a/sys/nfs41sys_fileinfo.c
- +++ b/sys/nfs41sys_fileinfo.c
- @@ -374,13 +374,13 @@ NTSTATUS nfs41_QueryFileInformation(
- case FileInternalInformation:
- case FileAttributeTagInformation:
- case FileNetworkOpenInformation:
- - case FileRemoteProtocolInformation:
- case FileIdInformation:
- #ifdef NFS41_DRIVER_WSL_SUPPORT
- case FileStatInformation:
- case FileStatLxInformation:
- #endif /* NFS41_DRIVER_WSL_SUPPORT */
- break;
- + case FileRemoteProtocolInformation:
- default:
- print_error("nfs41_QueryFileInformation: unhandled class %d\n", InfoClass);
- status = STATUS_NOT_SUPPORTED;
- diff --git a/sys/nfs41sys_fsctl.c b/sys/nfs41sys_fsctl.c
- index c1a3f2b..972792c 100644
- --- a/sys/nfs41sys_fsctl.c
- +++ b/sys/nfs41sys_fsctl.c
- @@ -895,6 +895,24 @@ NTSTATUS nfs41_FsCtl(
- case FSCTL_DUPLICATE_EXTENTS_TO_FILE:
- status = nfs41_DuplicateData(RxContext);
- break;
- + case FSCTL_CREATE_OR_GET_OBJECT_ID:
- + case FSCTL_GET_OBJECT_ID:
- + __notnull XXCTL_LOWIO_COMPONENT *FsCtl =
- + &RxContext->LowIoContext.ParamsFor.FsCtl;
- + __notnull PNFS41_FCB nfs41_fcb = NFS41GetFcbExtension(RxContext->pFcb);
- + __notnull PFILE_OBJECTID_BUFFER objidbuf =
- + (PFILE_OBJECTID_BUFFER)FsCtl->pOutputBuffer;
- + if (objidbuf) {
- + ULONGLONG xor_fsid = nfs41_fcb->fsid_major ^ nfs41_fcb->fsid_minor;
- + (void)memset(objidbuf, 0, sizeof(FILE_OBJECTID_BUFFER));
- + (void)memcpy(&objidbuf->ObjectId[0], &nfs41_fcb->fileid, sizeof(ULONGLONG));
- + (void)memcpy(&objidbuf->ObjectId[8], &xor_fsid, sizeof(ULONGLONG));
- + status = STATUS_SUCCESS;
- + }
- + else {
- + status = STATUS_INVALID_USER_BUFFER;
- + }
- + break;
- default:
- break;
- }
- diff --git a/sys/nfs41sys_volinfo.c b/sys/nfs41sys_volinfo.c
- index e663d0b..1824c6c 100644
- --- a/sys/nfs41sys_volinfo.c
- +++ b/sys/nfs41sys_volinfo.c
- @@ -177,11 +177,31 @@ NTSTATUS nfs41_QueryVolumeInformation(
- goto out;
- }
- pDevInfo->DeviceType = RxContext->pFcb->pNetRoot->DeviceType;
- - pDevInfo->Characteristics = FILE_REMOTE_DEVICE | FILE_DEVICE_IS_MOUNTED;
- + pDevInfo->Characteristics = /*FILE_REMOTE_DEVICE |*/ FILE_DEVICE_IS_MOUNTED;
- RxContext->Info.LengthRemaining -= SizeUsed;
- status = STATUS_SUCCESS;
- goto out;
- }
- + case FileFsObjectIdInformation:
- + {
- + PFILE_FS_OBJECTID_INFORMATION pObjIdInfo = RxContext->Info.Buffer;
- +
- + SizeUsed = sizeof(FILE_FS_OBJECTID_INFORMATION);
- + if (RemainingLength < SizeUsed) {
- + status = STATUS_BUFFER_TOO_SMALL;
- + RxContext->InformationToReturn = SizeUsed;
- + goto out;
- + }
- +
- + (void)memset(pObjIdInfo, 0, sizeof(FILE_FS_OBJECTID_INFORMATION));
- + const ULONGLONG nfs41GUID = 0xDEADBEEF;
- + (void)memcpy(&pObjIdInfo->ObjectId[0], &nfs41GUID, sizeof(ULONGLONG));
- +
- + RxContext->Info.LengthRemaining -= SizeUsed;
- + status = STATUS_SUCCESS;
- + goto out;
- + }
- +
- case FileFsAttributeInformation:
- case FileFsSizeInformation:
Mount-DiskImage experiments
Posted by Anonymous on Thu 31st Jul 2025 12:22
raw | new post
view followups (newest first): Mount-DiskImage experiments by Anonymous
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.