Bug 168801

Summary: kernel dm multipath: ioctl support
Product: Red Hat Enterprise Linux 4 Reporter: Narasimha Murthy <narasimha.murthy>
Component: kernelAssignee: Milan Broz <mbroz>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 4.0CC: agk, christophe.varoqui, coughlan, ddomingo, dmo, dwysocha, egoggin, jbrassow, jturner, kanderso, lmb, malcolm.demare, mbroz, pvrabec, rkenna, rvchan, sdavies, tranlan
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0304 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-01 23:24:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 207575, 211071    

Description Narasimha Murthy 2005-09-20 13:22:22 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)

Description of problem:
For supporting cluster applications, HP requires the DM devices to support ioctls for the following:
1. Bus reset.
2. Device reset.
3. SCSI verify/reserve/release commands.

Filing the request in the bugzilla for supporting specific ioctls, as per the discussions in the teleconf on 15th Sep'05.

Thanks and regards
Murthy


Version-Release number of selected component (if applicable):


How reproducible:
Didn't try

Steps to Reproduce:
1.none
2.
3.
  

Additional info:

Comment 1 Alasdair Kergon 2005-09-20 20:58:10 UTC
The core issue is that ioctl() is designed to act on a single device - whereas a
device-mapper device has an arbitrary set of devices and mappings behind.

The ideal option would be to have an ioctl() extension which included additional
information for device-mapper to use to determine where to send the request.

The more realistic approach will be to support only restricted sets of ioctls on
restricted sets of device-mapper devices.

We need to determine exactly what we can support.

I think this particular request is:

    If the mapped device has exactly one target in its table and that target is
of type 'multipath' then support most (or all?) ioctls by handing them on to
exactly one path in a similar way to that in which I/O is processed.

Are there any ioctls for which this would cause problems?


Comment 3 Narasimha Murthy 2005-10-06 06:43:11 UTC
The Bus/device resets or inquiry commands will not have any effect if its done 
on any one of the paths. 

Will there be any effect if the above ioctls are executed through any one of 
the paths if the mapped device has multiple targets.

Comment 7 Narasimha Murthy 2005-10-20 12:46:13 UTC
We need support for some more ioctls like Inquiry, RAW_GETBIND and RAW_SETBIND.

Comment 9 Alasdair Kergon 2005-10-20 19:30:28 UTC
*** Bug 171318 has been marked as a duplicate of this bug. ***

Comment 13 Narasimha Murthy 2005-12-14 09:23:36 UTC
Below are some thoughts,

DM multipathing target may need to only implement one ioctl that will pass 
through a SCSI commands. This will allow INQUIRE, TUR, and CAPACITY commands to 
be handled in the same way by DM without a lot of translations. The library 
calls to routines would return the results of an INQUIRY, TUR, or CAPACITY as 
needed, using the SCSI pass through ioctl.

It may be a good idea to leave ioctls like resets to be done through sysfs 
interface. It may allow the greater control over the SCSI-FC environment when 
this is implemented in the HBA driver. 


Comment 15 Ravichandra Krishnamurthy 2006-03-21 13:36:21 UTC
When this is fixed, does it mean the following will work on a dm-multipath 
device consisting of either scsi or cciss class of disk device:
1. RAW_SETBIND and RAW_GETBIND would work on /dev/raw/rawctl to give details 
of what raw device dm-multipath target is bound to(get) and actually bind it to
(set).

2. Serial number(VPD page 0x80) and WWN(page 0x83) can be obtained from the 
INQUIRY ioctl.

Comment 28 Jay Turner 2006-12-12 17:53:31 UTC
QE ack for 4.5.

Comment 31 Jason Baron 2007-01-02 18:28:15 UTC
committed in stream U5 build 42.36. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/


Comment 34 Red Hat Bugzilla 2007-05-01 23:24:00 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0304.html