Skip to content

Commit

Permalink
Remove some PAGED_CODE() assert calls.
Browse files Browse the repository at this point in the history
According to chatgpt:

Which IRPs Might Arrive at DISPATCH_LEVEL?
IRP_MJ_CREATE – Typically PASSIVE_LEVEL, but some scenarios (e.g., fast I/O) may elevate IRQL.
IRP_MJ_READ / IRP_MJ_WRITE – Can be called at DISPATCH_LEVEL (e.g., paging I/O).
IRP_MJ_FLUSH_BUFFERS – Can be at DISPATCH_LEVEL (especially in cache flush operations).
IRP_MJ_PNP / IRP_MJ_POWER – These are often called at DISPATCH_LEVEL.

Signed-off-by: Jorgen Lundman <[email protected]>
  • Loading branch information
lundman committed Feb 8, 2025
1 parent 34f29e3 commit 5b8b0ff
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions module/os/windows/zfs/zfs_vnops_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -4987,7 +4987,6 @@ fs_read(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
PFILE_OBJECT FileObject = IrpSp->FileObject;
boolean_t acquired_vp_lock = FALSE, wait;
uint64_t bytes_read;
PAGED_CODE();

top_level = is_top_level(Irp);

Expand Down Expand Up @@ -5644,8 +5643,6 @@ fs_write(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
int error;
int pagingio = FlagOn(Irp->Flags, IRP_PAGING_IO);

PAGED_CODE();

#if 0
dprintf(" %s minor type %d flags 0x%x mdl %d System %d "
"User %d paging %d\n", __func__, IrpSp->MinorFunction,
Expand Down Expand Up @@ -6772,8 +6769,6 @@ _Function_class_(DRIVER_DISPATCH)
PIRP Irp = *PIrp;
ZFS_DRIVER_EXTENSION(WIN_DriverObject, DriverExtension);

PAGED_CODE();

dprintf(" %s: enter: major %d: minor %d: %s busDeviceObject\n",
__func__, IrpSp->MajorFunction, IrpSp->MinorFunction,
major2str(IrpSp->MajorFunction, IrpSp->MinorFunction));
Expand Down Expand Up @@ -6927,8 +6922,6 @@ _Function_class_(DRIVER_DISPATCH)
PIRP Irp = *PIrp;
ZFS_DRIVER_EXTENSION(WIN_DriverObject, DriverExtension);

PAGED_CODE();

dprintf(" %s: enter: major %d: minor %d: %s ioctlDeviceObject\n",
__func__, IrpSp->MajorFunction, IrpSp->MinorFunction,
major2str(IrpSp->MajorFunction, IrpSp->MinorFunction));
Expand Down Expand Up @@ -7169,8 +7162,6 @@ _Function_class_(DRIVER_DISPATCH)
NTSTATUS Status;
PIRP Irp = *PIrp;

PAGED_CODE();

dprintf(" %s: enter: major %d: minor %d: %s diskDeviceObject\n",
__func__, IrpSp->MajorFunction, IrpSp->MinorFunction,
major2str(IrpSp->MajorFunction, IrpSp->MinorFunction));
Expand Down Expand Up @@ -7517,7 +7508,6 @@ _Function_class_(DRIVER_DISPATCH)
struct vnode *hold_vp = NULL;
PIRP Irp = *PIrp;
ULONG len = 0;
PAGED_CODE();

dprintf(" %s: enter: major %d: minor %d: %s fsDeviceObject\n",
__func__, IrpSp->MajorFunction, IrpSp->MinorFunction,
Expand Down Expand Up @@ -8024,10 +8014,6 @@ _Function_class_(DRIVER_DISPATCH)
NTSTATUS Status = STATUS_NOT_IMPLEMENTED;
mount_t *zmo = NULL;

// Storport can call itself (and hence, ourselves) so this isn't
// always true.
PAGED_CODE();

// dprintf("%s: enter\n", __func__);

// If we were called with our file system device object instead of a
Expand Down

0 comments on commit 5b8b0ff

Please sign in to comment.