FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 08-08-2012, 04:10 PM
"Moger, Babu"
 
Default scsi_dh_rdac: Add empty set_params function to scsi_dh_rdac

This patch adds empty set_params function to scsi_dh_rdac.

This patch is required for the following features to work properly.
1. add retain_attached_hw_handler feature

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=a58a935d5a1b2ad267017a68c3a1b ca26226cc76

2. add scsi_dh_attached_handler_name

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=7e8a74b177f17d100916b6ad41545 0f7c9508691


DM layer detaches the handler if the set_params is not implemented or fails.

For example if we pass following parameters from multipath:

features "1 retain_attached_hw_handler" (consider rdac as attached_hw_handler)
hardware_handler "2 alua 1"

If the attached_hw_handler is rdac, then DM anyway tries to call set_params on rdac. Because rdac does not
implement set_params, scsi_dh_set_params fails and DM detaches the handler.

This patch fixes this problem.

Signed-off-by: Babu Moger <babu.moger@netapp.com>
---
--- linux-3.5-rc7/drivers/scsi/device_handler/scsi_dh_rdac.c.orig 2012-08-08 10:38:54.000000000 -0500
+++ linux-3.5-rc7/drivers/scsi/device_handler/scsi_dh_rdac.c 2012-08-08 11:02:10.000000000 -0500
@@ -816,6 +816,17 @@ static const struct scsi_dh_devlist rdac
{NULL, NULL},
};

+/*
+ * params - parameters in the following format
+ * "no_of_paramsparam1param2param3..."
+ * for example, string for 2 parameters with value 10 and 21
+ * is specified as "21021".
+ */
+static int rdac_set_params(struct scsi_device *sdev, const char *params)
+{
+ return 0;
+}
+
static bool rdac_match(struct scsi_device *sdev)
{
int i;
@@ -846,6 +857,7 @@ static struct scsi_device_handler rdac_d
.attach = rdac_bus_attach,
.detach = rdac_bus_detach,
.activate = rdac_activate,
+ .set_params = rdac_set_params,
.match = rdac_match,
};




--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 10:17 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org