I have used the user mode API GetFileInformationByHandleEx FileAlignmentInfo for several years. on every system except one it has always either failed (older OS), or returned 0 or 1 as the AlignmentRequirement
I have encountered a system with a disk where AlignmentRequirement comes back as 3. This seems strange to me as I expected the AlignmentRequirement to always be a power of 2, but either I am doing something wrong or my expectations are fallacious
has anyone seen behaviour like this before?
the disk in question is a Cisco UCS-PCI25-40010= - 400GB 2.5IN SFF PCIE NVMESTOR INTL P3700 HGH ENDURANCE
and the OS is Server 2012 R2
I subsequently use the alignment in this code to align a pointer
I have used the user mode API GetFileInformationByHandleEx FileAlignmentInfo for several years. on every system except one it has always either failed (older OS), or returned 0 or 1 as the AlignmentRequirement
I have encountered a system with a disk where AlignmentRequirement comes back as 3. This seems strange to me as I expected the AlignmentRequirement to always be a power of 2, but either I am doing something wrong or my expectations are fallacious
has anyone seen behaviour like this before?
Interesting. My SATA hard disks return 1, a network drive returns 0, a
USB memory stick returns 0, but a USB-attached SATA drive returns 3.
So, that value is either a bitmask, or log 2 of the actual value. I’d
be more likely to guess a bitmask, which means the value YOU want is N+1.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
I have used the user mode API GetFileInformationByHandleEx
FileAlignmentInfo for several years. on every system except one it has
always either failed (older OS), or returned 0 or 1 as the
AlignmentRequirement
I have encountered a system with a disk where AlignmentRequirement comes
back as 3. This seems strange to me as I expected the
AlignmentRequirement to always be a power of 2, but either I am doing
something wrong or my expectations are fallacious
has anyone seen behaviour like this before?
Interesting. My SATA hard disks return 1, a network drive returns 0, a
USB memory stick returns 0, but a USB-attached SATA drive returns 3.
So, that value is either a bitmask, or log 2 of the actual value. I’d
be more likely to guess a bitmask, which means the value YOU want is N+1.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
From: Scott Noonemailto:xxxxx Sent: August 25, 2017 8:59 AM To: Windows System Software Devs Interest Listmailto:xxxxx Subject: Re:[ntdev] FILE_ALIGNMENT_INFO
Correct…The value returned is from the AlignmentRequirement field of the device object:
xxxxx@hotmail.comxxxxx@lists.osr.com wrote: > I have used the user mode API GetFileInformationByHandleEx > FileAlignmentInfo for several years. on every system except one it has > always either failed (older OS), or returned 0 or 1 as the > AlignmentRequirement > > I have encountered a system with a disk where AlignmentRequirement comes > back as 3. This seems strange to me as I expected the > AlignmentRequirement to always be a power of 2, but either I am doing > something wrong or my expectations are fallacious > > has anyone seen behaviour like this before?
Interesting. My SATA hard disks return 1, a network drive returns 0, a USB memory stick returns 0, but a USB-attached SATA drive returns 3.
So, that value is either a bitmask, or log 2 of the actual value. I’d be more likely to guess a bitmask, which means the value YOU want is N+1.
– Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.