From: Josh Durgin Date: Sat, 2 Nov 2013 02:02:29 +0000 (-0700) Subject: rbd: omit 'rw' option during map X-Git-Tag: v0.72~18^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F807%2Fhead;p=ceph.git rbd: omit 'rw' option during map 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 Signed-off-by: Josh Durgin --- diff --git a/src/rbd.cc b/src/rbd.cc index 147eb2c5138..41cd2437355 100644 --- a/src/rbd.cc +++ b/src/rbd.cc @@ -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);