Re[4]: Fast I/O &. IRP_MJ_xxx

Hello Neal,

I was going to block them with events in the filter’s dispatch
routine. I.e. notify my user-space application to copy the file and
wait for event. After the file is copied the user-space application
sets the event.

I decided to do so because I don’t want the request to be completed by
FSD before I backup the file.


Roman Kudinov

mailto:xxxxx@rbcmail.ru

Wednesday, August 4, 2004, 8:27:46 PM, you wrote:

NC> Do you mean blocking it by failing the write or by pending the write for
NC> a period of time? Failing it has problems as Maxim pointed out.

NC> Pending the write is reasonable as long as you don’t pend it for too
NC> long and make the IRP cancelable. I would also be concerned if you are
NC> doing this for a large number of files at the same time as you might
NC> deadlock the system.

NC> If you are going to do this I would recommend that you use the cancel
NC> safe queue support provided by the kernel.

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

NC> -----Original Message-----
NC> From: xxxxx@lists.osr.com
NC> [mailto:xxxxx@lists.osr.com] On Behalf Of Roman Kudinov
NC> Sent: Monday, July 26, 2004 12:49 AM
NC> To: Windows File Systems Devs Interest List
NC> Subject: Re[2]: [ntfsd] Fast I/O &. IRP_MJ_xxx

>> However I need to block I/O operations which can modify information
>> on disk on some conditions for a particular period of time.

MSS>> Block CREATE requests which ask for write access. This is the only
NC> really
MSS>> possible mean of achieving this task.

NC> Unfortunately a file can be opened already at the moment I need to
NC> block it.
NC> Is there any danger in blocking of IRP_MJ_WRITE request? I tried to
NC> do it and in test mode it worked fine. But I can suppose that issues
NC> may appear when it will work with real file operations with caching
NC> and so on.

Blocking them is the correct thing to do but I would recommend that you
insert the IRPS into a cancel safe queue and then return STATUS_PENDING.
When you have finished copying the file you can then complete the IRPS
by calling IoCompleteRequest().

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 Roman Kudinov
Sent: Wednesday, August 04, 2004 10:29 AM
To: Windows File Systems Devs Interest List
Subject: Re[4]: [ntfsd] Fast I/O &. IRP_MJ_xxx

Hello Neal,

I was going to block them with events in the filter’s dispatch
routine. I.e. notify my user-space application to copy the file and
wait for event. After the file is copied the user-space application
sets the event.

I decided to do so because I don’t want the request to be completed by
FSD before I backup the file.


Roman Kudinov

mailto:xxxxx@rbcmail.ru

Wednesday, August 4, 2004, 8:27:46 PM, you wrote:

NC> Do you mean blocking it by failing the write or by pending the write
for
NC> a period of time? Failing it has problems as Maxim pointed out.

NC> Pending the write is reasonable as long as you don’t pend it for too
NC> long and make the IRP cancelable. I would also be concerned if you
are
NC> doing this for a large number of files at the same time as you might
NC> deadlock the system.

NC> If you are going to do this I would recommend that you use the
cancel
NC> safe queue support provided by the kernel.

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

NC> -----Original Message-----
NC> From: xxxxx@lists.osr.com
NC> [mailto:xxxxx@lists.osr.com] On Behalf Of Roman Kudinov
NC> Sent: Monday, July 26, 2004 12:49 AM
NC> To: Windows File Systems Devs Interest List
NC> Subject: Re[2]: [ntfsd] Fast I/O &. IRP_MJ_xxx

>> However I need to block I/O operations which can modify information
>> on disk on some conditions for a particular period of time.

MSS>> Block CREATE requests which ask for write access. This is the only
NC> really
MSS>> possible mean of achieving this task.

NC> Unfortunately a file can be opened already at the moment I need to
NC> block it.
NC> Is there any danger in blocking of IRP_MJ_WRITE request? I tried to
NC> do it and in test mode it worked fine. But I can suppose that
issues
NC> may appear when it will work with real file operations with caching
NC> and so on.


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