From: Song Shun Date: Thu, 8 Aug 2019 22:55:01 +0000 (-0400) Subject: osd: add device_id to list_devices to help get smart info easily X-Git-Tag: v15.1.0~1854^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=612db362efce5b2908c125608cf4480dc0fdc3d8;p=ceph-ci.git osd: add device_id to list_devices to help get smart info easily Signed-off-by: Song Shun --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index d67002909e9..db06bff1156 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2515,12 +2515,16 @@ will start to track new ops received afterwards."; } else if (admin_command == "list_devices") { set devnames; store->get_devices(&devnames); - f->open_object_section("list_devices"); + f->open_array_section("list_devices"); for (auto dev : devnames) { if (dev.find("dm-") == 0) { continue; } + string err; + f->open_object_section("device"); f->dump_string("device", "/dev/" + dev); + f->dump_string("device_id", get_device_id(dev, &err)); + f->close_section(); } f->close_section(); } else if (admin_command == "send_beacon") {