Bug 421281 - SCSI_IOCTL_SEND_COMMAND, SG_IO and SCSI_IOCTL_GET_IDLUN calls does not work for device mapper multipath devices
SCSI_IOCTL_SEND_COMMAND, SG_IO and SCSI_IOCTL_GET_IDLUN calls does not work f...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.4
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
Corey Marthaler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-12 07:38 EST by Dhananjay Kulkarni
Modified: 2007-12-12 08:34 EST (History)
12 users (show)

See Also:
Fixed In Version: 4.5.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-12 08:34:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dhananjay Kulkarni 2007-12-12 07:38:32 EST
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 08:34:17 EST
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.