Skip to content

Commit

Permalink
VSS require certain action to work
Browse files Browse the repository at this point in the history
Signed-off-by: Jorgen Lundman <[email protected]>
  • Loading branch information
lundman committed Feb 6, 2025
1 parent 4e3f86d commit 66a4881
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion module/os/windows/zfs/zfs_vnops_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -6835,7 +6835,7 @@ _Function_class_(DRIVER_DISPATCH)
break;
case IRP_MN_FILTER_RESOURCE_REQUIREMENTS:
dprintf("IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n");
Status = STATUS_SUCCESS;
Status = STATUS_NOT_IMPLEMENTED; // VSS!
break;
case 0x18:
dprintf("IRP_MN_QUERY_LEGACY_BUS_INFORMATION\n");
Expand Down
5 changes: 5 additions & 0 deletions module/os/windows/zfs/zfs_vnops_windows_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -5678,6 +5678,11 @@ QueryDeviceRelations(PDEVICE_OBJECT DeviceObject, PIRP *PIrp,
}
}

if (count == 0 && extra == 0) {
Status = STATUS_NO_SUCH_DEVICE; // VSS
break;
}

// Lets always allocate at least 1, since 0 could corrupt
int allocate = MAX(count + extra, 1);

Expand Down
1 change: 1 addition & 0 deletions module/os/windows/zfs/zfs_vnops_windows_mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -1582,6 +1582,7 @@ zfs_vnop_mount(PDEVICE_OBJECT DiskDevice, PIRP Irp, PIO_STACK_LOCATION IrpSp)
ObDereferenceObject(DeviceToMount);
dprintf("Not FILE_DEVICE_DISK object -- ignoring\n");
// Not a disk device, pass it down
return (STATUS_UNRECOGNIZED_VOLUME); // VSS
return (STATUS_INVALID_DEVICE_REQUEST);
}

Expand Down

0 comments on commit 66a4881

Please sign in to comment.