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 04-09-2010, 08:30 PM
"Moger, Babu"
 
Default multipath_tools: minor rdac message fix and code cleanup

This patch fixes a rdac minor message issue. rdac message is not passed in one of the path down cases. This patch fixes this problem. Also I have re-arranged the code for better readability.

Signed-off-by: Babu Moger <babu.moger@lsi.com>
Reviewed-by: Vijay Chauhan <Vijay.Chauhan@lsi.com>

---
--- multipath-tools/libmultipath/checkers/rdac.c.orig 2010-04-08 13:14:52.000000000 -0500
+++ multipath-tools/libmultipath/checkers/rdac.c 2010-04-09 13:57:36.000000000 -0500
@@ -101,24 +101,32 @@ extern int
libcheck_check (struct checker * c)
{
struct volume_access_inq inq;
+ int ret;

memset(&inq, 0, sizeof(struct volume_access_inq));
if (0 != do_inq(c->fd, 0xC9, &inq, sizeof(struct volume_access_inq))) {
- MSG(c, MSG_RDAC_DOWN);
- return PATH_DOWN;
- } else {
- if ((inq.PQ_PDT & 0x20) || (inq.PQ_PDT & 0x7f)) {
- /* LUN not connected*/
- return PATH_DOWN;
- }
+ ret = PATH_DOWN;
+ goto done;
+ } else if ((inq.PQ_PDT & 0x20) || (inq.PQ_PDT & 0x7f)) {
+ /* LUN not connected*/
+ ret = PATH_DOWN;
+ goto done;
}

- if (inq.avtcvp & 0x1) {
+ ret = ((inq.avtcvp & 0x1) ? PATH_UP : PATH_GHOST);
+
+done:
+ switch (ret) {
+ case PATH_DOWN:
+ MSG(c, MSG_RDAC_DOWN);
+ break;
+ case PATH_UP:
MSG(c, MSG_RDAC_UP);
- return PATH_UP;
- }
- else {
+ break;
+ case PATH_GHOST:
MSG(c, MSG_RDAC_GHOST);
- return PATH_GHOST;
+ break;
}
+
+ return ret;
}



--
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 04:51 PM.

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