- SCSI reservation conflict status gets eaten!
- Posted by chejlava on May 9th, 2005
All: (repost since my original message in win32.programmer.kernel got zero
response)
I'm trying to add SCSI reserve/release (using both simple and Persistent
Reserve) to our product, and have run into a problem that seems to only show
up on my Windows systems:
When I issue a command using pass-through direct to a tape drive that has
been reserved by a different host:
DeviceIoControl((HANDLE)cdi_info->path.handle,
IOCTL_SCSI_PASS_THROUGH_DIRECT, buffer,
sizeof (SCSI_PASS_THROUGH_DIRECT), buffer,
sizeof (buffer), &nb, FALSE);
returns FALSE, and GetLastError() returns 0x45d (1117) which maps to
ERROR_IO_DEVICE.
The big problem is that the SCSI status in the SCSI_PASS_THROUGH_DIRECT
structure gets set to zero - not the expected 0x18 or anything else that I
could map onto "reservation conflict"
I've tried with both HP LTO and LTO-2 drives, Quantum SDLT600, using several
LSI and Adaptec SCSI HBAs. (Windows HBA set to SCSI ID 8, 2nd system is
linux with LSI HBA - it correctly returns the reservation conflict status.)
Is this a known issue with win2k (which I'm using here)? Also appears on
win2k3.
Thanks
--
chejlava/Legato
--
chejlava/Legato
- Posted by Phil Barila on May 10th, 2005
"chejlava" <chejlava@discussions.microsoft.com> wrote in message
news:AE66AE4A-DF81-46A2-AE6C-240297BDE838@microsoft.com...
The last parameter should be NULL (maybe), not FALSE. Did you open your
handle with the OVERLAPPED flag? If so, you need to pass an LPOVERLAPPED.
Is there a sense buffer appended to your buffer? It looks like it, but
without posting real code, it's impossible to know.
Need more info to definitively answer this.
Phil
--
Philip D. Barila Windows DDK MVP
Seagate Technology, LLC
(720) 684-1842
As if I need to say it: Not speaking for Seagate.
E-mail address is pointed at a domain squatter. Use reply-to instead.
- Posted by chejlava on May 10th, 2005
"Phil Barila" wrote:
Than ks for the reply - see my comments below:
No sense info at all - SCSI analyzer trace shows only the Reserve unit
command
(CDB = 16 00 00 00 00 00) and then the status of 0x18 (reservation conflict)
followed by message in of Command Complete. No request sense is sent.
(I'll try adding an expiclit request sense command after a failure to see
if I can get a reservation conflict back from the drive...)
thanks
edc
<snip>>
- Posted by chejlava on May 10th, 2005
Well, turns out that you can't even send a request sense command to a device
that is reserved by somebody else, so this is a no-go.....
edc
- Posted by Phil Barila on May 11th, 2005
"chejlava" <chejlava@discussions.microsoft.com> wrote in message
news:9FC062B7-0272-4FD3-847B-D37820B96883@microsoft.com...
Bummer. I'm reasonably well versed in using SPTI, but I haven't ever tried
doing what you are doing. You've exceeded the bounds of my knowledge. Sorry
I couldn't help more.
Phil
--
Philip D. Barila Windows DDK MVP
Seagate Technology, LLC
(720) 684-1842
As if I need to say it: Not speaking for Seagate.
E-mail address is pointed at a domain squatter. Use reply-to instead.
- Posted by heinz on May 11th, 2005
Maybe give IOCTL_STORAGE_RESERVE, IOCTL_STORAGE_BREAK_RESERVATION, and
those type ioctl's a try instead of manually sending through SPTD.
- Posted by chejlava on May 11th, 2005
Thanks for responding though - the silence from my previous post was
deafening...
edc
- Posted by chejlava on May 11th, 2005
"heinz" wrote:
heinz:
Unfortunately, the code I'm working on is trying to be platform independent,
plus I'm using both simple (0x16/0x17) and persistent reserve which the IOCTL
doesn't do.
thanks for the suggestion though.
edc
- Posted by Jeff Goldner [MS] on May 24th, 2005
This is a known problem (win2k-XP-w2k3). On a passthrough command, if the
SRB status isn't good, we don't fill in the sense info. Unfortunately, the
1117L error is pretty much useless in determining the cause of the problem.
We're looking into it.
"chejlava" <chejlava@discussions.microsoft.com> wrote in message
news:C1869FBC-9F70-427C-AE7B-D836708AA228@microsoft.com...
- Posted by chejlava on May 24th, 2005
Jeff:
Thanks for the info. I see work-around city on the horizon.
--
chejlava/Legato
"Jeff Goldner [MS]" wrote: