IRP UserIosb usage

Hello,

There is some parts in
the “SpyQueryFileSystemForFileName” which I don’t
quite understand.

  • “irp->UserIosb = &ioStatus” the code comment
    says that this is for being able to return the
    result of the request to the caller.
    But why not just taking the status of the request
    from Irp->IoStatus ?
    Yes, i am aware that we can not touch the IRP
    after we pass it on.
    But we do return STATUS_MORE_PROCESSING_REQUIRED
    from the completion routine.
    My question is, why not just taking the
    status from the IRP and then free it?

  • In the same routine instead of setting up
    a completion routine, can not one just have
    irp->UserEvent = OurEvent; and let the
    I/O manager signal that event?
    I read in Walter Oney book that we should not
    touch this field, but it is a custom IRP

Thanks,
Mike


Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/

> - In the same routine instead of setting up

a completion routine, can not one just have
irp->UserEvent = OurEvent; and let the
I/O manager signal that event?

This can be done on PASSIVE_LEVEL only.

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

The IO Manager has special rules for knowing when it is OK to user the
UserEvent field. It might be fine in the particular situation but not
in others.

Since this is a source sample we are showing you a safe way that always
works.

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 Mike Malgin
Sent: Monday, July 19, 2004 12:35 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] IRP UserIosb usage

Hello,

There is some parts in
the “SpyQueryFileSystemForFileName” which I don’t
quite understand.

  • “irp->UserIosb = &ioStatus” the code comment
    says that this is for being able to return the
    result of the request to the caller.
    But why not just taking the status of the request
    from Irp->IoStatus ?
    Yes, i am aware that we can not touch the IRP
    after we pass it on.
    But we do return STATUS_MORE_PROCESSING_REQUIRED
    from the completion routine.
    My question is, why not just taking the
    status from the IRP and then free it?

  • In the same routine instead of setting up
    a completion routine, can not one just have
    irp->UserEvent = OurEvent; and let the
    I/O manager signal that event?
    I read in Walter Oney book that we should not
    touch this field, but it is a custom IRP

Thanks,
Mike


Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/


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