sys: fsmup device

- This commit introduces the fsmup device, which is a major change in how
network file systems are handled. Previously every network file system's
fsvol device was directly registered with the MUP. Now there is a single
fsmup device that is registered with the MUP; network file systems' fsvol
devices register with fsmup instead. The fsmup device maintains a prefix
table which it uses to demultiplex and forward requests to the appropriate
fsvol device.
- This device change was necessatitated to fix issue #87.
This commit is contained in:
Bill Zissimopoulos
2018-01-16 10:38:52 -08:00
parent 670a38d549
commit a4629b8f8b
12 changed files with 435 additions and 168 deletions

View File

@ -17,45 +17,18 @@
#include <sys/driver.h>
static NTSTATUS FspFsvolShutdown(
PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp);
FSP_DRIVER_DISPATCH FspShutdown;
FSP_IOCMPL_DISPATCH FspFsvolShutdownComplete;
#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGE, FspFsvolShutdown)
#pragma alloc_text(PAGE, FspFsvolShutdownComplete)
#pragma alloc_text(PAGE, FspShutdown)
#endif
static NTSTATUS FspFsvolShutdown(
PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
{
PAGED_CODE();
return STATUS_INVALID_DEVICE_REQUEST;
}
NTSTATUS FspFsvolShutdownComplete(
PIRP Irp, const FSP_FSCTL_TRANSACT_RSP *Response)
{
FSP_ENTER_IOC(PAGED_CODE());
FSP_LEAVE_IOC("%s", "");
}
NTSTATUS FspShutdown(
PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
FSP_ENTER_MJ(PAGED_CODE());
switch (FspDeviceExtension(DeviceObject)->Kind)
{
case FspFsvolDeviceExtensionKind:
FSP_RETURN(Result = FspFsvolShutdown(DeviceObject, Irp, IrpSp));
default:
FSP_RETURN(Result = STATUS_INVALID_DEVICE_REQUEST);
}
FSP_RETURN(Result = STATUS_INVALID_DEVICE_REQUEST);
FSP_LEAVE_MJ("%s", "");
}