Reading physical sector size

> I had thought 4KB was the smallest size you could choose, but looking

at the Format options you can choose from an allocation size of 512,
1KB, 2KB, 4KB (default), etc.

Depends on volume size for sure, and for small volumes it is always 512.

Also I cannot understand why the allocation unit size influences the IO request sizes.

For cached IO, the IRP size is influenced by Cc.

For non-cached IO - by the app.

Cluster size is just plain not relevant.

Also note that 8MB (CHS cylinder) partition alignment is only used if the partition was created under Vista+ OS. The OS can be installed to the partition created by XP, and will work there.


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

>> level concepts like >FILE_NO_INTERMEDIATE_BUFFERING.

This flag is more related to FS Cluster size (low level sector disk size is
a multiple of)/Mm page size alignement ?

Cluster sizes are not important for alignment at all, and have no relations with FILE_NO_INTERMEDIATE_BUFFERING.


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

>command. Why does a driver need to build a hardware dependent bit level command

All storage stacks in Windows talk SCSI, nothing hardware dependent.

IOCTLs are better though. And, probably, if IOCTL responds with 512, then probably Windows just plain does not know that the actual sector size is > 512.


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

On Thu, 21 Oct 2010 23:08:09 +0400
“Maxim S. Shatskih” wrote:

> All storage stacks in Windows talk SCSI, nothing hardware dependent.

Do they talk SCSI, or use CAM to send ATA/SCSI commands to the
hardware? For example will the driver package up a INQUIRY command
that gets translated at some level to IDENTIFY if it’s being sent to an
ATA disk?


Bruce Cran

The driver gets the SCSI CDB, and translates it to whatever actual protocol the device adapter + device respond to. The storage driver uses “its own discretion” in performing this translation… which means that in many cases you have no clue – even when sending a SCSI Passthrough – which specific command gets sent to the device.

It seems to me that T13 and T10 have never communicated particularly well.

Peter
OSR

> Do they talk SCSI, or use CAM to send ATA/SCSI commands to the

hardware? For example will the driver package up a INQUIRY command
that gets translated at some level to IDENTIFY if it’s being sent to an
ATA disk?

I think ATA will respond to INQUIRY off the cached IDENTIFY data :slight_smile:


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

> It seems to me that T13 and T10 have never communicated particularly well.

Yes, that’s why we have lame ATA passthrough (instead of the way of encoding any possible ATA command to a SCSI CDB).

That’s why we cannot send a vendor-specific command to USB- or 1394-connected drive.


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

There is the SAT spec, but implementations seem to vary widely at this
point.

Philip D. Barila ?(303) 776-1264

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Thursday, October 21, 2010 6:11 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Reading physical sector size

It seems to me that T13 and T10 have never communicated particularly well.

Yes, that’s why we have lame ATA passthrough (instead of the way of encoding
any possible ATA command to a SCSI CDB).

That’s why we cannot send a vendor-specific command to USB- or
1394-connected drive.


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


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Yes, would be nice if that was implemented consistently by bridge products.

Regards,

George.

“Philip D. Barila” wrote in message
news:xxxxx@ntdev…
There is the SAT spec, but implementations seem to vary widely at this
point.

Philip D. Barila (303) 776-1264