Re: DPC in Windows 2003
- From: "Andrew Sha" <universalkludge@xxxxxxxxxxx>
- Date: Mon, 24 Dec 2007 15:56:20 -0600
I wonder where the check against the buffer size and alignment (sector
size) is performed. Another words - is it kosher to fail requests that are
not aligned in address and/or size against the reported volume sector size
in the storport (scsiport, ataport) framework? It is to be checked in the
storport (or such), is not it? So you are not supposed to get such requests
at all if so. Anybody w/ comments?
"Alexander Grigoriev" <alegr@xxxxxxxxxxxxx> wrote in message
news:u92EOtkRIHA.5524@xxxxxxxxxxxxxxxxxxxxxxx
Per Win32 API requirements, buffers for FILE_FLAG_NO_BUFFERING must be
aligned on sector size. You won't get misaligned buffers.
"Maxim" <Maxim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:52706696-21F0-4874-B42C-10667C50FDA2@xxxxxxxxxxxxxxxx
Why do you need anything else beyond the SG list to handle that?
Because my device supports accesses only in multiples of 128 bytes - i.e.
each DMA element must be a multiple of 128 bytes. Lets say I specify
SCSI
block size of 512 and that a user program requests a 4K transfer.
What I
see happening is that depending on the alignment of the buffer in the
user
program, I might be presented with a 2 element SG list, consisting, for
example, of 200 byte element and a 4K-200 element. Such transfers would
not
be supported by my device, i.e. I have to transfer to a temporary buffer
and
then copy. Inefficient but I have no choice. Fortunately, seems like
most
OS services allocate buffers that are at least page-aligned. The one
offending program that doesn't is "format". There are others, of course.
Any ideas about the questions I ask in the previous post? Thanks!
.
- References:
- Re: DPC in Windows 2003
- From: Andrew Sha
- Re: DPC in Windows 2003
- From: Alexander Grigoriev
- Re: DPC in Windows 2003
- Prev by Date: Re: Some icons are not getting print while using mirror driver
- Next by Date: Re: Mirror Driver Installation
- Previous by thread: Re: DPC in Windows 2003
- Next by thread: Re: DPC in Windows 2003
- Index(es):
Relevant Pages
|