Windows 7 and zero byte storport write request

In my virtual storport driver I think I’m seeing a write of 0 bytes. My
scsiport driver never saw such a thing. Is that expected, and should I
just return a dummy ‘success’?

Alternatively, maybe I have a bug somewhere making the write appear to
have zero length?

Thanks

James

What kind of write is the CDB? A WRITE (6) with a transfer length of
zero means 256 blocks. IIRC scsiport doesn’t issue WRITE 6’s, but I
guess storport might?

Paul

On 2 February 2011 04:35, James Harper wrote:
> In my virtual storport driver I think I’m seeing a write of 0 bytes. My
> scsiport driver never saw such a thing. Is that expected, and should I
> just return a dummy ‘success’?
>
> Alternatively, maybe I have a bug somewhere making the write appear to
> have zero length?
>
> Thanks
>
> James
>
> —
> NTDEV is sponsored by OSR
>
> 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
>


Paul Durrant
http://www.linkedin.com/in/pdurrant

>

What kind of write is the CDB? A WRITE (6) with a transfer length of
zero means 256 blocks. IIRC scsiport doesn’t issue WRITE 6’s, but I
guess storport might?

Nothing in my drivers to handle a SCSIOP_WRITE6, just SCSIOP_WRITE (10
byte) and SCSIOP_WRITE16 (16 byte) which are all I’ve ever seen windows
issue. A SCSIOP_WRITE6 would be returned as unimplemented, and logged,
and I’m not seeing that.

Good to know though, if I ever have to support it!

Having finally set up a Windows 7 test box identical to the 2 people
reporting the crash, I can’t reproduce it. I assume that my ‘identical’
is wrong but I can’t see where…

Thanks

James

> >

> What kind of write is the CDB? A WRITE (6) with a transfer length of
> zero means 256 blocks. IIRC scsiport doesn’t issue WRITE 6’s, but I
> guess storport might?
>

Nothing in my drivers to handle a SCSIOP_WRITE6, just SCSIOP_WRITE (10
byte) and SCSIOP_WRITE16 (16 byte) which are all I’ve ever seen
windows
issue. A SCSIOP_WRITE6 would be returned as unimplemented, and logged,
and I’m not seeing that.

Good to know though, if I ever have to support it!

Having finally set up a Windows 7 test box identical to the 2 people
reporting the crash, I can’t reproduce it. I assume that my
‘identical’
is wrong but I can’t see where…

Add another virtual cpu and *boom* - crash straight away. I guess my
understanding of locking under virtual storport isn’t quite right…
time to read the docs.

James