scsi_ctl.7 (2010 09)

s
scsi_ctl(7) scsi_ctl(7)
is issued on a persistent device file, target and bus exclusive access requests result to a LUN exclusive
access being performed.
SIOC_REL_LUN_EXCL
release exclusive access to logical unit
SIOC_SET_LUN_EXCL
obtain exclusive access to logical unit
SIOC_REL_TGT_EXCL
release exclusive access to target
SIOC_SET_TGT_EXCL
obtain exclusive access to target
SIOC_REL_BUS_EXCL
release exclusive access to bus
SIOC_SET_BUS_EXCL
obtain exclusive access to bus
The ioctl
SIOC_PRIORITY_MODE
is deprecated with HP-UX release 11i V3. If called, it will just fake
success. This ioctl was used to workaround situations where it is not possible to set exclusive access to
the device. It put the device in "Priority mode". This caused all device-specific driver I/O operations (for
example, file system I/O and virtual memory page swapping) and all SCSI device driver open calls
(including pass-through driver open calls) to the associated LUN to block. These I/O operations and open
calls were blocked for the entire duration that priority mode was in effect. While priority mode was in
effect only
SIOC_IO operations could be attempted. (these operations will not be blocked). It was very
easy to cause system deadlock through incorrect use of the
SIOC_PRIORITY_MODE
ioctl. It normally
required to lock the calling process into memory (see plock (2)) prior to enabling priority mode.
The header file
<sys/scsi.h> has useful information for SCSI device control. The following is
included from <sys/scsi.h>:
/* SCSI device control ioctls */
#define SIOC_IO _IOWR(’S’, 22, struct sctl_io)
#define SIOC_RESET_DEV _IO(’S’, 16)
#define SIOC_RESET_BUS _IO(’S’, 9)
#define SIOC_PRIORITY_MODE _IOW(’S’, 67, int)
#define SIOC_IO_EXT _IOWR(’S’, 102, esctl_io_t)
#define SIOC_TASK_MGMT _IOWR(’S’, 104, sioc_task_mgmt_t)
/* Structure for SIOC_IO_EXT ioctl */
typedef struct {
int version;
escsi_sctl_io_flags_t flags;
int max_msecs;
uint32_t cdb_length;
uint32_t data_length;
ptr64_t data;
union sense_data sense;
escsi_hw_path_t lpt_hwp;
uint32_t data_xfer;
uint32_t sense_xfer;
uint32_t cdb_status;
uint32_t sense_status;
uint8_t cdb[ESCSI_MAX_CDB_LEN];
uint32_t rsvd[32]; /* Reserved for
* future use
*/
} esctl_io_t;
/* Structure for SIOC_IO ioctl */
struct sctl_io
{
unsigned flags;
unsigned char cdb_length;
unsigned char cdb[16];
void *data;
unsigned data_length;
unsigned max_msecs;
unsigned data_xfer;
unsigned cdb_status;
unsigned char sense[256];
HP-UX 11i Version 3: September 2010 7 Hewlett-Packard Company 7