Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > d0a35cd31c1125e2132804d68547073d > files > 3173

kernel-2.6.18-194.26.1.el5.src.rpm

From: Hendrik Brueckner <brueckner@redhat.com>
Date: Wed, 4 Aug 2010 10:03:00 -0400
Subject: [s390] dasd: force online does not work
Message-id: <1280916181-27024-8-git-send-email-brueckner@redhat.com>
Patchwork-id: 27370
O-Subject: [RHEL5.6 PATCH 7/8] [s390x] dasd: force online does not work
Bugzilla: 619466
RH-Acked-by: Pete Zaitcev <zaitcev@redhat.com>

Description
-----------
A force online for a DASD device does not succeed if another side
has reserved the disk.

ccw_device_set_options() in dasd_generic_probe() unsets the
CCWDEV_ALLOW_FORCE flag set in dasd_eckd_probe(). This leads to
unconditional reserve not being allowed on ECKD dasds from the
online attribute.

Set needed flags only in discipline specific probe functions.

Bugzilla
--------
BZ 619466
https://bugzilla.redhat.com/show_bug.cgi?id=619466

Upstream status of the patch
----------------------------
The patch is specific to RHEL 5.

Test status
-----------
The patch has been tested and fixes the problem.
The fix has been verified by the IBM test department.

diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 9581930..9081ed0 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -1942,13 +1942,6 @@ dasd_generic_probe (struct ccw_device *cdev,
 {
 	int ret;
 
-	ret = ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP);
-	if (ret) {
-		printk(KERN_WARNING
-		       "dasd_generic_probe: could not set ccw-device options "
-		       "for %s\n", cdev->dev.bus_id);
-		return ret;
-	}
 	ret = dasd_add_sysfs_files(cdev);
 	if (ret) {
 		printk(KERN_WARNING
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 7aa2077..e61b91a 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -108,7 +108,8 @@ dasd_eckd_probe (struct ccw_device *cdev)
 	int ret;
 
 	/* set ECKD specific ccw-device options */
-	ret = ccw_device_set_options(cdev, CCWDEV_ALLOW_FORCE);
+	ret = ccw_device_set_options(cdev,
+				     CCWDEV_ALLOW_FORCE | CCWDEV_DO_PATHGROUP);
 	if (ret) {
 		printk(KERN_WARNING
 		       "dasd_eckd_probe: could not set ccw-device options "
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
index 7250144..3362715 100644
--- a/drivers/s390/block/dasd_fba.c
+++ b/drivers/s390/block/dasd_fba.c
@@ -55,6 +55,15 @@ static struct ccw_driver dasd_fba_driver; /* see below */
 static int
 dasd_fba_probe(struct ccw_device *cdev)
 {
+	int ret;
+
+	ret = ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP);
+	if (ret) {
+		printk(KERN_WARNING
+		       "dasd_fba_probe: could not set ccw-device options "
+		       "for %s\n", cdev->dev.bus_id);
+		return ret;
+	}
 	return dasd_generic_probe(cdev, &dasd_fba_discipline);
 }