Dear All!
I’m working on volume filter driver and faced some problems on W2K3 when
implementation does steps for creating new volume(or resize):
- Direct write to MBR with new layout using Disk Write
- Sends INVALIDATE request to disk stack
- My volume filter is called: AddDevice()
- My volume filter receives: IRP_MJ_PNP: START_DEVICE
- Volume filter notifies MountMgr about volume creation sending: VOLUME_ARRIVAL_NOTIFICATION
- MountMgr sends me different IOCTL’s on which my code answers and notifies user space part that volume is created and user space code start working with volume
It works on all OSes except W2K3, because of the volume restarts which happend several times before comes last START_DEVICE.
i.e. step by step:
- Volume filter receives AddDevice
- Volume filter receives START_DEVICE
- Volume filter receives QUERY_REMOVE
- Volume filter receives REMOVE_DEVICE
and this 4 steps occures several times before last START_DEVICE comes and i don’t know how and when can i notify user space part of my application to start working with newly created volume.
So, guys, do you have any ideas how to solve that problem.
Thank you in advance!