The system knows which filesystems to call for mount processing based on the
types it registers for in the IoRegisterFilesystem() api.
If you are correctly registering your FSD’s devices in the driverentry()
routine, then you should be getting the mount request. It is here in the
mount processing entry point, obviously, that you call the IoCreateDevice()
and create a DO to ‘attach’ to the device stack via the VPB.
Have you actually set a breakpoint in the IRP_MJ_FILE_SYSTEM_CONTROL call
and are you certain you are not receiving the mount request for the volume?
Could you be manually starting your FSD too late in the game and the device
has already been mounted by the RAW FS?
Pete
Kernel Drivers
Windows Filesystem and Device Driver Consulting
www.KernelDrivers.com
(303)546-0300
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Diego Rivera
Sent: Monday, March 21, 2005 1:42 PM
To: Windows File Systems Devs Interest List
Cc: xxxxx@lists.osr.com
Subject: Re: [ntfsd] FS Driver and removable devices
It does show up in the partition information. Currently I’m working on
a little program that uses that IOCTL to find the partitions in a
removable disk, identify those which have my FS on them, and auto-mount
them. However, the one remaining hurdle is that if I do that, the
volume objects won’t exist (the same case I explained earlier).
As for how it’s created, I believe IoCreateDevice() is called in the
driver, but for some reason the driver isn’t recognizing the second
(custom) partition as its FS type. The weird thing is that a manual
mount DOES work fine. Here’s the kicker: on Disk Management, I can see
the partition, correct size, but the FS is not recognized (listed as
“(unknown partition)”) and I can’t assign a drive letter or mount path
to it either. The fixed disk partitions ARE recognized and the correct
FS name is listed, can change drive letter/mount path assignments, etc.
So from this I would guess that for some reason, the driver is checking
(implicitly or explicitly) whether it’s a fixed disk or not, and thus
isn’t returining an “I recognize this FS” when asked by the OS. So,
which call is made by the OS to ask the driver about FS types it recognizes?
I’m working on someone else’s code, so I’m not 100% familiar with
Windows FS programming, but I’ve learnt enough that I think I can handle
this modification. Worst case, removable devices won’t be supported for
auto-mount :).
Thanks for your help.
Diego
Peter Scott wrote:
How did you get your ‘volume’ created on this partition in the first place?
Does it actually show up in the partition layout information when requested
from a user mode service via the IOCTL_DISK_GET_PARTITION_INFO_EX?
Pete
Kernel Drivers
Windows Filesystem and Device Driver Consulting
www.KernelDrivers.com
(303)546-0300
-----Original Message-----
From: Diego Rivera [mailto:xxxxx@nomadic-solutions.com]
Sent: Monday, March 21, 2005 11:45 AM
To: xxxxx@KernelDrivers.com
Subject: Re: [ntfsd] FS Driver and removable devices
Yes, it’s a registered file system via IoRegisterFilesystem(). And the
driver does monitor for that request.
However, when I plug in a USB drive with 2 partitions (one FAT and one
with my own filesystem), only the FAT partition is mounted
automatically. The other one I have to mount manually using a command
line utility which in turn uses DefineDosDevice().
After some research, I found that GetVolumeNameForVolumeMountPoint()
returns the correct volume-GUID name for the FAT partition. However, if
the other partition (my custom FS) is mounted on G: (for instance), the
same call (to the corresponding drive letter/path) doesn’t return a
volume-GUID name.
Using WinOBJ I noticed that no volume object was being created to
correspond with that filesystem. Is the driver responsible for creating
this volume? If not, what could be missing?
Thanks for the quick response.
Best
Diego
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@kerneldrivers.com
To unsubscribe send a blank email to xxxxx@lists.osr.com