xref: /spdk/module/bdev/ocf/stats.h (revision 12fbe739a31b09aff0d05f354d4f3bbef99afc55)
1 /*   SPDX-License-Identifier: BSD-3-Clause
2  *   Copyright (C) 2018 Intel Corporation.
3  *   All rights reserved.
4  */
5 
6 #ifndef VBDEV_OCF_STATS_H
7 #define VBDEV_OCF_STATS_H
8 
9 #include "spdk/json.h"
10 #include <ocf/ocf.h>
11 
12 struct vbdev_ocf_stats {
13 	struct ocf_stats_usage usage;
14 	struct ocf_stats_requests reqs;
15 	struct ocf_stats_blocks blocks;
16 	struct ocf_stats_errors errors;
17 };
18 
19 int vbdev_ocf_stats_get(ocf_cache_t cache, char *core_name, struct vbdev_ocf_stats *stats);
20 int vbdev_ocf_stats_reset(ocf_cache_t cache, char *core_name);
21 
22 void vbdev_ocf_stats_write_json(struct spdk_json_write_ctx *w, struct vbdev_ocf_stats *stats);
23 
24 #endif
25