For consistency, rename a JSON dump function by bdev_io_stat_dump_json() and change the parameter order. Other public APIs and function pointers in the generic bdev layer, spdk_bdev_dump_info_json(), spdk_bdev_fn_table::dump_info_json, and spdk_bdev_fn_table::write_config_json have a json_write_ctx pointer as the last parameter. For consistency, swap a statistics pointer and a json_write_ctx pointer. This is another preparation to extend I/O statistics to include error counters and module specific counters to output these via the bdev_get_iostat RPC. Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I6f3bb6f2752f7da856d4fe66c0f1f8a2eedc176b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15731 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
29 lines
789 B
C
29 lines
789 B
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright (C) 2019 Intel Corporation.
|
|
* All rights reserved.
|
|
*/
|
|
|
|
#ifndef SPDK_BDEV_INTERNAL_H
|
|
#define SPDK_BDEV_INTERNAL_H
|
|
|
|
#include "spdk/bdev.h"
|
|
|
|
#define ZERO_BUFFER_SIZE 0x100000
|
|
|
|
struct spdk_bdev;
|
|
struct spdk_bdev_io;
|
|
struct spdk_bdev_channel;
|
|
|
|
struct spdk_bdev_io *bdev_channel_get_io(struct spdk_bdev_channel *channel);
|
|
|
|
void bdev_io_init(struct spdk_bdev_io *bdev_io, struct spdk_bdev *bdev, void *cb_arg,
|
|
spdk_bdev_io_completion_cb cb);
|
|
|
|
void bdev_io_submit(struct spdk_bdev_io *bdev_io);
|
|
|
|
struct spdk_bdev_io_stat *bdev_io_stat_alloc(void);
|
|
void bdev_io_stat_free(struct spdk_bdev_io_stat *stat);
|
|
void bdev_io_stat_dump_json(struct spdk_bdev_io_stat *stat, struct spdk_json_write_ctx *w);
|
|
|
|
#endif /* SPDK_BDEV_INTERNAL_H */
|