My understanding of the STATUS_MORE_PROCESSING_REQUIRED is as
follows:
- For inherently synchronous io (such as creates) the io manager has an
optimization that will allow a request to be completed without the posting
of a special kernel APC to the requesting thread. IoCompleteRequest usually
posts this request after calling the completion routines and the APC
executes IopCompleteRequest which, among other things, tears down the irp.
For inherently synchronous IO, IoCompleteRequest will not post the apc, but
simply returns to the caller. Then, code in the io manager will call
IopCompleteRequest directly. The problem is, in the latter case, the io
manager will call IopCompleteRequest whether or not
STATUS_MORE_PROCESSING_REQUIRED was returned from someones completion
routine. Later, when the guy who returned STATUS_MORE_PROCESSING_REQUIRED
tries to touch the irp (because he think he successfully halted completion) - KABLOOEY! The irp has already been torn down.
I think I am immune to this bug because I only access the irp within
the my dispatch routine, and the irp would not be torn down until after I
returned from the completion routine (when IopCompleteRequest is called by
the code that called my dispatch routine in the first place). If I were
posting the irp to a background thread for further processing, then there
would be a problem.
Am I correct in assuming I am excempt from the
STATUS_MORE_PROCESSING_REQUIRED/inherently synchronous io bug in this case?
Thanks,
Joel
-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Tuesday, August 01, 2000 3:12 PM
To: File Systems Developers
Subject: [ntfsd] Re: using STATUS_MORE_PROCESSING_REQUIRED: am I using
it correctly??
using STATUS_MORE_PROCESSING_REQUIRED: am I using it
correctly??>STATUS_MORE_PROCESSING_REQUIRED. Here is some code, with all
of the irrelevant domain specific stuff stripped out. Am I doing this
right?
I would say - wrong a bit.
- Wait always, regardless of the return code from IoCallDriver.
- Call IoMarkIrpPending before IoCallDriver, and always return
STATUS_PENDING from your dispatch routine. See Nagar’s book for details -
“About STATUS_MORE_PROCESSING_REQUIRED stuff”.
Max
You are currently subscribed to ntfsd as: xxxxx@ntpsoftware.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)