mount/unmount a volume

hi,

i’m now working on a file system filter driver and be very confused with the work flow about mount/unmount a volume.

Reference to SFilter, sample code with IFS, I found when i mount a volume,
sometimes it will lead to the code IRP_MJ_FILE_SYSTEM, IRP_MN_MOUNT_VOLUME, sometimes it will not. ;
and maybe cause the code in IRP_MN_MOUNT_VOLUME to be excuted several times.

it seems like unmount a volume works the same way.

and i can not tell it is a mount operation or an unmount operation?

can anybody tell me the the detailed workflow of that.

and also the IoRegisterFsRegistrationChange API. DDK says that if some FSD regconize the volume … how the FSD regconize ?
in sample FILEDISK i can not the code “regconzie”

and when in this request, how to know which volume is going to be mounted/unmouted,like “D:”
btw, how to get the device_object’s name, if it has one.

sorry, maybe i didn’t descript my problem clearly. but i really need your help!

best regard
alex

Hi alexbm,

and maybe cause the code in IRP_MN_MOUNT_VOLUME to
be excuted several times.
The IRP_MN_MOUNT_VOLUME is delevered to the registered FS drivers until one of them recoganises the file system and mounts it successfully.

So, there could be IRP_MN_MOUNT_VOLUMEs delivered but to different FSDs. Only one will succeed for each volume.

How a FS is recoganised depends on the volume being recoganised and on the driver. The driver reads in the volume meta-data and if everything ‘looks’ fine succeeds the request. For example, an ext2 FSD could read in the superblock and do some verification. Get the picture?

You can get the partition information for the volume being mounted by sending down Get Partition Info IOCTL requests.

Have I answered some of your questions?

Regards,

Manoj Paul Joseph

— AChen wrote: > hi,
>
> i’m now working on a file system filter driver and
> be very confused with the work flow about
> mount/unmount a volume.
>
> Reference to SFilter, sample code with IFS, I found
> when i mount a volume,
> sometimes it will lead to the code
> IRP_MJ_FILE_SYSTEM, IRP_MN_MOUNT_VOLUME, sometimes
> it will not. ;
> and maybe cause the code in IRP_MN_MOUNT_VOLUME to
> be excuted several times.
>
> it seems like unmount a volume works the same way.
>
> and i can not tell it is a mount operation or an
> unmount operation?
>
> can anybody tell me the the detailed workflow of
> that.
>
> and also the IoRegisterFsRegistrationChange API. DDK
> says that if some FSD regconize the volume … how
> the FSD regconize ?
> in sample FILEDISK i can not the code “regconzie”
>
> and when in this request, how to know which volume
> is going to be mounted/unmouted,like “D:”
> btw, how to get the device_object’s name, if it has
> one.
>
> sorry, maybe i didn’t descript my problem clearly.
> but i really need your help!
>
> best regard
> alexb‹š­ç.®·§¶\¬¹»®&ÞvÚ’µûjÉšžˆéº¶²‰Ö­†)rj(r‰“¢éì¹»®&Þ±éÝi¹ZžG¦j)m¢Wš½éí~Çzón‡–±²‹+r‰

-----------------------------------
Manoj Paul Joseph,
Master of Computer Applications (final year student),
School of Computer Science and Engineering,
Anna University,
Chennai (Madras),
India.

---------------------------------
Download Yahoo! Score Tracker for live cricket scores on your desktop

thanks!

the SFILTER sample code, create a filter device to attach to \DEVICE\RAWDISK, so there may be more than

one such IRP to be intercept by this device, but only one will succeeds, RIGHT ?

when i insert a floppy, and click the A: in the explore, this will be sent at least two times, i think.
when i format a floppy, it will be sent several times again. why?

and where can i get much information about this ?

thanks again,

alex

-----???-----
???: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]?? Manoj Paul Joseph
???: 2002?4?29? 23:01
???: File Systems Developers
??: [ntfsd] Re: mount/unmount a volume

Hi alexbm,
> and maybe cause the code in IRP_MN_MOUNT_VOLUME to
> be excuted several times.
The IRP_MN_MOUNT_VOLUME is delevered to the registered FS drivers until one of them recoganises the file system and mounts it successfully.

So, there could be IRP_MN_MOUNT_VOLUMEs delivered but to different FSDs. Only one will succeed for each volume.

How a FS is recoganised depends on the volume being recoganised and on the driver. The driver reads in the volume meta-data and if everything ‘looks’ fine succeeds the request. For example, an ext2 FSD could read in the superblock and do some verification. Get the picture?

You can get the partition information for the volume being mounted by sending down Get Partition Info IOCTL requests.

Have I answered some of your questions?

Regards,

Manoj Paul Joseph

— AChen wrote: > hi,
>
> i’m now working on a file system filter driver and
> be very confused with the work flow about
> mount/unmount a volume.
>
> Reference to SFilter, sample code with IFS, I found
> when i mount a volume,
> sometimes it will lead to the code
> IRP_MJ_FILE_SYSTEM, IRP_MN_MOUNT_VOLUME, sometimes
> it will not. ;
> and maybe cause the code in IRP_MN_MOUNT_VOLUME to
> be excuted several times.
>
> it seems like unmount a volume works the same way.
>
> and i can not tell it is a mount operation or an
> unmount operation?
>
> can anybody tell me the the detailed workflow of
> that.
>
> and also the IoRegisterFsRegistrationChange API. DDK
> says that if some FSD regconize the volume … how
> the FSD regconize ?
> in sample FILEDISK i can not the code “regconzie”
>
> and when in this request, how to know which volume
> is going to be mounted/unmouted,like “D:”
> btw, how to get the device_object’s name, if it has
> one.
>
> sorry, maybe i didn’t descript my problem clearly.
> but i really need your help!
>
> best regard
> alexb???.???????&?v?'??jɚ??麶??֭?)rj(r???칻?&ޱ??i?Z?G?j)m?W???~?z?n??±??+r?

-----------------------------------
Manoj Paul Joseph,
Master of Computer Applications (final year student),
School of Computer Science and Engineering,
Anna University,
Chennai (Madras),
India.

------------------------------------------------------------------------------
Download Yahoo! Score Tracker for live cricket scores on your desktop — You are currently subscribed to ntfsd as: xxxxx@koal.com To unsubscribe send a blank email to xxxxx@lists.osr.com