Bug 421281 - SCSI_IOCTL_SEND_COMMAND, SG_IO and SCSI_IOCTL_GET_IDLUN calls does not work for device mapper multipath devices
Summary: SCSI_IOCTL_SEND_COMMAND, SG_IO and SCSI_IOCTL_GET_IDLUN calls does not work f...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.4
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Alasdair Kergon
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-12 12:38 UTC by Dhananjay Kulkarni
Modified: 2007-12-12 13:34 UTC (History)
12 users (show)

Fixed In Version: 4.5.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-12-12 13:34:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dhananjay Kulkarni 2007-12-12 12:38:32 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.9) Gecko/20071105 Fedora/2.0.0.9-1.fc7 Firefox/2.0.0.9

Description of problem:
I have following code to issue SCSI_IOCTL_GET_IDLUN

unsigned int flags = O_RDWR | O_NONBLOCK;
unsigned int status, id[2], deviceId;

deviceId = open(deviceName.c_str(), flags);
status = ioctl (deviceId, SCSI_IOCTL_GET_IDLUN, &id);

This call fails if deviceName is of type /dev/mapper/mpath4
This call is successfull for normal scsi devices. /dev/sdh

# multipath -l mpath4
mpath4 (360060480000290300149533030303743)
[size=4 GB][features="0"][hwhandler="0"]
\_ round-robin 0 [active]
 \_ 1:0:0:92    sdh 8:112  [active][ready]
 \_ 1:0:1:92    sdo 8:224  [active][ready]
 \_ 2:0:0:92    sdx 65:112 [active][ready]

Same is the case of call 

SCSI_IOCTL_SEND_COMMAND - I use this to read SCSI mod pages for device inquiry
SG_IO - I use this to issue SCSI3 Persistent Group Reservation




Version-Release number of selected component (if applicable):
device-mapper-1.02.07-4.0.RHEL4,  device-mapper-1.02.07-4.0.RHEL4, device-mapper-multipath-0.4.5-16.1.RHEL4
device-mapper-multipath-0.4.5-16.1.RHEL4

How reproducible:
Always


Steps to Reproduce:
1. Write code which accepts device path and issue above mentioned IOCTLS
2. Run the code mentioned above by passing device path generated by device-mapper multipath module.


Actual Results:
SCSI_IOCTL_SEND_COMMAND, SG_IO and SCSI_IOCTL_GET_IDLUN device calls fails on /dev/mapper/mpath4

Expected Results:
SCSI_IOCTL_SEND_COMMAND, SG_IO and SCSI_IOCTL_GET_IDLUN calls should pass on /dev/mapper/mpath4 and return appropriate data.

Additional info:

Comment 1 Alasdair Kergon 2007-12-12 13:34:17 UTC
I think we added this support for this to the kernel in 4.5.0: please try that,
and if you still have problems, reopen this.


Note You need to log in before you can comment on or make changes to this bug.