RE: Associated IRPs - split I/O requests

Tony Mason,

As you know, in fastfat, when necessary FatMultipleAsync will be adopted to use associated IRPs, otherwise FatSingleAsync will be used instead.

My questiones are:

1, Can I always use associated IRPs ?

2, If the IRP is already associated, how to splite and complete it ? Use IoBuildAsynchronousFsdRequest ?

Thanks in advance,

Matt Wu

Max,

There’s no problem with constructing your own mechanism (similar to what
Kristian described earlier.) In fact, my point is that if you are involved
in the storage stack, unless you are an FSD, you really should not be using
associated IRPs because the file systems are using them (see deviosup.c in
FastFat for examples.) Of course, FAT doesn’t use associated IRPs for every
I/O operation, only when necessary, so it is even possible that you might
not discover this until you were testing. Hence, my standard advice for
anyone working in the storage stack is that unless you are writing a file
system, you should not use associated IRPs.

As you point out, the driver must construct its own mechanism for achieving
comparable functionality.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Tuesday, September 25, 2001 8:54 AM
To: File Systems Developers
Subject: [ntfsd] RE: * Associated IRPs - split I/O requests

> You cannot use associated IRPs in a disk filter driver. The file systems
> use associated IRPs and because of this, you cannot. The reason for this
is
> that an associated IRP cannot itself be divided into a set of associated
> IRPs.

But we can invent our own mechanism of associated IRPs which will not use
the AssociatedIrp field, but will use some completion context structure
instead.

Is it a wrong way?

Max


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@freemail.soim.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> 1, Can I always use associated IRPs ?
Yes, if you are developing a file system driver.
No, if you are developing a filter driver.

2, If the IRP is already associated, how to splite
and complete it ? Use IoBuildAsynchronousFsdRequest
?

An associated IRP can not be a master IRP too. You
cannot further split it.
Allocate another IRP - IoAllocateIrp()- initialise
it ( do not use IoInitializeIrp() ) and pass it down.
Do a IoFreeIrp() in your completion routine and
return STATUS_MORE_PROCESSING_REQUIRED.
Hope this helps.
Manoj

=====

Manoj Paul Joseph,
Master of Computer Applications (final year student),
School of Computer Science and Engineering,
Anna University,
Chennai (Madras),
India.


Looking for a job? Visit Yahoo! India Careers
Visit http://in.careers.yahoo.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>> 1, Can I always use associated IRPs ?

Yes, if you are developing a file system driver.
No, if you are developing a filter driver.

Very glad to see this answer.

> 2, If the IRP is already associated, how to splite
> and complete it ? Use IoBuildAsynchronousFsdRequest
> ?

An associated IRP can not be a master IRP too. You
cannot further split it.
Allocate another IRP - IoAllocateIrp()- initialise
it ( do not use IoInitializeIrp() ) and pass it down.
Do a IoFreeIrp() in your completion routine and
return STATUS_MORE_PROCESSING_REQUIRED.
Hope this helps.
Manoj

Thanks!


Manoj Paul Joseph,
Master of Computer Applications (final year student),
School of Computer Science and Engineering,
Anna University,
Chennai (Madras),
India.


Looking for a job? Visit Yahoo! India Careers
Visit http://in.careers.yahoo.com


You are currently subscribed to ntfsd as: mattwu@163.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> 2, If the IRP is already associated, how to splite and
complete it ? Use IoBuildAsynchronousFsdRequest ?

Better to use your own associated IRP engine. Just for this case. The system-provided will NOT handle the situation you described.

Max