Blame SOURCES/0244-RHBZ-1562247-remove-rbd.patch

6add9d
---
6add9d
 libmultipath/checkers.c              |   23 -
6add9d
 libmultipath/checkers.h              |    5 
6add9d
 libmultipath/checkers/Makefile       |    7 
6add9d
 libmultipath/checkers/cciss_tur.c    |    5 
6add9d
 libmultipath/checkers/directio.c     |    5 
6add9d
 libmultipath/checkers/emc_clariion.c |    5 
6add9d
 libmultipath/checkers/hp_sw.c        |    5 
6add9d
 libmultipath/checkers/rbd.c          |  652 -----------------------------------
6add9d
 libmultipath/checkers/rdac.c         |    5 
6add9d
 libmultipath/checkers/readsector0.c  |    5 
6add9d
 libmultipath/checkers/tur.c          |    5 
6add9d
 libmultipath/discovery.c             |  112 ------
6add9d
 libmultipath/hwtable.c               |   14 
6add9d
 libmultipath/structs.h               |    1 
6add9d
 multipath.conf.annotated             |    4 
6add9d
 multipath/multipath.conf.5           |    3 
6add9d
 multipathd/main.c                    |   13 
6add9d
 17 files changed, 18 insertions(+), 851 deletions(-)
6add9d
6add9d
Index: multipath-tools-130222/libmultipath/checkers/rbd.c
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/checkers/rbd.c
6add9d
+++ /dev/null
6add9d
@@ -1,652 +0,0 @@
6add9d
-/*
6add9d
- * Copyright (c) 2016 Red Hat
6add9d
- * Copyright (c) 2004 Christophe Varoqui
6add9d
- *
6add9d
- * Code based off of tur.c and ceph's krbd.cc
6add9d
- */
6add9d
-#define _GNU_SOURCE
6add9d
-#include <stdio.h>
6add9d
-#include <stdlib.h>
6add9d
-#include <string.h>
6add9d
-#include <unistd.h>
6add9d
-#include <fcntl.h>
6add9d
-#include <errno.h>
6add9d
-#include <pthread.h>
6add9d
-#include <libudev.h>
6add9d
-#include <ifaddrs.h>
6add9d
-#include <sys/types.h>
6add9d
-#include <sys/stat.h>
6add9d
-#include <sys/ioctl.h>
6add9d
-#include <sys/time.h>
6add9d
-#include <sys/wait.h>
6add9d
-
6add9d
-#include "rados/librados.h"
6add9d
-
6add9d
-#include "structs.h"
6add9d
-#include "checkers.h"
6add9d
-
6add9d
-#include "../libmultipath/debug.h"
6add9d
-#include "../libmultipath/uevent.h"
6add9d
-#include "../libmultipath/util.h"
6add9d
-
6add9d
-struct rbd_checker_context;
6add9d
-typedef int (thread_fn)(struct rbd_checker_context *ct, char *msg);
6add9d
-
6add9d
-#define RBD_MSG(msg, fmt, args...) snprintf(msg, CHECKER_MSG_LEN, fmt, ##args);
6add9d
-
6add9d
-#define RBD_FEATURE_EXCLUSIVE_LOCK	(1 << 2)
6add9d
-
6add9d
-struct rbd_checker_context {
6add9d
-	int rbd_bus_id;
6add9d
-	char *client_addr;
6add9d
-	char *config_info;
6add9d
-	char *snap;
6add9d
-	char *pool;
6add9d
-	char *image;
6add9d
-	char *username;
6add9d
-	int remapped;
6add9d
-	int blacklisted;
6add9d
-	int lock_on_read:1;
6add9d
-
6add9d
-	rados_t cluster;
6add9d
-
6add9d
-	int state;
6add9d
-	int running;
6add9d
-	time_t time;
6add9d
-	thread_fn *fn;
6add9d
-	pthread_t thread;
6add9d
-	pthread_mutex_t lock;
6add9d
-	pthread_cond_t active;
6add9d
-	pthread_spinlock_t hldr_lock;
6add9d
-	int holders;
6add9d
-	char message[CHECKER_MSG_LEN];
6add9d
-};
6add9d
-
6add9d
-int libcheck_init(struct checker * c)
6add9d
-{
6add9d
-	struct rbd_checker_context *ct;
6add9d
-	struct udev_device *block_dev;
6add9d
-	struct udev_device *bus_dev;
6add9d
-	struct udev *udev;
6add9d
-	struct stat sb;
6add9d
-	const char *block_name, *addr, *config_info, *features_str;
6add9d
-	const char *image, *pool, *snap, *username;
6add9d
-	uint64_t features = 0;
6add9d
-	char sysfs_path[PATH_SIZE];
6add9d
-	int ret;
6add9d
-
6add9d
-	ct = malloc(sizeof(struct rbd_checker_context));
6add9d
-	if (!ct)
6add9d
-		return 1;
6add9d
-	memset(ct, 0, sizeof(struct rbd_checker_context));
6add9d
-	ct->holders = 1;
6add9d
-	pthread_cond_init(&ct->active, NULL);
6add9d
-	pthread_mutex_init(&ct->lock, NULL);
6add9d
-	pthread_spin_init(&ct->hldr_lock, PTHREAD_PROCESS_PRIVATE);
6add9d
-	c->context = ct;
6add9d
-
6add9d
-	/*
6add9d
-	 * The rbd block layer sysfs device is not linked to the rbd bus
6add9d
-	 * device that we interact with, so figure that out now.
6add9d
-	 */
6add9d
-	if (fstat(c->fd, &sb) != 0)
6add9d
-		goto free_ct;
6add9d
-
6add9d
-	udev = udev_new();
6add9d
-	if (!udev)
6add9d
-		goto free_ct;
6add9d
-
6add9d
-	block_dev = udev_device_new_from_devnum(udev, 'b', sb.st_rdev);
6add9d
-	if (!block_dev)
6add9d
-		goto free_udev;
6add9d
-
6add9d
-	block_name  = udev_device_get_sysname(block_dev);
6add9d
-	ret = sscanf(block_name, "rbd%d", &ct->rbd_bus_id);
6add9d
-
6add9d
-	udev_device_unref(block_dev);
6add9d
-	if (ret != 1)
6add9d
-		goto free_udev;
6add9d
-
6add9d
-	snprintf(sysfs_path, sizeof(sysfs_path), "/sys/bus/rbd/devices/%d",
6add9d
-		 ct->rbd_bus_id);
6add9d
-	bus_dev = udev_device_new_from_syspath(udev, sysfs_path);
6add9d
-	if (!bus_dev)
6add9d
-		goto free_udev;
6add9d
-
6add9d
-	addr = udev_device_get_sysattr_value(bus_dev, "client_addr");
6add9d
-	if (!addr) {
6add9d
-		condlog(0, "rbd%d: Could not find client_addr in rbd sysfs. "
6add9d
-			"Try updating kernel", ct->rbd_bus_id);
6add9d
-		goto free_dev;
6add9d
-	}
6add9d
-
6add9d
-	ct->client_addr = strdup(addr);
6add9d
-	if (!ct->client_addr)
6add9d
-		goto free_dev;
6add9d
-
6add9d
-	features_str = udev_device_get_sysattr_value(bus_dev, "features");
6add9d
-	if (!features_str)
6add9d
-		goto free_addr;
6add9d
-	features = strtoll(features_str, NULL, 16);
6add9d
-	if (!(features & RBD_FEATURE_EXCLUSIVE_LOCK)) {
6add9d
-		condlog(3, "rbd%d: Exclusive lock not set.", ct->rbd_bus_id);
6add9d
-		goto free_addr;
6add9d
-	}
6add9d
-
6add9d
-	config_info = udev_device_get_sysattr_value(bus_dev, "config_info");
6add9d
-	if (!config_info)
6add9d
-		goto free_addr;
6add9d
-
6add9d
-	if (!strstr(config_info, "noshare")) {
6add9d
-		condlog(3, "rbd%d: Only nonshared clients supported.",
6add9d
-			ct->rbd_bus_id);
6add9d
-		goto free_addr;
6add9d
-	}
6add9d
-
6add9d
-	if (strstr(config_info, "lock_on_read"))
6add9d
-		ct->lock_on_read = 1;
6add9d
-
6add9d
-	ct->config_info = strdup(config_info);
6add9d
-	if (!ct->config_info)
6add9d
-		goto free_addr;
6add9d
-
6add9d
-	username = strstr(config_info, "name=");
6add9d
-	if (username) {
6add9d
-		char *end;
6add9d
-		int len;
6add9d
-
6add9d
-		username += 5;
6add9d
-		end = strchr(username, ',');
6add9d
-		if (!end)
6add9d
-			goto free_info;
6add9d
-		len = end - username;
6add9d
-
6add9d
-		ct->username = malloc(len + 1);
6add9d
-		if (!ct->username)
6add9d
-			goto free_info;
6add9d
-		strncpy(ct->username, username, len);
6add9d
-		ct->username[len] = '\0';
6add9d
-	}
6add9d
-
6add9d
-	image = udev_device_get_sysattr_value(bus_dev, "name");
6add9d
-	if (!image)
6add9d
-		goto free_username;
6add9d
-
6add9d
-	ct->image = strdup(image);
6add9d
-	if (!ct->image)
6add9d
-		goto free_info;
6add9d
-
6add9d
-	pool = udev_device_get_sysattr_value(bus_dev, "pool");
6add9d
-	if (!pool)
6add9d
-		goto free_image;
6add9d
-
6add9d
-	ct->pool = strdup(pool);
6add9d
-	if (!ct->pool)
6add9d
-		goto free_image;
6add9d
-
6add9d
-	snap = udev_device_get_sysattr_value(bus_dev, "current_snap");
6add9d
-	if (!snap)
6add9d
-		goto free_pool;
6add9d
-
6add9d
-	if (strcmp("-", snap)) {
6add9d
-		ct->snap = strdup(snap);
6add9d
-		if (!ct->snap)
6add9d
-			goto free_pool;
6add9d
-	}
6add9d
-
6add9d
-	if (rados_create(&ct->cluster, NULL) < 0) {
6add9d
-		condlog(0, "rbd%d: Could not create rados cluster",
6add9d
-			ct->rbd_bus_id);
6add9d
-		goto free_snap;
6add9d
-	}
6add9d
-
6add9d
-	if (rados_conf_read_file(ct->cluster, NULL) < 0) {
6add9d
-		condlog(0, "rbd%d: Could not read rados conf", ct->rbd_bus_id);
6add9d
-		goto shutdown_rados;
6add9d
-	}
6add9d
-
6add9d
-	ret = rados_connect(ct->cluster);
6add9d
-	if (ret < 0) {
6add9d
-		condlog(0, "rbd%d: Could not connect to rados cluster",
6add9d
-			ct->rbd_bus_id);
6add9d
-		goto shutdown_rados;
6add9d
-	}
6add9d
-
6add9d
-	udev_device_unref(bus_dev);
6add9d
-	udev_unref(udev);
6add9d
-
6add9d
-	condlog(3, "rbd%d checker init %s %s/%s@%s %s", ct->rbd_bus_id,
6add9d
-		ct->client_addr, ct->pool, ct->image, ct->snap ? ct->snap : "-",
6add9d
-		ct->username ? ct->username : "none");
6add9d
-	return 0;
6add9d
-
6add9d
-shutdown_rados:
6add9d
-	rados_shutdown(ct->cluster);
6add9d
-free_snap:
6add9d
-	if (ct->snap)
6add9d
-		free(ct->snap);
6add9d
-free_pool:
6add9d
-	free(ct->pool);
6add9d
-free_image:
6add9d
-	free(ct->image);
6add9d
-free_username:
6add9d
-	if (ct->username)
6add9d
-		free(ct->username);
6add9d
-free_info:
6add9d
-	free(ct->config_info);
6add9d
-free_addr:
6add9d
-	free(ct->client_addr);
6add9d
-free_dev:
6add9d
-	udev_device_unref(bus_dev);
6add9d
-free_udev:
6add9d
-	udev_unref(udev);
6add9d
-free_ct:
6add9d
-	free(ct);
6add9d
-	return 1;
6add9d
-}
6add9d
-
6add9d
-void cleanup_context(struct rbd_checker_context *ct)
6add9d
-{
6add9d
-	pthread_mutex_destroy(&ct->lock);
6add9d
-	pthread_cond_destroy(&ct->active);
6add9d
-	pthread_spin_destroy(&ct->hldr_lock);
6add9d
-
6add9d
-	rados_shutdown(ct->cluster);
6add9d
-
6add9d
-	if (ct->username)
6add9d
-		free(ct->username);
6add9d
-	if (ct->snap)
6add9d
-		free(ct->snap);
6add9d
-	free(ct->pool);
6add9d
-	free(ct->image);
6add9d
-	free(ct->config_info);
6add9d
-	free(ct->client_addr);
6add9d
-	free(ct);
6add9d
-}
6add9d
-
6add9d
-void libcheck_free(struct checker * c)
6add9d
-{
6add9d
-	if (c->context) {
6add9d
-		struct rbd_checker_context *ct = c->context;
6add9d
-		int holders;
6add9d
-		pthread_t thread;
6add9d
-
6add9d
-		pthread_spin_lock(&ct->hldr_lock);
6add9d
-		ct->holders--;
6add9d
-		holders = ct->holders;
6add9d
-		thread = ct->thread;
6add9d
-		pthread_spin_unlock(&ct->hldr_lock);
6add9d
-		if (holders)
6add9d
-			pthread_cancel(thread);
6add9d
-		else
6add9d
-			cleanup_context(ct);
6add9d
-		c->context = NULL;
6add9d
-	}
6add9d
-}
6add9d
-
6add9d
-static int rbd_is_blacklisted(struct rbd_checker_context *ct, char *msg)
6add9d
-{
6add9d
-	char *addr_tok, *start, *save;
6add9d
-	char *cmd[2];
6add9d
-	char *blklist, *stat;
6add9d
-	size_t blklist_len, stat_len;
6add9d
-	int ret;
6add9d
-	char *end;
6add9d
-
6add9d
-	cmd[0] = "{\"prefix\": \"osd blacklist ls\"}";
6add9d
-	cmd[1] = NULL;
6add9d
-
6add9d
-	ret = rados_mon_command(ct->cluster, (const char **)cmd, 1, "", 0,
6add9d
-				&blklist, &blklist_len, &stat, &stat_len);
6add9d
-	if (ret < 0) {
6add9d
-		RBD_MSG(msg, "checker failed: mon command failed %d", ret);
6add9d
-		return ret;
6add9d
-	}
6add9d
-
6add9d
-	if (!blklist || !blklist_len)
6add9d
-		goto free_bufs;
6add9d
-
6add9d
-	/*
6add9d
-	 * parse list of addrs with the format
6add9d
-	 * ipv4:port/nonce date time\n
6add9d
-	 * or
6add9d
-	 * [ipv6]:port/nonce date time\n
6add9d
-	 */
6add9d
-	ret = 0;
6add9d
-	for (start = blklist; ; start = NULL) {
6add9d
-		addr_tok = strtok_r(start, "\n", &save);
6add9d
-		if (!addr_tok || !strlen(addr_tok))
6add9d
-			break;
6add9d
-
6add9d
-		end = strchr(addr_tok, ' ');
6add9d
-		if (!end) {
6add9d
-			RBD_MSG(msg, "checker failed: invalid blacklist %s",
6add9d
-				 addr_tok);
6add9d
-			break;
6add9d
-		}
6add9d
-		*end = '\0';
6add9d
-
6add9d
-		if (!strcmp(addr_tok, ct->client_addr)) {
6add9d
-			ct->blacklisted = 1;
6add9d
-			RBD_MSG(msg, "%s is blacklisted", ct->client_addr);
6add9d
-			ret = 1;
6add9d
-			break;
6add9d
-		}
6add9d
-	}
6add9d
-
6add9d
-free_bufs:
6add9d
-	rados_buffer_free(blklist);
6add9d
-	rados_buffer_free(stat);
6add9d
-	return ret;
6add9d
-}
6add9d
-
6add9d
-int rbd_check(struct rbd_checker_context *ct, char *msg)
6add9d
-{
6add9d
-	if (ct->blacklisted || rbd_is_blacklisted(ct, msg) == 1)
6add9d
-		return PATH_DOWN;
6add9d
-
6add9d
-	RBD_MSG(msg, "checker reports path is up");
6add9d
-	/*
6add9d
-	 * Path may have issues, but the ceph cluster is at least
6add9d
-	 * accepting IO, so we can attempt to do IO.
6add9d
-	 *
6add9d
-	 * TODO: in future versions, we can run other tests to
6add9d
-	 * verify OSDs and networks.
6add9d
-	 */
6add9d
-	return PATH_UP;
6add9d
-}
6add9d
-
6add9d
-static int sysfs_write_rbd_bus(const char *which, const char *buf,
6add9d
-			       size_t buf_len)
6add9d
-{
6add9d
-	char sysfs_path[PATH_SIZE];
6add9d
-	int fd;
6add9d
-	int r;
6add9d
-
6add9d
-	/* we require newer kernels so single_major should alwayws be there */
6add9d
-	snprintf(sysfs_path, sizeof(sysfs_path),
6add9d
-		 "/sys/bus/rbd/%s_single_major", which);
6add9d
-	fd = open(sysfs_path, O_WRONLY);
6add9d
-	if (fd < 0)
6add9d
-		return -errno;
6add9d
-
6add9d
-	r = safe_write(fd, buf, buf_len);
6add9d
-	close(fd);
6add9d
-	return r;
6add9d
-}
6add9d
-
6add9d
-static int rbd_remap(struct rbd_checker_context *ct)
6add9d
-{
6add9d
-	char *argv[11];
6add9d
-	pid_t pid;
6add9d
-	int ret = 0, i = 0;
6add9d
-	int status;
6add9d
-
6add9d
-	pid = fork();
6add9d
-	switch (pid) {
6add9d
-	case 0:
6add9d
-		argv[i++] = "rbd";
6add9d
-		argv[i++] = "map";
6add9d
-		if (ct->lock_on_read)
6add9d
-			argv[i++] = "-o noshare,lock_on_read";
6add9d
-		else
6add9d
-			argv[i++] = "-o noshare";
6add9d
-		if (ct->username) {
6add9d
-			argv[i++] = "--id";
6add9d
-			argv[i++] = ct->username;
6add9d
-		}
6add9d
-		argv[i++] = "--pool";
6add9d
-		argv[i++] = ct->pool;
6add9d
-		if (ct->snap) {
6add9d
-			argv[i++] = "--snap";
6add9d
-			argv[i++] = ct->snap;
6add9d
-		}
6add9d
-		argv[i++] = ct->image;
6add9d
-		argv[i] = NULL;
6add9d
-
6add9d
-		ret = execvp(argv[0], argv);
6add9d
-		condlog(0, "rbd%d: Error executing rbd: %s", ct->rbd_bus_id,
6add9d
-			strerror(errno));
6add9d
-		exit(-1);
6add9d
-	case -1:
6add9d
-		condlog(0, "rbd%d: fork failed: %s", ct->rbd_bus_id,
6add9d
-			strerror(errno));
6add9d
-		return -1;
6add9d
-	default:
6add9d
-		ret = -1;
6add9d
-		wait(&status);
6add9d
-		if (WIFEXITED(status)) {
6add9d
-			status = WEXITSTATUS(status);
6add9d
-			if (status == 0)
6add9d
-				ret = 0;
6add9d
-			else
6add9d
-				condlog(0, "rbd%d: failed with %d",
6add9d
-					ct->rbd_bus_id, status);
6add9d
-		}
6add9d
-	}
6add9d
-
6add9d
-	return ret;
6add9d
-}
6add9d
-
6add9d
-static int sysfs_write_rbd_remove(const char *buf, int buf_len)
6add9d
-{
6add9d
-	return sysfs_write_rbd_bus("remove", buf, buf_len);
6add9d
-}
6add9d
-
6add9d
-static int rbd_rm_blacklist(struct rbd_checker_context *ct)
6add9d
-{
6add9d
-	char *cmd[2];
6add9d
-	char *stat, *cmd_str;
6add9d
-	size_t stat_len;
6add9d
-	int ret;
6add9d
-
6add9d
-	ret = asprintf(&cmd_str, "{\"prefix\": \"osd blacklist\", \"blacklistop\": \"rm\", \"addr\": \"%s\"}",
6add9d
-		       ct->client_addr);
6add9d
-	if (ret == -1)
6add9d
-		return -ENOMEM;
6add9d
-
6add9d
-	cmd[0] = cmd_str;
6add9d
-	cmd[1] = NULL;
6add9d
-
6add9d
-	ret = rados_mon_command(ct->cluster, (const char **)cmd, 1, "", 0,
6add9d
-				NULL, 0, &stat, &stat_len);
6add9d
-	if (ret < 0) {
6add9d
-		condlog(1, "rbd%d: repair failed to remove blacklist for %s %d",
6add9d
-			ct->rbd_bus_id, ct->client_addr, ret);
6add9d
-		goto free_cmd;
6add9d
-	}
6add9d
-
6add9d
-	condlog(1, "rbd%d: repair rm blacklist for %s",
6add9d
-	       ct->rbd_bus_id, ct->client_addr);
6add9d
-	free(stat);
6add9d
-free_cmd:
6add9d
-	free(cmd_str);
6add9d
-	return ret;
6add9d
-}
6add9d
-
6add9d
-static int rbd_repair(struct rbd_checker_context *ct, char *msg)
6add9d
-{
6add9d
-	char del[17];
6add9d
-	int ret;
6add9d
-
6add9d
-	if (!ct->blacklisted)
6add9d
-		return PATH_UP;
6add9d
-
6add9d
-	if (!ct->remapped) {
6add9d
-		ret = rbd_remap(ct);
6add9d
-		if (ret) {
6add9d
-			RBD_MSG(msg, "repair failed to remap. Err %d", ret);
6add9d
-			return PATH_DOWN;
6add9d
-		}
6add9d
-	}
6add9d
-	ct->remapped = 1;
6add9d
-
6add9d
-	snprintf(del, sizeof(del), "%d force", ct->rbd_bus_id);
6add9d
-	ret = sysfs_write_rbd_remove(del, strlen(del) + 1);
6add9d
-	if (ret) {
6add9d
-		RBD_MSG(msg, "repair failed to clean up. Err %d", ret);
6add9d
-		return PATH_DOWN;
6add9d
-	}
6add9d
-
6add9d
-	ret = rbd_rm_blacklist(ct);
6add9d
-	if (ret) {
6add9d
-		RBD_MSG(msg, "repair could not remove blacklist entry. Err %d",
6add9d
-			ret);
6add9d
-		return PATH_DOWN;
6add9d
-	}
6add9d
-
6add9d
-	ct->remapped = 0;
6add9d
-	ct->blacklisted = 0;
6add9d
-
6add9d
-	RBD_MSG(msg, "has been repaired");
6add9d
-	return PATH_UP;
6add9d
-}
6add9d
-
6add9d
-#define rbd_thread_cleanup_push(ct) pthread_cleanup_push(cleanup_func, ct)
6add9d
-#define rbd_thread_cleanup_pop(ct) pthread_cleanup_pop(1)
6add9d
-
6add9d
-void cleanup_func(void *data)
6add9d
-{
6add9d
-	int holders;
6add9d
-	struct rbd_checker_context *ct = data;
6add9d
-	pthread_spin_lock(&ct->hldr_lock);
6add9d
-	ct->holders--;
6add9d
-	holders = ct->holders;
6add9d
-	ct->thread = 0;
6add9d
-	pthread_spin_unlock(&ct->hldr_lock);
6add9d
-	if (!holders)
6add9d
-		cleanup_context(ct);
6add9d
-}
6add9d
-
6add9d
-void *rbd_thread(void *ctx)
6add9d
-{
6add9d
-	struct rbd_checker_context *ct = ctx;
6add9d
-	int state;
6add9d
-
6add9d
-	condlog(3, "rbd%d: thread starting up", ct->rbd_bus_id);
6add9d
-
6add9d
-	ct->message[0] = '\0';
6add9d
-	/* This thread can be canceled, so setup clean up */
6add9d
-	rbd_thread_cleanup_push(ct)
6add9d
-
6add9d
-	/* checker start up */
6add9d
-	pthread_mutex_lock(&ct->lock);
6add9d
-	ct->state = PATH_PENDING;
6add9d
-	pthread_mutex_unlock(&ct->lock);
6add9d
-
6add9d
-	state = ct->fn(ct, ct->message);
6add9d
-
6add9d
-	/* checker done */
6add9d
-	pthread_mutex_lock(&ct->lock);
6add9d
-	ct->state = state;
6add9d
-	pthread_mutex_unlock(&ct->lock);
6add9d
-	pthread_cond_signal(&ct->active);
6add9d
-
6add9d
-	condlog(3, "rbd%d: thead finished, state %s", ct->rbd_bus_id,
6add9d
-		checker_state_name(state));
6add9d
-	rbd_thread_cleanup_pop(ct);
6add9d
-	return ((void *)0);
6add9d
-}
6add9d
-
6add9d
-static void rbd_timeout(struct timespec *tsp)
6add9d
-{
6add9d
-	struct timeval now;
6add9d
-
6add9d
-	gettimeofday(&now, NULL);
6add9d
-	tsp->tv_sec = now.tv_sec;
6add9d
-	tsp->tv_nsec = now.tv_usec * 1000;
6add9d
-	tsp->tv_nsec += 1000000; /* 1 millisecond */
6add9d
-}
6add9d
-
6add9d
-static int rbd_exec_fn(struct checker *c, thread_fn *fn)
6add9d
-{
6add9d
-	struct rbd_checker_context *ct = c->context;
6add9d
-	struct timespec tsp;
6add9d
-	pthread_attr_t attr;
6add9d
-	int rbd_status, r;
6add9d
-
6add9d
-	if (c->sync)
6add9d
-		return fn(ct, c->message);
6add9d
-	/*
6add9d
-	 * Async mode
6add9d
-	 */
6add9d
-	r = pthread_mutex_lock(&ct->lock);
6add9d
-	if (r != 0) {
6add9d
-		condlog(2, "rbd%d: mutex lock failed with %d", ct->rbd_bus_id,
6add9d
-			r);
6add9d
-		MSG(c, "rbd%d: thread failed to initialize", ct->rbd_bus_id);
6add9d
-		return PATH_WILD;
6add9d
-	}
6add9d
-
6add9d
-	if (ct->running) {
6add9d
-		/* Check if checker is still running */
6add9d
-		if (ct->thread) {
6add9d
-			condlog(3, "rbd%d: thread not finished",
6add9d
-				ct->rbd_bus_id);
6add9d
-			rbd_status = PATH_PENDING;
6add9d
-		} else {
6add9d
-			/* checker done */
6add9d
-			ct->running = 0;
6add9d
-			rbd_status = ct->state;
6add9d
-			strncpy(c->message, ct->message, CHECKER_MSG_LEN);
6add9d
-			c->message[CHECKER_MSG_LEN - 1] = '\0';
6add9d
-		}
6add9d
-		pthread_mutex_unlock(&ct->lock);
6add9d
-	} else {
6add9d
-		/* Start new checker */
6add9d
-		ct->state = PATH_UNCHECKED;
6add9d
-		ct->fn = fn;
6add9d
-		pthread_spin_lock(&ct->hldr_lock);
6add9d
-		ct->holders++;
6add9d
-		pthread_spin_unlock(&ct->hldr_lock);
6add9d
-		setup_thread_attr(&attr, 32 * 1024, 1);
6add9d
-		r = pthread_create(&ct->thread, &attr, rbd_thread, ct);
6add9d
-		if (r) {
6add9d
-			pthread_mutex_unlock(&ct->lock);
6add9d
-			ct->thread = 0;
6add9d
-			ct->holders--;
6add9d
-			condlog(3, "rbd%d failed to start rbd thread, using sync mode",
6add9d
-				ct->rbd_bus_id);
6add9d
-			return fn(ct, c->message);
6add9d
-		}
6add9d
-		pthread_attr_destroy(&attr);
6add9d
-		rbd_timeout(&tsp;;
6add9d
-		r = pthread_cond_timedwait(&ct->active, &ct->lock, &tsp;;
6add9d
-		rbd_status = ct->state;
6add9d
-		strncpy(c->message, ct->message,CHECKER_MSG_LEN);
6add9d
-		c->message[CHECKER_MSG_LEN -1] = '\0';
6add9d
-		pthread_mutex_unlock(&ct->lock);
6add9d
-
6add9d
-		if (ct->thread &&
6add9d
-		    (rbd_status == PATH_PENDING || rbd_status == PATH_UNCHECKED)) {
6add9d
-			condlog(3, "rbd%d: thread still running",
6add9d
-				ct->rbd_bus_id);
6add9d
-			ct->running = 1;
6add9d
-			rbd_status = PATH_PENDING;
6add9d
-		}
6add9d
-	}
6add9d
-
6add9d
-	return rbd_status;
6add9d
-}
6add9d
-
6add9d
-void libcheck_repair(struct checker * c)
6add9d
-{
6add9d
-	struct rbd_checker_context *ct = c->context;
6add9d
-
6add9d
-	if (!ct || !ct->blacklisted)
6add9d
-		return;
6add9d
-	rbd_exec_fn(c, rbd_repair);
6add9d
-}
6add9d
-
6add9d
-int libcheck_check(struct checker * c)
6add9d
-{
6add9d
-	struct rbd_checker_context *ct = c->context;
6add9d
-
6add9d
-	if (!ct)
6add9d
-		return PATH_UNCHECKED;
6add9d
-
6add9d
-	if (ct->blacklisted)
6add9d
-		return PATH_DOWN;
6add9d
-
6add9d
-	return rbd_exec_fn(c, rbd_check);
6add9d
-}
6add9d
Index: multipath-tools-130222/multipathd/main.c
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/multipathd/main.c
6add9d
+++ multipath-tools-130222/multipathd/main.c
6add9d
@@ -1291,16 +1291,6 @@ int update_path_groups(struct multipath
6add9d
 	return 0;
6add9d
 }
6add9d
 
6add9d
-void repair_path(struct path * pp)
6add9d
-{
6add9d
-	if (pp->state != PATH_DOWN)
6add9d
-		return;
6add9d
-
6add9d
-	checker_repair(&pp->checker);
6add9d
-	if (strlen(checker_message(&pp->checker)))
6add9d
-		LOG_MSG(1, checker_message(&pp->checker));
6add9d
-}
6add9d
-
6add9d
 void
6add9d
 check_path (struct vectors * vecs, struct path * pp)
6add9d
 {
6add9d
@@ -1421,7 +1411,6 @@ check_path (struct vectors * vecs, struc
6add9d
 			pp->mpp->failback_tick = 0;
6add9d
 
6add9d
 			pp->mpp->stat_path_failures++;
6add9d
-			repair_path(pp);
6add9d
 			return;
6add9d
 		}
6add9d
 
6add9d
@@ -1501,7 +1490,7 @@ check_path (struct vectors * vecs, struc
6add9d
 	}
6add9d
 
6add9d
 	pp->state = newstate;
6add9d
-	repair_path(pp);
6add9d
+
6add9d
 
6add9d
 	if (pp->mpp->wait_for_udev)
6add9d
 		return;
6add9d
Index: multipath-tools-130222/libmultipath/checkers.c
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/checkers.c
6add9d
+++ multipath-tools-130222/libmultipath/checkers.c
6add9d
@@ -139,13 +139,6 @@ struct checker * add_checker (char * nam
6add9d
 	if (!c->free)
6add9d
 		goto out;
6add9d
 
6add9d
-	c->repair = (void (*)(struct checker *)) dlsym(c->handle,
6add9d
-						       "libcheck_repair");
6add9d
-	errstr = dlerror();
6add9d
-	if (errstr != NULL)
6add9d
-		condlog(0, "A dynamic linking error occurred: (%s)", errstr);
6add9d
-	if (!c->repair)
6add9d
-		goto out;
6add9d
 done:
6add9d
 	c->fd = 0;
6add9d
 	c->sync = 1;
6add9d
@@ -214,21 +207,6 @@ void checker_put (struct checker * dst)
6add9d
 	free_checker(src);
6add9d
 }
6add9d
 
6add9d
-void checker_repair (struct checker * c)
6add9d
-{
6add9d
-	if (!c || !checker_selected(c))
6add9d
-		return;
6add9d
-
6add9d
-	c->message[0] = '\0';
6add9d
-	if (c->disable) {
6add9d
-		MSG(c, "checker disabled");
6add9d
-		return;
6add9d
-	}
6add9d
-
6add9d
-	if (c->repair)
6add9d
-		c->repair(c);
6add9d
-}
6add9d
-
6add9d
 int checker_check (struct checker * c, int path_state)
6add9d
 {
6add9d
 	int r;
6add9d
@@ -297,7 +275,6 @@ void checker_get (struct checker * dst,
6add9d
 	dst->sync = src->sync;
6add9d
 	strncpy(dst->name, src->name, CHECKER_NAME_LEN);
6add9d
 	strncpy(dst->message, src->message, CHECKER_MSG_LEN);
6add9d
-	dst->repair = src->repair;
6add9d
 	dst->check = src->check;
6add9d
 	dst->init = src->init;
6add9d
 	dst->free = src->free;
6add9d
Index: multipath-tools-130222/libmultipath/hwtable.c
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/hwtable.c
6add9d
+++ multipath-tools-130222/libmultipath/hwtable.c
6add9d
@@ -1171,20 +1171,6 @@ static struct hwentry default_hw[] = {
6add9d
 		.checker_name  = TUR,
6add9d
 		.dev_loss      = 30,
6add9d
 	},
6add9d
-	{
6add9d
-	/*
6add9d
-	 * Red Hat
6add9d
-	 *
6add9d
-	 * Maintainer: Mike Christie
6add9d
-	 * Mail: mchristi@redhat.com
6add9d
-	 */
6add9d
-		.vendor        = "Ceph",
6add9d
-		.product       = "RBD",
6add9d
-		.pgpolicy      = FAILOVER,
6add9d
-		.no_path_retry = NO_PATH_RETRY_FAIL,
6add9d
-		.checker_name  = RBD,
6add9d
-		.deferred_remove = DEFERRED_REMOVE_ON,
6add9d
-	},
6add9d
 	/*
6add9d
 	 *  Generic NVMe devices
6add9d
 	 */
6add9d
Index: multipath-tools-130222/libmultipath/checkers/Makefile
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/checkers/Makefile
6add9d
+++ multipath-tools-130222/libmultipath/checkers/Makefile
6add9d
@@ -14,17 +14,10 @@ LIBS= \
6add9d
 	libcheckhp_sw.so \
6add9d
 	libcheckrdac.so
6add9d
 
6add9d
-ifeq ($(shell test -r /usr/include/rados/librados.h && echo 1),1)
6add9d
-LIBS += libcheckrbd.so
6add9d
-endif
6add9d
-
6add9d
 CFLAGS += -fPIC -I..
6add9d
 
6add9d
 all: $(LIBS)
6add9d
 
6add9d
-libcheckrbd.so: rbd.o
6add9d
-	$(CC) $(LDFLAGS) $(SHARED_FLAGS) -o $@ $^ -lrados -ludev
6add9d
-
6add9d
 libcheckdirectio.so: libsg.o directio.o
6add9d
 	$(CC) $(LDFLAGS) $(SHARED_FLAGS) -o $@ $^ -laio
6add9d
 
6add9d
Index: multipath-tools-130222/multipath.conf.annotated
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/multipath.conf.annotated
6add9d
+++ multipath-tools-130222/multipath.conf.annotated
6add9d
@@ -97,7 +97,7 @@
6add9d
 #	# scope   : multipath & multipathd
6add9d
 #	# desc    : the default method used to determine the paths' state
6add9d
 #	# values  : readsector0|tur|emc_clariion|hp_sw|directio|rdac|
6add9d
-#	            cciss_tur|hp_tur|rbd
6add9d
+#	            cciss_tur|hp_tur
6add9d
 #	# default : directio
6add9d
 #	#
6add9d
 #	path_checker	directio
6add9d
@@ -493,7 +493,7 @@
6add9d
 #		# scope   : multipathd & multipathd
6add9d
 #		# desc    : path checking algorithm to use to check path state
6add9d
 #		# values  : readsector0|tur|emc_clariion|hp_sw|directio|rdac|
6add9d
-#		#           cciss_tur|hp_tur|rbd
6add9d
+#		#           cciss_tur|hp_tur
6add9d
 #		#
6add9d
 #		path_checker		directio
6add9d
 #
6add9d
Index: multipath-tools-130222/multipath/multipath.conf.5
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/multipath/multipath.conf.5
6add9d
+++ multipath-tools-130222/multipath/multipath.conf.5
6add9d
@@ -287,9 +287,6 @@ Read the first sector with direct I/O.
6add9d
 .B none
6add9d
 Do not check the device, fallback to use the values retrieved from sysfs
6add9d
 .TP
6add9d
-.B rbd
6add9d
-Check if the path is in the Ceph blacklist.
6add9d
-.TP
6add9d
 Default value is \fIdirectio\fR.
6add9d
 .RE
6add9d
 .TP
6add9d
Index: multipath-tools-130222/libmultipath/checkers.h
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/checkers.h
6add9d
+++ multipath-tools-130222/libmultipath/checkers.h
6add9d
@@ -76,7 +76,6 @@ enum path_check_state {
6add9d
 #define READSECTOR0  "readsector0"
6add9d
 #define CCISS_TUR    "cciss_tur"
6add9d
 #define NONE         "none"
6add9d
-#define RBD          "rbd"
6add9d
 
6add9d
 #define DEFAULT_CHECKER DIRECTIO
6add9d
 
6add9d
@@ -107,9 +106,6 @@ struct checker {
6add9d
 						multipath-wide. Use MALLOC if
6add9d
 						you want to stuff data in. */
6add9d
 	int (*check)(struct checker *);
6add9d
-	void (*repair)(struct checker *);     /* called if check returns
6add9d
-					        PATH_DOWN to bring path into
6add9d
-						usable state */
6add9d
 	int (*init)(struct checker *);       /* to allocate the context */
6add9d
 	void (*free)(struct checker *);      /* to free the context */
6add9d
 };
6add9d
@@ -129,7 +125,6 @@ void checker_set_async (struct checker *
6add9d
 void checker_set_fd (struct checker *, int);
6add9d
 void checker_enable (struct checker *);
6add9d
 void checker_disable (struct checker *);
6add9d
-void checker_repair (struct checker *);
6add9d
 int checker_check (struct checker *, int);
6add9d
 int checker_selected (struct checker *);
6add9d
 char * checker_name (struct checker *);
6add9d
Index: multipath-tools-130222/libmultipath/checkers/cciss_tur.c
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/checkers/cciss_tur.c
6add9d
+++ multipath-tools-130222/libmultipath/checkers/cciss_tur.c
6add9d
@@ -63,11 +63,6 @@ void libcheck_free (struct checker * c)
6add9d
 	return;
6add9d
 }
6add9d
 
6add9d
-void libcheck_repair (struct checker * c)
6add9d
-{
6add9d
-	return;
6add9d
-}
6add9d
-
6add9d
 extern int
6add9d
 libcheck_check (struct checker * c)
6add9d
 {
6add9d
Index: multipath-tools-130222/libmultipath/checkers/directio.c
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/checkers/directio.c
6add9d
+++ multipath-tools-130222/libmultipath/checkers/directio.c
6add9d
@@ -116,11 +116,6 @@ void libcheck_free (struct checker * c)
6add9d
 	free(ct);
6add9d
 }
6add9d
 
6add9d
-void libcheck_repair (struct checker * c)
6add9d
-{
6add9d
-	return;
6add9d
-}
6add9d
-
6add9d
 static int
6add9d
 check_state(int fd, struct directio_context *ct, int sync, int timeout_secs)
6add9d
 {
6add9d
Index: multipath-tools-130222/libmultipath/checkers/emc_clariion.c
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/checkers/emc_clariion.c
6add9d
+++ multipath-tools-130222/libmultipath/checkers/emc_clariion.c
6add9d
@@ -90,11 +90,6 @@ void libcheck_free (struct checker * c)
6add9d
 	free(c->context);
6add9d
 }
6add9d
 
6add9d
-void libcheck_repair (struct checker * c)
6add9d
-{
6add9d
-	return;
6add9d
-}
6add9d
-
6add9d
 int libcheck_check (struct checker * c)
6add9d
 {
6add9d
 	unsigned char sense_buffer[128] = { 0, };
6add9d
Index: multipath-tools-130222/libmultipath/checkers/hp_sw.c
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/checkers/hp_sw.c
6add9d
+++ multipath-tools-130222/libmultipath/checkers/hp_sw.c
6add9d
@@ -44,11 +44,6 @@ void libcheck_free (struct checker * c)
6add9d
 	return;
6add9d
 }
6add9d
 
6add9d
-void libcheck_repair (struct checker * c)
6add9d
-{
6add9d
-	return;
6add9d
-}
6add9d
-
6add9d
 static int
6add9d
 do_inq(int sg_fd, int cmddt, int evpd, unsigned int pg_op,
6add9d
        void *resp, int mx_resp_len, int noisy, unsigned int timeout)
6add9d
Index: multipath-tools-130222/libmultipath/checkers/rdac.c
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/checkers/rdac.c
6add9d
+++ multipath-tools-130222/libmultipath/checkers/rdac.c
6add9d
@@ -139,11 +139,6 @@ void libcheck_free (struct checker * c)
6add9d
 	return;
6add9d
 }
6add9d
 
6add9d
-void libcheck_repair (struct checker * c)
6add9d
-{
6add9d
-	return;
6add9d
-}
6add9d
-
6add9d
 static int
6add9d
 do_inq(int sg_fd, unsigned int pg_op, void *resp, int mx_resp_len,
6add9d
        unsigned int timeout)
6add9d
Index: multipath-tools-130222/libmultipath/checkers/readsector0.c
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/checkers/readsector0.c
6add9d
+++ multipath-tools-130222/libmultipath/checkers/readsector0.c
6add9d
@@ -23,11 +23,6 @@ void libcheck_free (struct checker * c)
6add9d
 	return;
6add9d
 }
6add9d
 
6add9d
-void libcheck_repair (struct checker * c)
6add9d
-{
6add9d
-	return;
6add9d
-}
6add9d
-
6add9d
 int libcheck_check (struct checker * c)
6add9d
 {
6add9d
 	unsigned char buf[4096];
6add9d
Index: multipath-tools-130222/libmultipath/checkers/tur.c
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/checkers/tur.c
6add9d
+++ multipath-tools-130222/libmultipath/checkers/tur.c
6add9d
@@ -187,11 +187,6 @@ void libcheck_free (struct checker * c)
6add9d
 	return;
6add9d
 }
6add9d
 
6add9d
-void libcheck_repair (struct checker * c)
6add9d
-{
6add9d
-	return;
6add9d
-}
6add9d
-
6add9d
 #define TUR_MSG(msg, fmt, args...) snprintf(msg, CHECKER_MSG_LEN, fmt, ##args);
6add9d
 
6add9d
 int
6add9d
Index: multipath-tools-130222/libmultipath/discovery.c
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/discovery.c
6add9d
+++ multipath-tools-130222/libmultipath/discovery.c
6add9d
@@ -922,21 +922,6 @@ nvme_sysfs_pathinfo (struct path * pp)
6add9d
 }
6add9d
 
6add9d
 static int
6add9d
-rbd_sysfs_pathinfo (struct path * pp)
6add9d
-{
6add9d
-	sprintf(pp->vendor_id, "Ceph");
6add9d
-	sprintf(pp->product_id, "RBD");
6add9d
-
6add9d
-	condlog(3, "%s: vendor = %s product = %s", pp->dev, pp->vendor_id,
6add9d
-		pp->product_id);
6add9d
-	/*
6add9d
-	 * set the hwe configlet pointer
6add9d
-	 */
6add9d
-	pp->hwe = find_hwe(conf->hwtable, pp->vendor_id, pp->product_id, NULL);
6add9d
-	return 0;
6add9d
-}
6add9d
-
6add9d
-static int
6add9d
 ccw_sysfs_pathinfo (struct path * pp)
6add9d
 {
6add9d
 	struct udev_device *parent;
6add9d
@@ -1151,8 +1136,6 @@ sysfs_pathinfo(struct path * pp)
6add9d
 		pp->bus = SYSFS_BUS_CCW;
6add9d
 	if (!strncmp(pp->dev,"sd", 2))
6add9d
 		pp->bus = SYSFS_BUS_SCSI;
6add9d
-	if (!strncmp(pp->dev,"rbd", 3))
6add9d
-		pp->bus = SYSFS_BUS_RBD;
6add9d
 	if (!strncmp(pp->dev,"nvme", 4))
6add9d
 		pp->bus = SYSFS_BUS_NVME;
6add9d
 
6add9d
@@ -1167,9 +1150,6 @@ sysfs_pathinfo(struct path * pp)
6add9d
 	} else if (pp->bus == SYSFS_BUS_CCISS) {
6add9d
 		if (cciss_sysfs_pathinfo(pp))
6add9d
 			return 1;
6add9d
-	} else if (pp->bus == SYSFS_BUS_RBD) {
6add9d
-		if (rbd_sysfs_pathinfo(pp))
6add9d
-			return 1;
6add9d
 	} else if (pp->bus == SYSFS_BUS_NVME) {
6add9d
 		if (nvme_sysfs_pathinfo(pp))
6add9d
 			return 1;
6add9d
@@ -1275,55 +1255,6 @@ get_prio (struct path * pp)
6add9d
 	return 0;
6add9d
 }
6add9d
 
6add9d
-static int
6add9d
-get_rbd_uid(struct path * pp)
6add9d
-{
6add9d
-	struct udev_device *rbd_bus_dev;
6add9d
-	int ret, rbd_bus_id;
6add9d
-	const char *pool, *image, *snap;
6add9d
-	char sysfs_path[PATH_SIZE];
6add9d
-	uint64_t snap_id, max_snap_id = -3;
6add9d
-
6add9d
-	ret = sscanf(pp->dev, "rbd%d", &rbd_bus_id);
6add9d
-	if (ret != 1)
6add9d
-		return -EINVAL;
6add9d
-
6add9d
-	snprintf(sysfs_path, sizeof(sysfs_path), "/sys/bus/rbd/devices/%d",
6add9d
-		 rbd_bus_id);
6add9d
-	rbd_bus_dev = udev_device_new_from_syspath(conf->udev, sysfs_path);
6add9d
-	if (!rbd_bus_dev)
6add9d
-		return -ENODEV;
6add9d
-
6add9d
-	ret = -EINVAL;
6add9d
-	pool = udev_device_get_sysattr_value(rbd_bus_dev, "pool_id");
6add9d
-	if (!pool)
6add9d
-		goto free_dev;
6add9d
-
6add9d
-	image = udev_device_get_sysattr_value(rbd_bus_dev, "image_id");
6add9d
-	if (!image)
6add9d
-		goto free_dev;
6add9d
-
6add9d
-	snap = udev_device_get_sysattr_value(rbd_bus_dev, "snap_id");
6add9d
-	if (!snap)
6add9d
-		goto free_dev;
6add9d
-	snap_id = strtoull(snap, NULL, 19);
6add9d
-	if (snap_id >= max_snap_id)
6add9d
-		ret = snprintf(pp->wwid, WWID_SIZE, "%s-%s", pool, image);
6add9d
-	else
6add9d
-		ret = snprintf(pp->wwid, WWID_SIZE, "%s-%s-%s", pool,
6add9d
-			       image, snap);
6add9d
-	if (ret < WWID_SIZE) {
6add9d
-		ret = 0;
6add9d
-	} else {
6add9d
-		condlog(0, "%s: wwid overflow", pp->dev);
6add9d
-		ret = -EOVERFLOW;
6add9d
-	}
6add9d
-
6add9d
-free_dev:
6add9d
-	udev_device_unref(rbd_bus_dev);	
6add9d
-	return ret;
6add9d
-}
6add9d
-
6add9d
 /*
6add9d
  * Mangle string of length *len starting at start
6add9d
  * by removing character sequence "00" (hex for a 0 byte),
6add9d
@@ -1405,7 +1336,6 @@ get_uid (struct path * pp, struct udev_d
6add9d
 {
6add9d
 	char *c;
6add9d
 	const char *value;
6add9d
-	int ret;
6add9d
 
6add9d
 	if (!pp->uid_attribute)
6add9d
 		select_getuid(pp);
6add9d
@@ -1416,34 +1346,22 @@ get_uid (struct path * pp, struct udev_d
6add9d
 	}
6add9d
 
6add9d
 	memset(pp->wwid, 0, WWID_SIZE);
6add9d
-	if (pp->bus == SYSFS_BUS_RBD) {
6add9d
-		ret = get_rbd_uid(pp);
6add9d
-		if (ret) {
6add9d
-			condlog(1, "%s: failed to get sysfs uid: %s",
6add9d
-				pp->dev, strerror(-ret));
6add9d
-			pp->missing_udev_info = INFO_MISSING;
6add9d
-			pp->tick = conf->retrigger_delay;
6add9d
-		}
6add9d
+	value = udev_device_get_property_value(udev, pp->uid_attribute);
6add9d
+	if ((!value || strlen(value) == 0) && conf->cmd == CMD_VALID_PATH)
6add9d
+		value = getenv(pp->uid_attribute);
6add9d
+	if (value && strlen(value)) {
6add9d
+		size_t len = strlcpy(pp->wwid, value, WWID_SIZE);
6add9d
+		if (len > WWID_SIZE &&
6add9d
+		    !fix_broken_nvme_wwid(pp, value, WWID_SIZE))
6add9d
+			condlog(0, "%s: wwid overflow", pp->dev);
6add9d
+		condlog(4, "%s: got wwid of '%s'", pp->dev, pp->wwid);
6add9d
+		pp->missing_udev_info = INFO_OK;
6add9d
+		pp->tick = 0;
6add9d
 	} else {
6add9d
-		value = udev_device_get_property_value(udev,
6add9d
-						       pp->uid_attribute);
6add9d
-		if ((!value || strlen(value) == 0) &&
6add9d
-		     conf->cmd == CMD_VALID_PATH)
6add9d
-			value = getenv(pp->uid_attribute);
6add9d
-		if (value && strlen(value)) {
6add9d
-			size_t len = strlcpy(pp->wwid, value, WWID_SIZE);
6add9d
-			if (len > WWID_SIZE &&
6add9d
-			    !fix_broken_nvme_wwid(pp, value, WWID_SIZE))
6add9d
-				condlog(0, "%s: wwid overflow", pp->dev);
6add9d
-			condlog(4, "%s: got wwid of '%s'", pp->dev, pp->wwid);
6add9d
-			pp->missing_udev_info = INFO_OK;
6add9d
-			pp->tick = 0;
6add9d
-		} else {
6add9d
-			condlog(3, "%s: no %s attribute", pp->dev,
6add9d
-				pp->uid_attribute);
6add9d
-			pp->missing_udev_info = INFO_MISSING;
6add9d
-			pp->tick = conf->retrigger_delay;
6add9d
-		}
6add9d
+		condlog(3, "%s: no %s attribute", pp->dev,
6add9d
+			pp->uid_attribute);
6add9d
+		pp->missing_udev_info = INFO_MISSING;
6add9d
+		pp->tick = conf->retrigger_delay;
6add9d
 	}
6add9d
 
6add9d
 	/* Strip any trailing blanks */
6add9d
Index: multipath-tools-130222/libmultipath/structs.h
6add9d
===================================================================
6add9d
--- multipath-tools-130222.orig/libmultipath/structs.h
6add9d
+++ multipath-tools-130222/libmultipath/structs.h
6add9d
@@ -60,7 +60,6 @@ enum sysfs_buses {
6add9d
 	SYSFS_BUS_IDE,
6add9d
 	SYSFS_BUS_CCW,
6add9d
 	SYSFS_BUS_CCISS,
6add9d
-	SYSFS_BUS_RBD,
6add9d
 	SYSFS_BUS_NVME,
6add9d
 };
6add9d