diff mbox

[2/4] rbd: check for nonshared clients

Message ID 1472679870-25654-3-git-send-email-mchristi@redhat.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Commit Message

Mike Christie Aug. 31, 2016, 9:44 p.m. UTC
The rbd checker only supports nonshared clients so add a check
during init time.

Signed-off-by: Mike Christie <mchristi@redhat.com>
---
 libmultipath/checkers/rbd.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/libmultipath/checkers/rbd.c b/libmultipath/checkers/rbd.c
index f7b1087..6542bdb 100644
--- a/libmultipath/checkers/rbd.c
+++ b/libmultipath/checkers/rbd.c
@@ -123,6 +123,11 @@  int libcheck_init(struct checker * c)
 	if (!config_info)
 		goto free_addr;
 
+	if (!strstr(config_info, "noshare")) {
+		condlog(3, "Only nonshared clients supported.");
+		goto free_addr;
+	}
+
 	ct->config_info = strdup(config_info);
 	if (!ct->config_info)
 		goto free_addr;