Advance Disk Format support in Storport Virtual Mniport diver

Hi All,

OS : Windows server 2008 R2 SP1

I want to provide Advanced Format or 512E (4K physical and 512-byte logical sector size)support in Storport Virtual Miniport driver.

As per article http://support.microsoft.com/kb/982018, I made following changes to my driver.

  1. SCSIOP_READ_CAPACITY:
    Blcok size is set to 512

  2. SCSIOP_READ_CAPACITY16
    Block size is set to 4096.

  3. As per http://support.microsoft.com/kb/2510009
    After applying the 982018 patch, in registry, the value is not set under my driver service.
    So manually created the path.

HKLM\CurrentControlSet\Services<miniport service name>\Parameters\Device<br>
Name: EnableQueryAccessAlignment
Type: REG_DWORD
Value: 1: Enable

But output of fsutil is

fsutil.exe fsinfo ntfsinfo e:
NTFS Volume Serial Number : 0xecd23219d231e90a
Version : 3.1
Number Sectors : 0x000000002eb847ff
Total Clusters : 0x0000000005d708ff
Free Clusters : 0x00000000044b0790
Total Reserved : 0x0000000000000000
Bytes Per Sector : 512
>>>>>>Bytes Per Physical Sector :
Bytes Per Cluster : 4096
Bytes Per FileRecord Segment : 1024
Clusters Per FileRecord Segment : 0
Mft Valid Data Length : 0x0000000000040000
Mft Start Lcn : 0x00000000000c0000
Mft2 Start Lcn : 0x0000000000000002
Mft Zone Start : 0x00000000000c0040
Mft Zone End : 0x00000000000cc820
RM Identifier: 8BE82F56-D937-11E0-A1D7-0025903AE571

What is wrong as I am still seeing
Bytes Per Physical Sector :

But if I send the IOCTL
IOCTL_STORAGE_QUERY_PROPERTY with pAlignmentDescriptor
then both BytesPerLogicalSector and BytesPerPhysicalSector are returned with 4096.

What is wrong here.

As an experiment, if I return block size 4096 for both SCSIOP_READ_CAPACITY and SCSIOP_READ_CAPACITY16, then fsutil output is

fsutil.exe fsinfo ntfsinfo e:
NTFS Volume Serial Number : 0xa45aba5e5aba2d44
Version : 3.1
Number Sectors : 0x000000000303d4ff
Total Clusters : 0x000000000303d4ff
Free Clusters : 0x000000000303787e
Total Reserved : 0x0000000000000000
Bytes Per Sector : 4096
Bytes Per Physical Sector : 4096
Bytes Per Cluster : 4096
Bytes Per FileRecord Segment : 4096
Clusters Per FileRecord Segment : 1
Mft Valid Data Length : 0x0000000000100000
Mft Start Lcn : 0x00000000000c0000
Mft2 Start Lcn : 0x0000000000000002
Mft Zone Start : 0x00000000000c0000
Mft Zone End : 0x00000000000cc820
RM Identifier: 3C01C11E-E510-11E0-9CB5-0025903AE563

Any information will be very helpful.