IoBuildSynchronousFsdReques

If I use the IoBuildSynchronousFsdRequest to generate an IRP to read a
file, as it doesn’t take a FileObject, how can it knows which file I want
to read?

IoBuildSynchronousFsdRequest is used by a file system driver to divide a
single high-level I/O operation into lower level operations. For example,
if a read to the FSD requires that several different disk regions be read,
the FSD will break it up into several associated IRPs.

No other driver in the storage stack should use associated IRPs because they
only work once - you can only have a single master/associated in a driver
stack. Thus, if you use them to call the underlying FSD and the underlying
FSD tries to build associated IRPS, the OS will bug check.

See the fastfat code for the pertinent sample - see FatMultipleAsync in
deviosup.c.

Regards,

Tony

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

-----Original Message-----
From: Eric Chan [mailto:xxxxx@hotmail.com]
Sent: Sunday, March 03, 2002 10:36 PM
To: File Systems Developers
Subject: [ntfsd] IoBuildSynchronousFsdReques

If I use the IoBuildSynchronousFsdRequest to generate an IRP to read a
file, as it doesn’t take a FileObject, how can it knows which file I want
to read?


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to %%email.unsub%%

Eric,

One aspect of your question that Tony did not answer is how it knows what
file to read. The answer is simple - just set the FileObject field of the
built IRP. E.g.
IoStackLocation = IoGetNextIrpStackLocation(Irp);
IoStackLocation->FileObject = FileObject;

Brian