filtering direct disk IO

These are few questions about a driver which should filter direct disk IO
like DiskPerf in NTDDK samples:

1)First of all it seems that driver should be attached to a physical device
durung system bootup, otherwise it wouldn’t get any requests to this device
from the upper level drivers. Is it right?

2)What is ‘Group’ name and ‘Tag’ value (in registry) this driver should
have?

3)What are the exact requirements for the driver to receive AddDevice
request (i.e driver routine DriverObject->DriverExtension->AddDevice to be
called ), what entry points and/or what attributes should this driver have?


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. To be well behaved, yes. For an ugly hack you can take a peak at
    www.sysinternals.com where you’ll find binaries of a filter inserted
    into the stack at any point in time. It essentially works by changing
    dispatch pointers in the driver object of the device object you wish to filter.

  2. The group should be so early that it’s loaded before any other you
    wish to be below (NTFS/FastFat/etc.) have attached themselves.
    I recommend loadorder which you can find on the OSR website this will
    give you a good idea about where your driver is and using with
    devicetree (also from osr) will also give you nice idea where your
    driver must be inserted. Diskperf is in the System Bus Extender group
    like most filters that needs to filter direct hardware requests. Under most
    circumstances your tag would not be important.

  3. AddDevice routine must be non-zero and you should have added your
    driver to the relevant class as an upper or lower filter. This is done
    in the registry HKLM\System\CurrentControlSet\Control\Class????????
    Check how Diskperf does it by
    HKLM\System\CurrentControlSet\Control\Class{4D36E967-E325-11CE-BFC1-08002BE10318}\UpperFilters

regards,
Anders

P.s. before you begin to experiment with adding drivers to your boot
device (and it’s class) do yourself the favour of installing an
alternate operating system so you can get rid of the driver again or
your BSOD’s will become forced reinstalls.

Monday, July 16, 2001, 8:39:11 AM, you wrote:

Mec> These are few questions about a driver which should filter direct disk IO
Mec> like DiskPerf in NTDDK samples:

Mec> 1)First of all it seems that driver should be attached to a physical device
Mec> durung system bootup, otherwise it wouldn’t get any requests to this device
Mec> from the upper level drivers. Is it right?

Mec> 2)What is ‘Group’ name and ‘Tag’ value (in registry) this driver should
Mec> have?

Mec> 3)What are the exact requirements for the driver to receive AddDevice
Mec> request (i.e driver routine DriverObject->DriverExtension->AddDevice to be
Mec> called ), what entry points and/or what attributes should this driver have?

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


Best regards,
Anders mailto:xxxxx@flaffer.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

followed your instructions and everything is working fine.

many thanks,

Chris.

-----Original Message-----
From: Anders Fogh [mailto:xxxxx@flaffer.com]
Sent: 19 July 2001 07:55
To: File Systems Developers
Subject: [ntfsd] Re: filtering direct disk IO

  1. To be well behaved, yes. For an ugly hack you can take a peak at
    www.sysinternals.com where you’ll find binaries of a filter inserted
    into the stack at any point in time. It essentially works by changing
    dispatch pointers in the driver object of the device object you wish to
    filter.

  2. The group should be so early that it’s loaded before any other you
    wish to be below (NTFS/FastFat/etc.) have attached themselves.
    I recommend loadorder which you can find on the OSR website this will
    give you a good idea about where your driver is and using with
    devicetree (also from osr) will also give you nice idea where your
    driver must be inserted. Diskperf is in the System Bus Extender group
    like most filters that needs to filter direct hardware requests. Under most
    circumstances your tag would not be important.

  3. AddDevice routine must be non-zero and you should have added your
    driver to the relevant class as an upper or lower filter. This is done
    in the registry HKLM\System\CurrentControlSet\Control\Class????????
    Check how Diskperf does it by
    HKLM\System\CurrentControlSet\Control\Class{4D36E967-E325-11CE-BFC1-08002BE
    10318}\UpperFilters

regards,
Anders

P.s. before you begin to experiment with adding drivers to your boot
device (and it’s class) do yourself the favour of installing an
alternate operating system so you can get rid of the driver again or
your BSOD’s will become forced reinstalls.

Monday, July 16, 2001, 8:39:11 AM, you wrote:

Mec> These are few questions about a driver which should filter direct disk
IO
Mec> like DiskPerf in NTDDK samples:

Mec> 1)First of all it seems that driver should be attached to a physical
device
Mec> durung system bootup, otherwise it wouldn’t get any requests to this
device
Mec> from the upper level drivers. Is it right?

Mec> 2)What is ‘Group’ name and ‘Tag’ value (in registry) this driver should
Mec> have?

Mec> 3)What are the exact requirements for the driver to receive AddDevice
Mec> request (i.e driver routine DriverObject->DriverExtension->AddDevice to
be
Mec> called ), what entry points and/or what attributes should this driver
have?

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


Best regards,
Anders mailto:xxxxx@flaffer.com


You are currently subscribed to ntfsd as: xxxxx@emc.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