xref: /spdk/module/bdev/ocf/stats.h (revision 307b8c112ffd90a26d53dd15fad67bd9038ef526)
1 /*   SPDX-License-Identifier: BSD-3-Clause
2  *   Copyright (c) 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 
21 void vbdev_ocf_stats_write_json(struct spdk_json_write_ctx *w, struct vbdev_ocf_stats *stats);
22 
23 #endif
24