Molly,
thank you for clarification.
Assume we’re on Windows 2000. Since SfIsAttachedToDevice() is called
from a worker thread, thus outside of mount processing, can we be sure
that the device stack won’t be torn down while we’re walking it?
Thanks.
Jiri Bracek
GRISOFT, s.r.o.
mailto:xxxxx@grisoft.cz
Thursday, October 14, 2004, 12:35:12 AM, you wrote:
MB> Hi Jiri,
MB> No, the problem is not that mount requests get completed at DPC on
MB> Windows 2000. The problem is that DFS filter on Windows 2000 Server
MB> calls down to the file system with APCs disabled (it is inside a call to
MB> FsRtlEnterFileSystem()). If your filter waits in the dispatch routine
MB> for the MOUNT IRP to complete, APCs will still be disabled when FAT
MB> wants to do is final processing which completes the IRP. FAT needs to
MB> queue an APC to do this final processing, but since APCs are disabled,
MB> this APC will never run, the IRP will never be completed and your
MB> filter’s event will never be signaled.
MB> Now, you may ask “Why not just do this work in the mount completion
MB> routine since a mount request isn’t going to get completed at DPC?”.
MB> While to date I’ve never seen a mount request complete at DPC, but the
MB> IO model does not rule out that possibility, so my advice is to error on
MB> the side of caution. The extra overhead to ensure that you can do this
MB> final mount process at PASSIVE_LEVEL is not very large and MOUNTs do not
MB> happen very frequently.
MB> Thanks,
MB> Molly Brown
MB> Microsoft Corporation
MB> This posting is provided “AS IS” with no warranties and confers no
MB> rights.
MB> -----Original Message-----
MB> From: xxxxx@lists.osr.com
MB> [mailto:xxxxx@lists.osr.com] On Behalf Of Jiri Bracek
MB> Sent: Wednesday, October 13, 2004 4:42 AM
MB> To: Windows File Systems Devs Interest List
MB> Subject: [ntfsd] Sfilter & mount on w2k
MB> Hello all,
MB> there is a comment in function SfFsControlMountVolume() in sfilter
MB> sample from WS2003 SP1 IFS kit:
MB> //
MB> // VERSION NOTE:
MB> //
MB> // On Windows 2000, we cannot simply synchronize back to the
MB> dispatch
MB> // routine to do our post-mount processing. We need to do this
MB> work at
MB> // passive level, so we will queue that work to a worker thread
MB> from
MB> // the completion routine.
MB> //
MB> // For Windows XP and later, we can safely synchronize back to the
MB> dispatch
MB> // routine. The code below shows both methods. Admittedly, the
MB> code
MB> // would be simplified if you chose to only use one method or the
MB> other,
MB> // but you should be able to easily adapt this for your needs.
MB> //
MB> It makes me think that it is possible for a mount request to come to the
MB> filter at DISPATCH_LEVEL on Windows 2000. Is it true? In what
MB> circumstances does it happen?
MB> Thank you.
MB> –
MB> Jiri Bracek
MB> GRISOFT, s.r.o.
MB> mailto:xxxxx@grisoft.cz
MB> —
MB> Questions? First check the IFS FAQ at
MB> https://www.osronline.com/article.cfm?id=17
MB> You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
MB> To unsubscribe send a blank email to
MB> xxxxx@lists.osr.com
MB> —
MB> Questions? First check the IFS FAQ at
MB> https://www.osronline.com/article.cfm?id=17
MB> You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
MB> To unsubscribe send a blank email to
MB> xxxxx@lists.osr.com