From: Joao Eduardo Luis Date: Fri, 17 Oct 2014 16:37:03 +0000 (+0100) Subject: mon: MDSMonitor: return if fs exists on 'fs new' X-Git-Tag: v0.88~56^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=07b7f101057a80d1356bd20040180e94cd20c211;p=ceph.git mon: MDSMonitor: return if fs exists on 'fs new' We were just setting return code to -EINVAL, while allowing the logic to continue regardless. If we are to return error, then we should abort the operation as well and let the user know it went wrong instead of continuing as if nothing had happened. Signed-off-by: Joao Eduardo Luis --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index d8050a8cc0c3..dd3a6698e5ce 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -1109,6 +1109,7 @@ bool MDSMonitor::management_command( /* We currently only support one filesystem, so cannot create a second */ ss << "A filesystem already exists, use `ceph fs rm` if you wish to delete it"; r = -EINVAL; + return true; } pg_pool_t const *data_pool = mon->osdmon()->osdmap.get_pg_pool(data);