ClassPnP/Disk

Hello all.

Well, my question is a bit vague and philosophical. But probably I just miss something important.

ClassPnP contains base code for disk class drivers. It manages to split IO request into peaces if necessary, it gives priorities to packets like ‘paging goes first’ and so on.

The thing I don’t understand is why it maintains information about drive partitions? Disk.sys creates FDOs in its AddDevice for physical drives. Ok, these FDOs are used in the storage stack. But PartMgr then updates disk.sys with information about partitions. Disk.sys responds with creating a PDO for every partition.

The first, these PDOs are not used, disk.sys doesn’t even report about them in QUERY_RELATIONS. The second, these PDOs can’t be used to write at a certain partition since ClassPnP doesn’t add partition’s offset to IO request when resending IRP to PDO’s parent.

So, why disk.sys wants to know about partitions? Why it creates unusable PDOs for them?

Yes, I know that in Vista+ this behavior was changed, but it is interesting to me if that was aberration of design or I miss something important?


Thanking In Advance,
Mikae.

> Yes, I know that in Vista+ this behavior was changed, but it is interesting to me if that was aberration

Probably an aberration, especially given the fact how these PDOs interact with PnP (they do not, PartMgr plays as PnP manager for them).


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com