Hi,
I’m working on an file system mini-filter driver that performs transparent encryption/decryption. Our driver intercepts non-cached and paging I/O and transforms the data. As an optimization, our code assumes that the disk sector size is always 512 bytes.
According to http://en.wikipedia.org/wiki/Disk_sector, there are hard disks out there that uses 4096-byte sectors. I’m wondering if I need to accommodate such sector sizes in our code. Specifically, I’m thinking about:
- Are such disks with 4096-byte sector sizes are popular in corporate
desktop environment? And corporate server environment?
- Do these disks support only 4096-byte sector sizes? Or is the sector
size selectable by some higher-level entity (e.g. hard disk controller,
BIOS, operating system) between 512 and 4096?
- Does the sector size of such disks using 4096-byte sector size really
appear as 4096 to a FS mini-filter driver under WinXP and Win7 (x86
and x64). I.e. can my code still perform non-cached I/O on 512-byte
boundaries and 512-multiple block sizes on such disks?
Thanks in advance for any info!
— Allen Yuen
STATEMENT OF CONFIDENTIALITY
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. No representation is made on its accuracy or completeness of the information contained in this electronic message. Certain assumptions may have been made in the preparation of this material as at this date, and are subject to change without notice. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail and any attachment(s) is strictly prohibited. Please reply to the sender at NextLabs Inc and destroy all copies of this message and any attachments from your system. ======================================================================
>1. Are such disks with 4096-byte sector sizes are popular in corporate
desktop environment? And corporate server environment?
I think they have just appeared, and only as external USB drives IIRC.
But they will become common soon.
- Do these disks support only 4096-byte sector sizes?
The ones I’m speaking about - yes.
There were also disks which use 4K internal sector sizes, but also support unaligned IO. With such disks, your code will be fine (but slow a bit).
- Does the sector size of such disks using 4096-byte sector size really
The ones I’m speaking about - yes.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
Maxim,
There are also a lot of RAID arrays with a minimum sector size larger than
512. I have one. It is a standard AMD chipset from two years ago with
onboard RAID 0/1/5 and 3 1.5 TB SATA drives. The minimum sector size is
1024 and there is nothing that I can do to change it. This is why Hyper-V
isn’t suitable for a lot of corporate environments at the moment.
http://social.technet.microsoft.com/Forums/en/winserverhyperv/thread/b47ea3f6-7d52-4dc5-b660-d58ad38d73e1?prof=required.
Compare KVM which fixed this problem several years ago.
Regards,
Rossetoecioccolato.
“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
>1. Are such disks with 4096-byte sector sizes are popular in corporate
> desktop environment? And corporate server environment?
I think they have just appeared, and only as external USB drives IIRC.
But they will become common soon.
>2. Do these disks support only 4096-byte sector sizes?
The ones I’m speaking about - yes.
There were also disks which use 4K internal sector sizes, but also support
unaligned IO. With such disks, your code will be fine (but slow a bit).
>3. Does the sector size of such disks using 4096-byte sector size really
The ones I’m speaking about - yes.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
>>1. Are such disks with 4096-byte sector sizes are popular in corporate
>> desktop environment? And corporate server environment?
>
> I think they have just appeared, and only as external USB drives IIRC.
>
> But they will become common soon.
So many new things are actually well forgotten past.
Sector of DEC disks was 4K, exactly as their RAM page size (and exactly for
implementation of virtual memory).
–pa
Pavel,
DEC’s paging was 512 bytes. I worked for Data General and paging
was one of the things that we beat up DEC on since they sucked versus 4K
that most of the players used. DEC’s disk blocking was also 512, at
least it was on the several disk drivers I wrote for DEC systems in
college.
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
“Pavel A.” wrote in message news:xxxxx@ntfsd:
> “Maxim S. Shatskih” wrote in message
> news:xxxxx@ntfsd…
> >>1. Are such disks with 4096-byte sector sizes are popular in corporate
> >> desktop environment? And corporate server environment?
> >
> > I think they have just appeared, and only as external USB drives IIRC.
> >
> > But they will become common soon.
>
> So many new things are actually well forgotten past.
> Sector of DEC disks was 4K, exactly as their RAM page size (and exactly for
> implementation of virtual memory).
> --pa