are these two constructs to complete IRPs equivalent
Irp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest( Irp, IO_NO_INCREMENT );
return Irp->IoStatus.Status;
…and this one
Irp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest( Irp, IO_NO_INCREMENT );
return STATUS_SUCCESS;
I mean I hope, that calling IoCompleteRequest before returning, wont alter
the IRPs status or anything else. Would it?
Bendanto,
Use the second approach. Never touch an IRP in ANY way after releasing control of it. Once you call IoCompleteRequest, only the IO manager should touch it. Same rule applies to IoCallDriver.
m
The IRP is gone as soon as you call IoCompleteRequest(), so first approach aint valid
----- Original Message -----
From: Bedanto
To: Windows File Systems Devs Interest List
Sent: Friday, July 07, 2006 12:49 PM
Subject: [ntfsd] IOcompleteRequest
are these two constructs to complete IRPs equivalent
Irp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest( Irp, IO_NO_INCREMENT );
return Irp->IoStatus.Status;
…and this one
Irp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest( Irp, IO_NO_INCREMENT );
return STATUS_SUCCESS;
I mean I hope, that calling IoCompleteRequest before returning, wont alter the IRPs status or anything else. Would it?
— Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17 You are currently subscribed to ntfsd as: xxxxx@rdsor.ro To unsubscribe send a blank email to xxxxx@lists.osr.com
It is recommended that you take approach two, for once you have given the
IRP to the IO maanger, you never know what will be done with it, and you
might hvae to face crashes that you cannot foresee.
Though I also confess that such constructs are present in some of the
prototypes I write myself. Bad coding pproach as they might be.
>> Bad coding pproach as they might be.
They are not bad aproaches, they are simply wrong, bugs, and you should treat them like serious issues
----- Original Message -----
From: amitr0
To: Windows File Systems Devs Interest List
Sent: Friday, July 07, 2006 1:21 PM
Subject: Re: [ntfsd] IOcompleteRequest
It is recommended that you take approach two, for once you have given the IRP to the IO maanger, you never know what will be done with it, and you might hvae to face crashes that you cannot foresee.
Though I also confess that such constructs are present in some of the prototypes I write myself. Bad coding pproach as they might be.
— Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17 You are currently subscribed to ntfsd as: xxxxx@rdsor.ro To unsubscribe send a blank email to xxxxx@lists.osr.com
yes dan, my apologies. I have already fixed them in the resent releases.
On 7/7/06, Dan Partelly wrote:
>
> >> Bad coding pproach as they might be.
>
> They are not bad aproaches, they are simply wrong, bugs, and you should
> treat them like serious issues
>
> ----- Original Message -----
>
> From: amitr0
> To: Windows File Systems Devs Interest List
> Sent: Friday, July 07, 2006 1:21 PM
> Subject: Re: [ntfsd] IOcompleteRequest
>
>
> It is recommended that you take approach two, for once you have given the
> IRP to the IO maanger, you never know what will be done with it, and you
> might hvae to face crashes that you cannot foresee.
>
> Though I also confess that such constructs are present in some of the
> prototypes I write myself. Bad coding pproach as they might be.
>
>
> — Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17 You are currently subscribed
> to ntfsd as: xxxxx@rdsor.ro To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
>
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
–
- amitr0
No, the first one touches the IRP after IoCompleteRequest was called on it,
a place for a BSOD.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Bedanto”
To: “Windows File Systems Devs Interest List”
Sent: Friday, July 07, 2006 1:49 PM
Subject: [ntfsd] IOcompleteRequest
> are these two constructs to complete IRPs equivalent
>
>
> Irp->IoStatus.Status = STATUS_SUCCESS;
>
> IoCompleteRequest( Irp, IO_NO_INCREMENT );
>
> return Irp->IoStatus.Status;
>
> …and this one
>
>
>
> Irp->IoStatus.Status = STATUS_SUCCESS;
>
> IoCompleteRequest( Irp, IO_NO_INCREMENT );
>
> return STATUS_SUCCESS;
>
>
>
>
>
>
>
>
>
> I mean I hope, that calling IoCompleteRequest before returning, wont alter
> the IRPs status or anything else. Would it?
>
> —
> 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