(I fixed formatting)
Hello,
I have a general question for any FS/FS filter experts out there. I’m doing
a “virtual file system” driver, whereby I actually create FileObjects and
control their virtual memory state while running on top of FAT, for example.
I also have my own idea of a file control block. Because I’m in charge of
controlling the VM state for my own FileObjects, I must implement such
callback routines as:
AcquireFileForNtCreateSection
ReleaseFileForNtCreateSection
AcquireForModWrite
ReleaseForModWrite
AcquireForCcFlush
ReleaseForCcFlush
My question is how do I (or is it even possible) have the callback be
directed at my device object’s fast i/o dispatch instead of FAT’s device
object. I ask this because upon looking at FsRtlAcquireFileExclusiveCommon,
it seems that this routine calls IoGetBaseFileSystemDeviceObject to get the
device object whose fastiodispatch it decides to use. Upon analysis
IoGetBaseFileSystemDeviceObject looks like it returns the device object
field from the file object (what I want) ONLY if the VPB fields
fileobject->DeviceObject->VPB and fileobject->VPB are NULL. I obviously
cannot force these to be NULL.
Would I have to use the filter callbacks methods to hook these calls, or is
the only solution to actually directly hook them? I believe I could simply
use IoCreateStreamFileObjectLite( NULL, myDeviceObject ) to create my own
file object that points to my device object, but then how can I substitute
this for the FO that a create IRP gives me, which contains an FO that has
fileObject->DeviceObject pointing at the realdevice for the VPB?
Thanks for any help,
Matt
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Matthew N. White
Sent: Saturday, April 23, 2005 12:03 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Virtual (pseudo) FS question
Hello,
I have a general question for any FS/FS filter experts out there. I’m doing
a “virtual file system” driver, whereby I actually create FileObjects and
control their virtual memory state while running on top of FAT, for example.
I also have my own idea of a file control block. Because I’m in charge of
controlling the VM state for my own FileObjects, I must implement such
callback routines as:
AcquireFileForNtCreateSection
ReleaseFileForNtCreateSection
AcquireForModWrite
ReleaseForModWrite
AcquireForCcFlush
ReleaseForCcFlush
My question is how do I (or is it even possible) have the callback be
directed at my device object’s fast i/o dispatch instead of FAT’s device
object. I ask this because upon looking at FsRtlAcquireFileExclusiveCommon,
it seems that this routine calls IoGetBaseFileSystemDeviceObject to get the
device object whose fastiodispatch it decides to use. Upon analysis
IoGetBaseFileSystemDeviceObject looks like it returns the device object
field from the file object (what I want) ONLY if the VPB fields
fileobject->DeviceObject->VPB and fileobject->VPB are NULL. I obviously
fileobject->DeviceObject->can
force these to be NULL.
Would I have to use the filter callbacks methods to hook these calls, or is
the only solution to actually directly hook them? I believe I could simply
use IoCreateStreamFileObjectLite( NULL, myDeviceObject ) to create my own
file object that points to my device object, but then how can I substitute
this for the FO that a create IRP gives me, which contains an FO that has
fileObject->DeviceObject pointing at the realdevice for the VPB?
Thanks for any help,
Matt
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@bitarmor.com To unsubscribe
send a blank email to xxxxx@lists.osr.com