linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Open/INQUIRY fails on RESERVE'd tape device
@ 2014-01-24  8:35 kai.makisara
  2014-01-24 16:22 ` Douglas Gilbert
  0 siblings, 1 reply; 5+ messages in thread
From: kai.makisara @ 2014-01-24  8:35 UTC (permalink / raw)
  To: Matthias Eble, linux-scsi

Matthias Eble [psychotrahe@gmail.com] kirjoitti: 
> Hi list,
> 
> When a tape device is reserved with old reserve/release commands,
> we see inquiry only works on the scsi generic device. For scsi tape devices
> open() fails already:
> 
> # lsscsi -g | grep st15
> [2:0:6:0]    tape    HP       Ultrium 5-SCSI   I5DZ  /dev/st15  /dev/sg17
> 
> # sg_vpd -vvv /dev/st15
>   open /dev/st15 with flags=0x800
>   error opening file: /dev/st15: Input/output error
> 
> # sg_vpd -vvv /dev/nst15
>   open /dev/nst15 with flags=0x800
>   error opening file: /dev/nst15: Input/output error
> 
> # sg_vpd -vvv /dev/sg17
> open /dev/sg17 with flags=0x800
> Supported VPD pages VPD page:
>     inquiry cdb: 12 01 00 00 fc 00
>       duration=2 ms
>     inquiry: requested 252 bytes but got 22 bytes
>    [PQual=0  Peripheral device type: tape]
>   Supported VPD pages [sv]
>   Unit serial number [sn]
>   ...
> 
> 
> So: should open() fail on a reserved tape device?
> SPC2 states that INQUIRY should never conflict.
> Or does that only apply to the generic device?
> Okay, it doesn't conflict, but open fails. A SunOS st man page I found
> states, INQUIRY shall be possible with reserved devices.
> 
Opening a st device does more than INQUIRY (TEST_UNIT_READY, READ_BLOCK_LIMITS,
MODE_SENSE). Can this explain what you see?

Kai


-- 




^ permalink raw reply	[flat|nested] 5+ messages in thread
* Open/INQUIRY fails on RESERVE'd tape device
@ 2014-01-23 22:02 Matthias Eble
  2014-01-24 15:36 ` Jeremy Linton
  0 siblings, 1 reply; 5+ messages in thread
From: Matthias Eble @ 2014-01-23 22:02 UTC (permalink / raw)
  To: linux-scsi

Hi list,

When a tape device is reserved with old reserve/release commands,
we see inquiry only works on the scsi generic device. For scsi tape devices
open() fails already:

# lsscsi -g | grep st15
[2:0:6:0]    tape    HP       Ultrium 5-SCSI   I5DZ  /dev/st15  /dev/sg17

# sg_vpd -vvv /dev/st15
  open /dev/st15 with flags=0x800
  error opening file: /dev/st15: Input/output error

# sg_vpd -vvv /dev/nst15
  open /dev/nst15 with flags=0x800
  error opening file: /dev/nst15: Input/output error

# sg_vpd -vvv /dev/sg17
open /dev/sg17 with flags=0x800
Supported VPD pages VPD page:
    inquiry cdb: 12 01 00 00 fc 00
      duration=2 ms
    inquiry: requested 252 bytes but got 22 bytes
   [PQual=0  Peripheral device type: tape]
  Supported VPD pages [sv]
  Unit serial number [sn]
  ...


So: should open() fail on a reserved tape device?
SPC2 states that INQUIRY should never conflict.
Or does that only apply to the generic device?
Okay, it doesn't conflict, but open fails. A SunOS st man page I found
states, INQUIRY shall be possible with reserved devices.

Of course the inquiry succeeds, after the reservation is being released.


Thanks in advance
Matthias

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-24 21:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-24  8:35 Open/INQUIRY fails on RESERVE'd tape device kai.makisara
2014-01-24 16:22 ` Douglas Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2014-01-23 22:02 Matthias Eble
2014-01-24 15:36 ` Jeremy Linton
2014-01-24 21:48   ` Matthias Eble

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).