Question about AssociatedIrp.SystemBuffer.

Hello all.

I have read some documentations about using buffered I/O, but I have not understood is
AssociatedIrp.SystemBuffer one for all drivers in the stack?

I mean does each driver has it’s own SystemBuffer, or it belongs to IRP ?

I just want to store some data in that buffer, and update it every time my routine is called.

Intuitively I think it’s bad idea, because I think lower-drivers has access to that buffer, and can change it. Am I right ?

Thank you …

Yes… This buffer is common to all drivers in the stack. This is mostly used
in case of IRP_MJ_DEVICE_CONTROL with transfer method as METHOD_BUFFERED.

What exactly are you trying to do?

Regards,
Ayush Gupta
http://www.linkedin.com/in/guptaayush

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-370866-
xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Tuesday, June 23, 2009 6:32 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Question about AssociatedIrp.SystemBuffer.

Hello all.

I have read some documentations about using buffered I/O, but I have
not understood is
AssociatedIrp.SystemBuffer one for all drivers in the stack?

I mean does each driver has it’s own SystemBuffer, or it belongs to IRP
?

I just want to store some data in that buffer, and update it every time
my routine is called.

Intuitively I think it’s bad idea, because I think lower-drivers has
access to that buffer, and can change it. Am I right ?

Thank you …


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thank you.

I’m just tring to store “time” (a LARGE_INTEGER value) when my routine has been called last time.

What’s the best solution for this?

How about storing it in a global variable? :slight_smile:

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-370868-
xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Tuesday, June 23, 2009 6:41 PM
To: Windows File Systems Devs Interest List
Subject: RE:[ntfsd] Question about AssociatedIrp.SystemBuffer.

Thank you.

I’m just tring to store “time” (a LARGE_INTEGER value) when my routine
has been called last time.

What’s the best solution for this?


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Why do you want to store it there?
And which routine are you exactly talking about?

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-370868-
xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Tuesday, June 23, 2009 6:41 PM
To: Windows File Systems Devs Interest List
Subject: RE:[ntfsd] Question about AssociatedIrp.SystemBuffer.

Thank you.

I’m just tring to store “time” (a LARGE_INTEGER value) when my routine
has been called last time.

What’s the best solution for this?


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

It’s working (I have tested). Is it the best one ?

The system buffer belongs to the IRP. You can really only update it if
you are the target of the request, since as you say another driver below
you, who is the target of the request, could modify the buffer. That
is not to say that you can’t modify it in your completion routine for
irps that you forward down to other drivers. That can be dangerous
unless you know what you are doing…

Mark Cariddi
Consulting Associate
OSR, Open Systems Resources, Inc.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Tuesday, June 23, 2009 9:02 AM
To: ntfsd redirect
Subject: [ntfsd] Question about AssociatedIrp.SystemBuffer.

Hello all.

I have read some documentations about using buffered I/O, but I have not
understood is
AssociatedIrp.SystemBuffer one for all drivers in the stack?

I mean does each driver has it’s own SystemBuffer, or it belongs to IRP
?

I just want to store some data in that buffer, and update it every time
my routine is called.

Intuitively I think it’s bad idea, because I think lower-drivers has
access to that buffer, and can change it. Am I right ?

Thank you …


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer