Hi all,

I have written a lower filter to class driver(disk.sys). I want to get
the information about the size of the disk. I see class driver is
sending the IOCTL_DISK_GET_DRIVE_GEOMETRY down, for which I have
registered a completion routine. In the completion routine I get
Irp->IoStatus.Status as STATUS_NOT_SUPPORTED. SO I'm unable to get the
information I wanted.

Can anybody please tell me why I'm getting this error? Has anybody
encountered this problem earlier?

- Prashanth

Re: IOCTL_DISK_GET_DRIVE_GEOMETRY by Peter

Peter
Wed Aug 10 11:25:25 CDT 2005

(this answer is from memory - see disclaimer :)

normally the disk driver would handle this I/O control on its own and make
up a fake drive geometry based on the values it got during the last
READ_CAPACITY scsi request that it sent.

We added this (i think) to handle devices where (a) the "real" geometry - in
the sense of being the same geometry the bios would see - was important and
(b) the lower driver could actually tell us what geometry the BIOS would
report for that device. Mostly it was for boot devices.

So disk sends this i/o control down to see if the lower driver can give it
geometry info. If it can't then disk uses the capacity data.

you want to watch for SCSIOP_READ_CAPACITY srbs and check the results of
those to get the disk size. However that value isn't particularly
reliable - we've seen drives that over-report or under-report capacity. The
disk driver will issue reads and writes to blocks beyond the reported
capacity of the device and lets the drive decide whether it can handle the
I/O. (this may have changed recently - i don't remember offhand)

-p

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.

"Prashanth" <prashanthxshenoy@gmail.com> wrote in message
news:1123683472.035501.120070@f14g2000cwb.googlegroups.com...
> Hi all,
>
> I have written a lower filter to class driver(disk.sys). I want to get
> the information about the size of the disk. I see class driver is
> sending the IOCTL_DISK_GET_DRIVE_GEOMETRY down, for which I have
> registered a completion routine. In the completion routine I get
> Irp->IoStatus.Status as STATUS_NOT_SUPPORTED. SO I'm unable to get the
> information I wanted.
>
> Can anybody please tell me why I'm getting this error? Has anybody
> encountered this problem earlier?
>
> - Prashanth
>