In my driver for a disk drive, I respond to IOCTL_DISK_GET_DRIVE_GEOMETRY
with

typedef struct _DISK_GEOMETRY {
LARGE_INTEGER Cylinders; = Number of sectors
MEDIA_TYPE MediaType; RemovableMedia
ULONG TracksPerCylinder; = 1
ULONG SectorsPerTrack; = 1
ULONG BytesPerSector; = Sector Size
} DISK_GEOMETRY

Now I wonder if TracksPerCylinder or SectorsPerTrack are used by FAT or NTFS
for read/write optimizations. For instance, if I set TracksPerCylinder
and/or SectorsPerTrack to 16, would the file systems try to read/write using
buffers of (16*SectorSize) or so bytes?

My goal is to make file systems send larger i/o buffers down to my drive. My
question is whether DISK_GEOMETRY affects this in any way.

Thanks,
Steve
--

Re: File systems and cylinders by Maxim

Maxim
Sun Jan 09 15:19:55 CST 2005

> Now I wonder if TracksPerCylinder or SectorsPerTrack are used by FAT or NTFS
> for read/write optimizations. For instance, if I set TracksPerCylinder

Surely no. They are fake long ago, since around 1994 or so.

These fakes are still preserved for MS-DOS, which uses obsolete CHS based
version of int 13h for disk IO. Modern int 13h uses 8byte LBA.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: File systems and cylinders by Peter

Peter
Tue Jan 11 09:58:04 CST 2005

The geometry information is written into the file system header for older
BIOSes that want to use CHS addressing (you'd be surprised how many there
are), and it's used to align MBR partitions on cylinder boundaries.

The latter is interesting in RAID scenarios, as many RAID arrays use the
cylinder alignment to help ensure that FS clusters and RAID strips align
correctly.

the only aspect of disk geometry that would affect the I/O you receive is
sector size, because the FS guarantees that reads and writes are sector
aligned. Now the FS will still be doing most of its I/O in <= 64K chunks,
so you're probably not going to get much out of changing that.

-p

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steve Martin" <anonymous@discussions.microsoft.com> wrote in message
news:uSpNXGo9EHA.220@TK2MSFTNGP09.phx.gbl...
> In my driver for a disk drive, I respond to IOCTL_DISK_GET_DRIVE_GEOMETRY
> with
>
> typedef struct _DISK_GEOMETRY {
> LARGE_INTEGER Cylinders; = Number of sectors
> MEDIA_TYPE MediaType; RemovableMedia
> ULONG TracksPerCylinder; = 1
> ULONG SectorsPerTrack; = 1
> ULONG BytesPerSector; = Sector Size
> } DISK_GEOMETRY
>
> Now I wonder if TracksPerCylinder or SectorsPerTrack are used by FAT or
> NTFS for read/write optimizations. For instance, if I set
> TracksPerCylinder and/or SectorsPerTrack to 16, would the file systems try
> to read/write using buffers of (16*SectorSize) or so bytes?
>
> My goal is to make file systems send larger i/o buffers down to my drive.
> My question is whether DISK_GEOMETRY affects this in any way.
>
> Thanks,
> Steve
> --
>
>
>