]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix metadata dumps for empty lists
authorJohn Spray <john.spray@redhat.com>
Tue, 17 May 2016 13:03:09 +0000 (14:03 +0100)
committerLoic Dachary <ldachary@redhat.com>
Wed, 10 Aug 2016 10:36:27 +0000 (12:36 +0200)
Because 'r' was set inside loop, these would
fail to set it (leaving ENOSYS) if no
metadata is present.

Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 5fe4fe4d92f5b2d67896beac9b5b3b48b309a6b4)

Conflicts:
        src/mon/Monitor.cc and src/mon/MDSMonitor.cc
        changes relate to features that are not backported to jewel

src/mon/OSDMonitor.cc

index f84affbcda0ecfe6cce44acd896d52db5c883435..5aaee15bf08fba0acd115ca2b33cbc95aa1c30d2 100644 (file)
@@ -3304,6 +3304,7 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
         goto reply;
       f->close_section();
     } else {
+      r = 0;
       f->open_array_section("osd_metadata");
       for (int i=0; i<osdmap.get_max_osd(); ++i) {
         if (osdmap.exists(i)) {