Skip to content

Commit 4a3df8d

Browse files
committed
Add FileFsObjectIdInformation
Appears to be used in Win11 smb. Signed-off-by: Jorgen Lundman <lundman@lundman.net>
1 parent d16e19a commit 4a3df8d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

module/os/windows/zfs/zfs_vnops_windows.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2372,14 +2372,15 @@ query_volume_information(PDEVICE_OBJECT DeviceObject, PIRP Irp,
23722372

23732373
case FileFsObjectIdInformation:
23742374
dprintf("* %s: FileFsObjectIdInformation\n", __func__);
2375-
FILE_FS_OBJECTID_INFORMATION* ffoi =
2375+
FILE_FS_OBJECTID_INFORMATION *ffoi =
23762376
Irp->AssociatedIrp.SystemBuffer;
2377-
// RtlCopyMemory(ffoi->ObjectId, &Vcb->superblock.uuid.uuid[0],
2378-
// sizeof (UCHAR) * 16);
2377+
RtlZeroMemory(ffoi->ObjectId, sizeof (ffoi->ObjectId));
2378+
uint64_t guid = dmu_objset_fsid_guid(zfsvfs->z_os);
2379+
RtlCopyMemory(ffoi->ObjectId, &guid, sizeof (ffoi->ObjectId));
23792380
RtlZeroMemory(ffoi->ExtendedInfo, sizeof (ffoi->ExtendedInfo));
23802381
Irp->IoStatus.Information =
23812382
sizeof (FILE_FS_OBJECTID_INFORMATION);
2382-
Status = STATUS_OBJECT_NAME_NOT_FOUND; // returned by NTFS
2383+
Status = STATUS_SUCCESS;
23832384
break;
23842385

23852386
case FileFsVolumeInformation:
@@ -3378,6 +3379,7 @@ create_or_get_object_id(PDEVICE_OBJECT DeviceObject, PIRP Irp,
33783379
RtlCopyMemory(&fob->ObjectId[0], &zp->z_id, sizeof (UINT64));
33793380
uint64_t guid = dmu_objset_fsid_guid(zfsvfs->z_os);
33803381
RtlCopyMemory(&fob->ObjectId[sizeof (UINT64)], &guid, sizeof (UINT64));
3382+
RtlZeroMemory(fob->ExtendedInfo, sizeof (fob->ExtendedInfo));
33813383

33823384
VN_RELE(vp);
33833385

0 commit comments

Comments
 (0)