First, most media that presents itself as a disk device uses 512B and some more modern use 4096. Only tape, cdrom, etc have I ever seen as 1K or 2K (and a broken iSCSI target).
CDB’s use a length field which is the length in sectors of the request, thus your granularity will be the sector size. If an SRB is built that does not match this, then it will be kicked back with an invalid_parameter error or something similar. (NOTE SRB DataTransferLength is in bytes).
The only “conversion” you may see is from the filesystem that will typically read a full fs cluster of data (4k by default on NTFS up to 32TB) and 64K in REFS. There are exceptions to this rule also.
Is there a problem you are running into?
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@ele.uri.edu
Sent: Saturday, August 31, 2013 12:38 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Question about concept of W/R sector on disk
Hello all, I have some question about the concept Write or Read sectors on disk.
We all know that HDD sector size is 512B, and normal SSD sector size is 4K or 2k. When my IO trace program send a writefile of 512B or 1024B size write IRP to SSD storage. My upper driver could capture the real size of transfer.
However as I know the SSD storage could only be accessed by sector size (4K). So if a 512B write IRP down to the storage. when it could turned to 4K size of SSD sector compatable? and what is the processs of it?
I mean how does driver do this job, because it cant write 512B to SSD and overwrite the other 4K-512B data on the 4k sector. How does the driver form the 4k write sector command, and in which layer of the driver? In lower filter or scsi driver?
Thank you for teaching!
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
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