From 2b0b6a77f2700ae9dbc3b6278d8bc92b00521329 Mon Sep 17 00:00:00 2001 From: Mohamad Gebai Date: Mon, 8 Oct 2018 11:04:22 -0400 Subject: [PATCH] osd: rename 'drop cache' and 'get cache stats' to group them by component Rename 'drop cache' to 'cache drop' and 'get cache stats' to 'cache status'. Signed-off-by: Mohamad Gebai --- PendingReleaseNotes | 9 +++++---- doc/rados/operations/control.rst | 8 ++++---- src/osd/OSD.cc | 10 +++++----- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 4f5472f1d1edf..a282d0fcef747 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -50,13 +50,14 @@ support. It features less network traffic and disk I/O when performing recovery. -* The 'drop cache' OSD command has been added to drop an OSD's caches: +* The 'cache drop' OSD command has been added to drop an OSD's caches: - - ``ceph tell osd.x drop cache`` + - ``ceph tell osd.x cache drop`` -* The 'get cache stats' OSD command has been added to get an OSD's cache stats: +* The 'cache status' OSD command has been added to get the cache stats of an + OSD: - - ``ceph tell osd.x get cache stats' + - ``ceph tell osd.x cache status' >=13.1.0 -------- diff --git a/doc/rados/operations/control.rst b/doc/rados/operations/control.rst index 6ccf9c2793893..76abca2755131 100644 --- a/doc/rados/operations/control.rst +++ b/doc/rados/operations/control.rst @@ -276,13 +276,13 @@ concurrently accessing the OSD. :: ceph tell osd.N bench [TOTAL_DATA_BYTES] [BYTES_PER_WRITE] -To clear an OSD's caches between benchmarking runs, use the 'drop cache' command :: +To clear an OSD's caches between benchmark runs, use the 'cache drop' command :: - ceph tell osd.N drop cache + ceph tell osd.N cache drop -To get the cache statistics of an OSD, use the 'get cache stats' command :: +To get the cache statistics of an OSD, use the 'cache status' command :: - ceph tell osd.N get cache stats + ceph tell osd.N cache status MDS Subsystem ============= diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 74fc3e37d57f5..79eb1ec2311a8 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -6020,10 +6020,10 @@ COMMAND("compact", COMMAND("smart name=devid,type=CephString,req=False", "runs smartctl on this osd devices. ", "osd", "rw", "cli,rest") -COMMAND("drop cache", +COMMAND("cache drop", "Drop all OSD caches", "osd", "rw", "cli,rest") -COMMAND("get cache stats", +COMMAND("cache status", "Get OSD caches statistics", "osd", "r", "cli,rest") }; @@ -6502,7 +6502,7 @@ int OSD::_do_command( probe_smart(devid, ds); } - else if (prefix == "drop cache") { + else if (prefix == "cache drop") { dout(20) << "clearing all caches" << dendl; // Clear the objectstore's cache - onode and buffer for Bluestore, // system's pagecache for Filestore @@ -6519,7 +6519,7 @@ int OSD::_do_command( } } - else if (prefix == "get cache stats") { + else if (prefix == "cache status") { int obj_ctx_count = 0; vector pgs; _get_pgs(&pgs); @@ -6527,7 +6527,7 @@ int OSD::_do_command( obj_ctx_count += pg->get_cache_obj_count(); } if (f) { - f->open_object_section("cache_stats"); + f->open_object_section("cache_status"); f->dump_int("object_ctx", obj_ctx_count); store->dump_cache_stats(f.get()); f->close_section(); -- 2.39.5