## Storage Device Driver Reference

[prev][next][parent][TOC]

### Strategies for Providing Filter Functions

There are two strategies for inserting a filter device driver into the call -down path for a given unit's device support:

1.Edit the target unit's UNITINFO table, but do not allocate permanent ownership of the unit.

2.Allocate the target unit, and present a new UNITINFO table to any upstream driver that might issue I/O requests.

In most cases, the first strategy, in which the caller does not permanently allocate the unit, is simpler than the second. The filter device driver simply daisy-chains a filter indicator into the UNITINFO structure of the target unit; then, I/O that otherwise would go directly to the target unit' s adapter device driver is redirected through the filter device driver.

The second strategy is required when the filter device driver needs to hide units. For example, a data-stripping feature can be implemented using a filter device driver as follows. The data-stripping filter device driver must allocate all target units to hide them from upstream device managers. Then the data-stripping filter device driver constructs a new UNITINFO table to contain the appropriate information for presenting a logical view of a single, logical (stripped) drive.