Blame SOURCES/0189-RHBZ-1395298-rbd-lock-on-read.patch
|
|
814ad2 |
---
|
|
|
814ad2 |
libmultipath/checkers/rbd.c | 9 ++++++++-
|
|
|
814ad2 |
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
814ad2 |
|
|
|
814ad2 |
Index: multipath-tools-130222/libmultipath/checkers/rbd.c
|
|
|
814ad2 |
===================================================================
|
|
|
814ad2 |
--- multipath-tools-130222.orig/libmultipath/checkers/rbd.c
|
|
|
814ad2 |
+++ multipath-tools-130222/libmultipath/checkers/rbd.c
|
|
|
814ad2 |
@@ -45,6 +45,7 @@ struct rbd_checker_context {
|
|
|
814ad2 |
char *username;
|
|
|
814ad2 |
int remapped;
|
|
|
814ad2 |
int blacklisted;
|
|
|
814ad2 |
+ int lock_on_read:1;
|
|
|
814ad2 |
|
|
|
814ad2 |
rados_t cluster;
|
|
|
814ad2 |
|
|
|
814ad2 |
@@ -141,6 +142,9 @@ int libcheck_init(struct checker * c)
|
|
|
814ad2 |
goto free_addr;
|
|
|
814ad2 |
}
|
|
|
814ad2 |
|
|
|
814ad2 |
+ if (strstr(config_info, "lock_on_read"))
|
|
|
814ad2 |
+ ct->lock_on_read = 1;
|
|
|
814ad2 |
+
|
|
|
814ad2 |
ct->config_info = strdup(config_info);
|
|
|
814ad2 |
if (!ct->config_info)
|
|
|
814ad2 |
goto free_addr;
|
|
|
814ad2 |
@@ -397,7 +401,10 @@ static int rbd_remap(struct rbd_checker_
|
|
|
814ad2 |
case 0:
|
|
|
814ad2 |
argv[i++] = "rbd";
|
|
|
814ad2 |
argv[i++] = "map";
|
|
|
814ad2 |
- argv[i++] = "-o noshare";
|
|
|
814ad2 |
+ if (ct->lock_on_read)
|
|
|
814ad2 |
+ argv[i++] = "-o noshare,lock_on_read";
|
|
|
814ad2 |
+ else
|
|
|
814ad2 |
+ argv[i++] = "-o noshare";
|
|
|
814ad2 |
if (ct->username) {
|
|
|
814ad2 |
argv[i++] = "--id";
|
|
|
814ad2 |
argv[i++] = ct->username;
|