IRP_MJ_FILE_SYSTEM_CONTROL not called

Hello,
I need help,

I’m on a filesystem driver,
I create in the DriverEntry the device
FILE_DEVICE_CD_ROM_FILE_SYSTEM
AND Then the device
FILE_DEVICE_DISK_FILE_SYSTEM
And I call the function IoRegisterFileSystem function on both

And later I create the device named “lambda”
FILE_DEVICE_DISK,

The IRP_MJ_FILE_SYSTEM_CONTROL function of the “lambda” device is not called.
Why ?
I need it to mount the disk FILE_DISK_FILE_SYSTEM

I need help.
I’ve been looking for 10 hours.

Extract code :

NTSTATUS
DrvDispatch (
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
{
PIO_STACK_LOCATION irps;
NTSTATUS status=STATUS_NOT_IMPLEMENTED;
KdPrintf((“[VFUM] control\n”));
irps=NULL;
if (Irp!=NULL)
{
irps = IoGetCurrentIrpStackLocation(Irp);
//if (irps!=NULL)

KdPrintfd((“[VFUM] vfums_control : Device:%x Majorfunction %d irp %x\n”,DeviceObject,irps->MajorFunction,Irp));
{
if (irps->MajorFunction==IRP_MJ_SYSTEM_CONTROL)
{
KdPrintfd((“IRP_MJ_SYSTEM_CONTROL\n”));
}
if (irps->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL)
{
KdPrintfd((“IRP_MJ_FILE_SYSTEM_CONTROL\n”));
}
} …

}

I dont see in the log ‘IRP_MJ_FILE_SYSTEM_CONTROL’

I will put other extract code in night.

Thank.

For Mount Mgr to recognize your device and resulting in an attempt to
load a file system on it, you need to register for the mounted device
interface using MOUNTDEV_MOUNTED_DEVICE_GUID. Then your mountable device
will receive a bunch of IOCtls you need to handle from the system as
well as Mount Mgr. After this point you’ll receive a mount request if
you’ve done everything correctly.

Pete


Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com
866.263.9295

------ Original Message ------
From: xxxxx@gmail.com
To: “Windows File Systems Devs Interest List”
Sent: 7/13/2017 4:05:39 AM
Subject: [ntfsd] IRP_MJ_FILE_SYSTEM_CONTROL not called

>Hello,
>I need help,
>
>I’m on a filesystem driver,
>I create in the DriverEntry the device
> FILE_DEVICE_CD_ROM_FILE_SYSTEM
>AND Then the device
> FILE_DEVICE_DISK_FILE_SYSTEM
>And I call the function IoRegisterFileSystem function on both
>
>And later I create the device named “lambda”
>FILE_DEVICE_DISK,
>
>The IRP_MJ_FILE_SYSTEM_CONTROL function of the “lambda” device is not
>called.
>Why ?
>I need it to mount the disk FILE_DISK_FILE_SYSTEM
>
>I need help.
>I’ve been looking for 10 hours.
>
>
>Extract code :
>
>
>NTSTATUS
>DrvDispatch (
> IN PDEVICE_OBJECT DeviceObject,
> IN PIRP Irp
> )
>{
> PIO_STACK_LOCATION irps;
> NTSTATUS status=STATUS_NOT_IMPLEMENTED;
> KdPrintf((“[VFUM] control\n”));
> irps=NULL;
> if (Irp!=NULL)
> {
> irps = IoGetCurrentIrpStackLocation(Irp);
> //if (irps!=NULL)
>
> KdPrintfd((“[VFUM] vfums_control : Device:%x Majorfunction %d irp
>%x\n”,DeviceObject,irps->MajorFunction,Irp));
> {
> if (irps->MajorFunction==IRP_MJ_SYSTEM_CONTROL)
> {
> KdPrintfd((“IRP_MJ_SYSTEM_CONTROL\n”));
> }
> if (irps->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL)
> {
> KdPrintfd((“IRP_MJ_FILE_SYSTEM_CONTROL\n”));
> }
> } …
>…
>}
>
>I dont see in the log ‘IRP_MJ_FILE_SYSTEM_CONTROL’
>
>I will put other extract code in night.
>
>
>Thank.
>
>—
>NTFSD is sponsored by OSR
>
>
>MONTHLY seminars on crash dump analysis, WDF, Windows internals and
>software drivers!
>Details at http:
>
>To unsubscribe, visit the List Server section of OSR Online at
>http:</http:></http:>

You can also trigger a mount by opening the root directory on the disk
device (e.g. CreateFile(“\\.\lambda\”, …):wink:

-scott
OSR
@OSRDrivers

wrote in message news:xxxxx@ntfsd…

For Mount Mgr to recognize your device and resulting in an attempt to
load a file system on it, you need to register for the mounted device
interface using MOUNTDEV_MOUNTED_DEVICE_GUID. Then your mountable device
will receive a bunch of IOCtls you need to handle from the system as
well as Mount Mgr. After this point you’ll receive a mount request if
you’ve done everything correctly.

Pete


Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com
866.263.9295

------ Original Message ------
From: xxxxx@gmail.com
To: “Windows File Systems Devs Interest List”
Sent: 7/13/2017 4:05:39 AM
Subject: [ntfsd] IRP_MJ_FILE_SYSTEM_CONTROL not called

>Hello,
>I need help,
>
>I’m on a filesystem driver,
>I create in the DriverEntry the device
> FILE_DEVICE_CD_ROM_FILE_SYSTEM
>AND Then the device
> FILE_DEVICE_DISK_FILE_SYSTEM
>And I call the function IoRegisterFileSystem function on both
>
>And later I create the device named “lambda”
>FILE_DEVICE_DISK,
>
>The IRP_MJ_FILE_SYSTEM_CONTROL function of the “lambda” device is not
>called.
>Why ?
>I need it to mount the disk FILE_DISK_FILE_SYSTEM
>
>I need help.
>I’ve been looking for 10 hours.
>
>
>Extract code :
>
>
>NTSTATUS
>DrvDispatch (
> IN PDEVICE_OBJECT DeviceObject,
> IN PIRP Irp
> )
>{
> PIO_STACK_LOCATION irps;
> NTSTATUS status=STATUS_NOT_IMPLEMENTED;
> KdPrintf((“[VFUM] control\n”));
> irps=NULL;
> if (Irp!=NULL)
> {
> irps = IoGetCurrentIrpStackLocation(Irp);
> //if (irps!=NULL)
>
> KdPrintfd((“[VFUM] vfums_control : Device:%x Majorfunction %d irp
> %x\n”,DeviceObject,irps->MajorFunction,Irp));
> {
> if (irps->MajorFunction==IRP_MJ_SYSTEM_CONTROL)
> {
> KdPrintfd((“IRP_MJ_SYSTEM_CONTROL\n”));
> }
> if (irps->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL)
> {
> KdPrintfd((“IRP_MJ_FILE_SYSTEM_CONTROL\n”));
> }
> } …
>…
>}
>
>I dont see in the log ‘IRP_MJ_FILE_SYSTEM_CONTROL’
>
>I will put other extract code in night.
>
>
>Thank.
>
>—
>NTFSD is sponsored by OSR
>
>
>MONTHLY seminars on crash dump analysis, WDF, Windows internals and
>software drivers!
>Details at http:
>
>To unsubscribe, visit the List Server section of OSR Online at
>http:</http:></http:>