Issuing file operations while holding a lock

I have read in some MS docs that you should never issue file system calls
while holding a lock. However, the filter manager sample MetadataManager
does hold a fast mutex while issuing FltXXX calls. Reading the docs says
that it is OK to issue FltCreateFile/FltClose etc on APC_LEVEL.

Could someone please shead some light on this?

Regards
Alexander

This can be an exception from the rule (note it is specially mentioned),
but, as a common case, the rule still stands.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Alexander”
Newsgroups: ntfsd
To: “Windows File Systems Devs Interest List”
Sent: Monday, January 10, 2005 5:48 PM
Subject: [ntfsd] Issuing file operations while holding a lock

> I have read in some MS docs that you should never issue file system calls
> while holding a lock. However, the filter manager sample MetadataManager
> does hold a fast mutex while issuing FltXXX calls. Reading the docs says
> that it is OK to issue FltCreateFile/FltClose etc on APC_LEVEL.
>
> Could someone please shead some light on this?
>
> Regards
> Alexander
>
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Alexander,

You are correct. The general rule is that you should not hold a lock
while issuing IO’s because it can lead to deadlocks. Thank you for
noticing this.

I have filed a bug on this issue and we will fix the sample so that it
does not do this.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Alexander
Sent: Monday, January 10, 2005 6:49 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Issuing file operations while holding a lock

I have read in some MS docs that you should never issue file system
calls
while holding a lock. However, the filter manager sample MetadataManager

does hold a fast mutex while issuing FltXXX calls. Reading the docs says

that it is OK to issue FltCreateFile/FltClose etc on APC_LEVEL.

Could someone please shead some light on this?

Regards
Alexander


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com