From: Jason Dillaman Date: Tue, 17 Oct 2017 19:49:22 +0000 (-0400) Subject: librbd: moved performance counter enums to common location X-Git-Tag: v13.0.1~307^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2224e5ca1dacef1e3f8ec4854f08b4abe86f5d75;p=ceph.git librbd: moved performance counter enums to common location Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/ImageCtx.cc b/src/librbd/ImageCtx.cc index 2008a07a7695..822e7e9f96e0 100644 --- a/src/librbd/ImageCtx.cc +++ b/src/librbd/ImageCtx.cc @@ -22,6 +22,7 @@ #include "librbd/ObjectMap.h" #include "librbd/Operations.h" #include "librbd/operation/ResizeRequest.h" +#include "librbd/Types.h" #include "librbd/Utils.h" #include "librbd/LibrbdWriteback.h" #include "librbd/exclusive_lock/AutomaticPolicy.h" diff --git a/src/librbd/ImageWatcher.cc b/src/librbd/ImageWatcher.cc index 487eabaa69c1..f8ffda4a75c6 100644 --- a/src/librbd/ImageWatcher.cc +++ b/src/librbd/ImageWatcher.cc @@ -8,6 +8,7 @@ #include "librbd/internal.h" #include "librbd/Operations.h" #include "librbd/TaskFinisher.h" +#include "librbd/Types.h" #include "librbd/Utils.h" #include "librbd/exclusive_lock/Policy.h" #include "librbd/image_watcher/NotifyLockOwner.h" diff --git a/src/librbd/Operations.cc b/src/librbd/Operations.cc index 65dea8f8c41e..f6073b578775 100644 --- a/src/librbd/Operations.cc +++ b/src/librbd/Operations.cc @@ -12,6 +12,7 @@ #include "librbd/ImageState.h" #include "librbd/ImageWatcher.h" #include "librbd/ObjectMap.h" +#include "librbd/Types.h" #include "librbd/Utils.h" #include "librbd/journal/DisabledPolicy.h" #include "librbd/journal/StandardPolicy.h" diff --git a/src/librbd/Types.h b/src/librbd/Types.h index 8efe8a7763c4..9cc16b798773 100644 --- a/src/librbd/Types.h +++ b/src/librbd/Types.h @@ -10,6 +10,46 @@ namespace librbd { +// Performance counters +enum { + l_librbd_first = 26000, + + l_librbd_rd, // read ops + l_librbd_rd_bytes, // bytes read + l_librbd_rd_latency, // average latency + l_librbd_wr, + l_librbd_wr_bytes, + l_librbd_wr_latency, + l_librbd_discard, + l_librbd_discard_bytes, + l_librbd_discard_latency, + l_librbd_flush, + l_librbd_flush_latency, + + l_librbd_ws, + l_librbd_ws_bytes, + l_librbd_ws_latency, + + l_librbd_cmp, + l_librbd_cmp_bytes, + l_librbd_cmp_latency, + + l_librbd_snap_create, + l_librbd_snap_remove, + l_librbd_snap_rollback, + l_librbd_snap_rename, + + l_librbd_notify, + l_librbd_resize, + + l_librbd_readahead, + l_librbd_readahead_bytes, + + l_librbd_invalidate_cache, + + l_librbd_last, +}; + /** @brief Unique identification of a parent in clone relationship. * Cloning an image creates a child image that keeps a reference * to its parent. This allows copy-on-write images. */ diff --git a/src/librbd/internal.h b/src/librbd/internal.h index daedaa42e2fa..d6401380557b 100644 --- a/src/librbd/internal.h +++ b/src/librbd/internal.h @@ -17,44 +17,6 @@ #include "common/WorkQueue.h" #include "librbd/Types.h" -enum { - l_librbd_first = 26000, - - l_librbd_rd, // read ops - l_librbd_rd_bytes, // bytes read - l_librbd_rd_latency, // average latency - l_librbd_wr, - l_librbd_wr_bytes, - l_librbd_wr_latency, - l_librbd_discard, - l_librbd_discard_bytes, - l_librbd_discard_latency, - l_librbd_flush, - l_librbd_flush_latency, - l_librbd_ws, - l_librbd_ws_bytes, - l_librbd_ws_latency, - - l_librbd_cmp, - l_librbd_cmp_bytes, - l_librbd_cmp_latency, - - l_librbd_snap_create, - l_librbd_snap_remove, - l_librbd_snap_rollback, - l_librbd_snap_rename, - - l_librbd_notify, - l_librbd_resize, - - l_librbd_readahead, - l_librbd_readahead_bytes, - - l_librbd_invalidate_cache, - - l_librbd_last, -}; - namespace librbd { struct ImageCtx; diff --git a/src/librbd/io/AioCompletion.cc b/src/librbd/io/AioCompletion.cc index e668ecd9cc70..e30a083e1365 100644 --- a/src/librbd/io/AioCompletion.cc +++ b/src/librbd/io/AioCompletion.cc @@ -12,8 +12,8 @@ #include "librbd/ImageCtx.h" #include "librbd/internal.h" - #include "librbd/Journal.h" +#include "librbd/Types.h" #ifdef WITH_LTTNG #include "tracing/librbd.h" diff --git a/src/librbd/io/ImageRequest.cc b/src/librbd/io/ImageRequest.cc index c38300a53937..f4a10094ecb0 100644 --- a/src/librbd/io/ImageRequest.cc +++ b/src/librbd/io/ImageRequest.cc @@ -5,6 +5,7 @@ #include "librbd/ImageCtx.h" #include "librbd/internal.h" #include "librbd/Journal.h" +#include "librbd/Types.h" #include "librbd/Utils.h" #include "librbd/cache/ImageCache.h" #include "librbd/io/AioCompletion.h"