device-mapper-multipath/0041-RHBZ-587695-add-rdac-message.patch
Benjamin Marzinski b0ec4a42c8 Modify 0012-RH-udev-sync-support.patch
Modify 0021-RHBZ-548874-add-find-multipaths.patch
Modify 0022-RHBZ-557845-RHEL5-style-partitions.patch
Add 0025-RHBZ-508827-update-multipathd-manpage.patch through
    0101-RHBZ-631009-disable-udev-disk-rules-on-reload.patch
  * sync with current state of RHEL6. Next release should include a updated
    source tarball with most of these fixes rolled in.
Add 0102-RHBZ-690828-systemd-unit-file.patch
  * Add Jóhann B. Guðmundsson's unit file for systemd.
  * Add sub-package sysvinit for SysV init script.
Resolves: bz #690828
2011-07-15 12:25:48 -05:00

55 lines
1.2 KiB
Diff

---
libmultipath/checkers/rdac.c | 32 ++++++++++++++++++++------------
1 file changed, 20 insertions(+), 12 deletions(-)
Index: multipath-tools/libmultipath/checkers/rdac.c
===================================================================
--- multipath-tools.orig/libmultipath/checkers/rdac.c
+++ multipath-tools/libmultipath/checkers/rdac.c
@@ -101,25 +101,33 @@ 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),
c->timeout)) {
- 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;
}