]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: EINVAL on a negative osd id
authorSage Weil <sage@inktank.com>
Sat, 27 Jul 2013 00:26:48 +0000 (17:26 -0700)
committerSage Weil <sage@inktank.com>
Sat, 27 Jul 2013 00:26:48 +0000 (17:26 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/librados/RadosClient.cc

index f68125fb8c0713fa97022101f0f8e382efe6d970..e8dd019af3a285b5f9641370a0f061cd2b140f77 100644 (file)
@@ -642,6 +642,10 @@ int librados::RadosClient::osd_command(int osd, vector<string>& cmd,
   bool done;
   int ret;
   tid_t tid;
+
+  if (osd < 0)
+    return -EINVAL;
+
   lock.Lock();
   // XXX do anything with tid?
   int r = objecter->osd_command(osd, cmd, inbl, &tid, poutbl, prs,