]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: omit 'rw' option during map 807/head
authorJosh Durgin <josh.durgin@inktank.com>
Sat, 2 Nov 2013 02:02:29 +0000 (19:02 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Sat, 2 Nov 2013 02:08:35 +0000 (19:08 -0700)
The ro and rw options were added in linux 3.7. To be compatible with
older kernels, don't specify rw. The default will probably always be
rw, so this should not present any problems in the future.

Reported-by: nicolasc <nicolas.canceill@surfsara.nl>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/rbd.cc

index 147eb2c5138e981b4185488d4592a52a9d23abe8..41cd243735520fddbc2f54c23b280f7362b827d5 100644 (file)
@@ -1643,12 +1643,12 @@ static int do_kernel_add(const char *poolname, const char *imgname,
   }
 
   if (read_only)
-    oss << " ro";
+    oss << " ro,";
   else
-    oss << " rw";
+    oss << " ";
 
   const char *user = g_conf->name.get_id().c_str();
-  oss << ",name=" << user;
+  oss << "name=" << user;
 
   char key_name[strlen(user) + strlen("client.") + 1];
   snprintf(key_name, sizeof(key_name), "client.%s", user);