scripts/check_format: check for spaces before tabs
Automatically detect more whitespace errors. All existing cases are fixed; only whitespace change (verify with diff -w) except for one comment style fixup in include/spdk/nvme.h. Change-Id: If750e54b9c8e3421ea6feda5f20184a31431631e Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/402360 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
a76da19f0c
commit
8a6ba58cb4
@ -171,7 +171,7 @@ static void
|
||||
dump_nvmf_subsystem(struct spdk_json_write_ctx *w, struct spdk_nvmf_subsystem *subsystem)
|
||||
{
|
||||
struct spdk_nvmf_host *host;
|
||||
struct spdk_nvmf_listener *listener;
|
||||
struct spdk_nvmf_listener *listener;
|
||||
|
||||
spdk_json_write_object_begin(w);
|
||||
|
||||
|
@ -615,7 +615,7 @@ static struct fio_option options[] = {
|
||||
.lname = "SPDK configuration file",
|
||||
.type = FIO_OPT_STR_STORE,
|
||||
.off1 = offsetof(struct spdk_fio_options, conf),
|
||||
.help = "An SPDK configuration file",
|
||||
.help = "An SPDK configuration file",
|
||||
.category = FIO_OPT_C_ENGINE,
|
||||
.group = FIO_OPT_G_INVALID,
|
||||
},
|
||||
@ -624,7 +624,7 @@ static struct fio_option options[] = {
|
||||
.lname = "SPDK memory in MB",
|
||||
.type = FIO_OPT_INT,
|
||||
.off1 = offsetof(struct spdk_fio_options, mem_mb),
|
||||
.help = "Amount of memory in MB to allocate for SPDK",
|
||||
.help = "Amount of memory in MB to allocate for SPDK",
|
||||
.category = FIO_OPT_C_ENGINE,
|
||||
.group = FIO_OPT_G_INVALID,
|
||||
},
|
||||
|
@ -70,7 +70,7 @@ struct ioat_chan_entry {
|
||||
};
|
||||
|
||||
struct worker_thread {
|
||||
struct ioat_chan_entry *ctx;
|
||||
struct ioat_chan_entry *ctx;
|
||||
struct worker_thread *next;
|
||||
unsigned core;
|
||||
};
|
||||
|
@ -74,8 +74,8 @@ struct spdk_fio_qpair {
|
||||
struct fio_file *f;
|
||||
struct spdk_nvme_qpair *qpair;
|
||||
struct spdk_nvme_ns *ns;
|
||||
struct spdk_fio_qpair *next;
|
||||
struct spdk_fio_ctrlr *fio_ctrlr;
|
||||
struct spdk_fio_qpair *next;
|
||||
struct spdk_fio_ctrlr *fio_ctrlr;
|
||||
};
|
||||
|
||||
struct spdk_fio_thread {
|
||||
@ -117,7 +117,7 @@ static void
|
||||
attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts)
|
||||
{
|
||||
struct thread_data *td = cb_ctx;
|
||||
struct thread_data *td = cb_ctx;
|
||||
struct spdk_fio_thread *fio_thread = td->io_ops_data;
|
||||
struct spdk_fio_ctrlr *fio_ctrlr;
|
||||
struct spdk_fio_qpair *fio_qpair;
|
||||
|
@ -550,7 +550,7 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_transport
|
||||
uint8_t str[512];
|
||||
uint32_t i;
|
||||
struct spdk_nvme_error_information_entry *error_entry;
|
||||
struct spdk_pci_addr pci_addr;
|
||||
struct spdk_pci_addr pci_addr;
|
||||
struct spdk_pci_device *pci_dev;
|
||||
struct spdk_pci_id pci_id;
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
struct dev {
|
||||
struct spdk_pci_addr pci_addr;
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
const struct spdk_nvme_ctrlr_data *cdata;
|
||||
struct spdk_nvme_ns_data *common_ns_data;
|
||||
int outstanding_admin_cmds;
|
||||
@ -540,9 +540,9 @@ add_ns(void)
|
||||
uint64_t ns_size = 0;
|
||||
uint64_t ns_capacity = 0;
|
||||
int ns_lbasize;
|
||||
int ns_dps_type = 0;
|
||||
int ns_dps_location = 0;
|
||||
int ns_nmic = 0;
|
||||
int ns_dps_type = 0;
|
||||
int ns_dps_location = 0;
|
||||
int ns_nmic = 0;
|
||||
struct dev *ctrlr = NULL;
|
||||
|
||||
ctrlr = get_controller();
|
||||
@ -611,7 +611,7 @@ add_ns(void)
|
||||
static void
|
||||
delete_ns(void)
|
||||
{
|
||||
int ns_id;
|
||||
int ns_id;
|
||||
struct dev *ctrlr;
|
||||
|
||||
ctrlr = get_controller();
|
||||
@ -638,7 +638,7 @@ delete_ns(void)
|
||||
static void
|
||||
format_nvm(void)
|
||||
{
|
||||
int ns_id;
|
||||
int ns_id;
|
||||
int ses;
|
||||
int pil;
|
||||
int pi;
|
||||
|
@ -145,7 +145,7 @@ struct perf_task {
|
||||
};
|
||||
|
||||
struct worker_thread {
|
||||
struct ns_worker_ctx *ns_ctx;
|
||||
struct ns_worker_ctx *ns_ctx;
|
||||
struct worker_thread *next;
|
||||
unsigned lcore;
|
||||
};
|
||||
|
@ -42,8 +42,8 @@
|
||||
|
||||
struct dev {
|
||||
struct spdk_pci_addr pci_addr;
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
char name[100];
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
char name[100];
|
||||
};
|
||||
|
||||
static struct dev devs[MAX_DEVS];
|
||||
|
@ -54,11 +54,11 @@ struct spdk_pci_device;
|
||||
* \brief Environment initialization options
|
||||
*/
|
||||
struct spdk_env_opts {
|
||||
const char *name;
|
||||
const char *core_mask;
|
||||
int shm_id;
|
||||
int mem_channel;
|
||||
int master_core;
|
||||
const char *name;
|
||||
const char *core_mask;
|
||||
int shm_id;
|
||||
int mem_channel;
|
||||
int master_core;
|
||||
int mem_size;
|
||||
bool no_pci;
|
||||
|
||||
@ -209,7 +209,7 @@ size_t spdk_mempool_count(const struct spdk_mempool *pool);
|
||||
|
||||
/**
|
||||
* \brief Return the number of dedicated CPU cores utilized by
|
||||
* this env abstraction
|
||||
* this env abstraction
|
||||
*/
|
||||
uint32_t spdk_env_get_core_count(void);
|
||||
|
||||
|
@ -85,7 +85,7 @@ struct spdk_app_opts {
|
||||
|
||||
bool enable_coredump;
|
||||
int mem_channel;
|
||||
int master_core;
|
||||
int master_core;
|
||||
int mem_size;
|
||||
bool no_pci;
|
||||
enum spdk_log_level print_level;
|
||||
|
@ -1105,7 +1105,7 @@ typedef int (*spdk_nvme_req_next_sge_cb)(void *cb_arg, void **address, uint32_t
|
||||
* \param cb_fn callback function to invoke when the I/O is completed
|
||||
* \param cb_arg argument to pass to the callback function
|
||||
* \param io_flags set flags, defined by the SPDK_NVME_IO_FLAGS_* entries
|
||||
* in spdk/nvme_spec.h, for this I/O.
|
||||
* in spdk/nvme_spec.h, for this I/O.
|
||||
*
|
||||
* \return 0 if successfully submitted, ENOMEM if an nvme_request
|
||||
* structure cannot be allocated for the I/O request
|
||||
@ -1156,7 +1156,7 @@ int spdk_nvme_ns_cmd_writev(struct spdk_nvme_ns *ns, struct spdk_nvme_qpair *qpa
|
||||
* \param cb_fn callback function to invoke when the I/O is completed
|
||||
* \param cb_arg argument to pass to the callback function
|
||||
* \param io_flags set flags, defined by the SPDK_NVME_IO_FLAGS_* entries
|
||||
* in spdk/nvme_spec.h, for this I/O.
|
||||
* in spdk/nvme_spec.h, for this I/O.
|
||||
* \param apptag_mask application tag mask.
|
||||
* \param apptag application tag to use end-to-end protection information.
|
||||
*
|
||||
@ -1182,7 +1182,7 @@ int spdk_nvme_ns_cmd_write_with_md(struct spdk_nvme_ns *ns, struct spdk_nvme_qpa
|
||||
* \param cb_fn callback function to invoke when the I/O is completed
|
||||
* \param cb_arg argument to pass to the callback function
|
||||
* \param io_flags set flags, defined by the SPDK_NVME_IO_FLAGS_* entries
|
||||
* in spdk/nvme_spec.h, for this I/O.
|
||||
* in spdk/nvme_spec.h, for this I/O.
|
||||
*
|
||||
* \return 0 if successfully submitted, ENOMEM if an nvme_request
|
||||
* structure cannot be allocated for the I/O request
|
||||
@ -1281,7 +1281,7 @@ int spdk_nvme_ns_cmd_read_with_md(struct spdk_nvme_ns *ns, struct spdk_nvme_qpai
|
||||
* \param type A bit field constructed from \ref enum spdk_nvme_dsm_attribute.
|
||||
* \param qpair I/O queue pair to submit the request
|
||||
* \param ranges An array of \ref spdk_nvme_dsm_range elements describing
|
||||
the LBAs to operate on.
|
||||
* the LBAs to operate on.
|
||||
* \param num_ranges The number of elements in the ranges array.
|
||||
* \param cb_fn callback function to invoke when the I/O is completed
|
||||
* \param cb_arg argument to pass to the callback function
|
||||
|
@ -401,7 +401,7 @@ struct __attribute__((packed)) spdk_nvme_sgl_descriptor {
|
||||
} unkeyed;
|
||||
|
||||
struct {
|
||||
uint64_t length : 24;
|
||||
uint64_t length : 24;
|
||||
uint64_t key : 32;
|
||||
uint64_t subtype : 4;
|
||||
uint64_t type : 4;
|
||||
|
@ -431,8 +431,8 @@ struct spdk_nvmf_rdma_request_private_data {
|
||||
uint16_t qid; /* queue id */
|
||||
uint16_t hrqsize; /* host receive queue size */
|
||||
uint16_t hsqsize; /* host send queue size */
|
||||
uint16_t cntlid; /* controller id */
|
||||
uint8_t reserved[22];
|
||||
uint16_t cntlid; /* controller id */
|
||||
uint8_t reserved[22];
|
||||
};
|
||||
SPDK_STATIC_ASSERT(sizeof(struct spdk_nvmf_rdma_request_private_data) == 32, "Incorrect size");
|
||||
|
||||
|
@ -197,7 +197,7 @@ struct { \
|
||||
if (LIST_NEXT((elm), field) != NULL && \
|
||||
LIST_NEXT((elm), field)->field.le_prev != \
|
||||
&((elm)->field.le_next)) \
|
||||
panic("Bad link elm %p next->prev != elm", (elm)); \
|
||||
panic("Bad link elm %p next->prev != elm", (elm)); \
|
||||
} while (0)
|
||||
|
||||
#define QMD_LIST_CHECK_PREV(elm, field) do { \
|
||||
@ -258,7 +258,7 @@ struct { \
|
||||
|
||||
#define QMD_TAILQ_CHECK_TAIL(head, field) do { \
|
||||
if (*(head)->tqh_last != NULL) \
|
||||
panic("Bad tailq NEXT(%p->tqh_last) != NULL", (head)); \
|
||||
panic("Bad tailq NEXT(%p->tqh_last) != NULL", (head)); \
|
||||
} while (0)
|
||||
|
||||
#define QMD_TAILQ_CHECK_NEXT(elm, field) do { \
|
||||
|
@ -179,7 +179,7 @@ void spdk_scsi_dev_free_io_channels(struct spdk_scsi_dev *dev);
|
||||
* lun_id_list[x] is the LUN ID for lun_list[x].
|
||||
* \param num_luns Number of entries in lun_list and lun_id_list.
|
||||
* \param hotremove_cb Callback to lun hotremoval. Will be called
|
||||
* once hotremove is first triggered.
|
||||
* once hotremove is first triggered.
|
||||
* \param hotremove_ctx Additional argument to hotremove_cb
|
||||
* \return The constructed spdk_scsi_dev object.
|
||||
*/
|
||||
|
@ -497,7 +497,7 @@ struct spdk_scsi_unmap_bdesc {
|
||||
uint32_t reserved;
|
||||
};
|
||||
|
||||
#define SPDK_SCSI_UNMAP_LBPU 1 << 7
|
||||
#define SPDK_SCSI_UNMAP_LBPU 1 << 7
|
||||
#define SPDK_SCSI_UNMAP_LBPWS 1 << 6
|
||||
#define SPDK_SCSI_UNMAP_LBPWS10 1 << 5
|
||||
|
||||
|
@ -169,7 +169,7 @@ struct spdk_trace_register_fn {
|
||||
|
||||
void spdk_trace_add_register_fn(struct spdk_trace_register_fn *reg_fn);
|
||||
|
||||
#define SPDK_TRACE_REGISTER_FN(fn) \
|
||||
#define SPDK_TRACE_REGISTER_FN(fn) \
|
||||
static void fn(void); \
|
||||
struct spdk_trace_register_fn reg_ ## fn = { \
|
||||
.reg_fn = fn, \
|
||||
|
@ -566,15 +566,15 @@ void spdk_bdev_part_submit_request(struct spdk_bdev_part_channel *ch, struct spd
|
||||
#define SPDK_BDEV_MODULE_REGISTER(_name, init_fn, fini_fn, config_fn, ctx_size_fn, examine_fn) \
|
||||
static struct spdk_bdev_module_if _name ## _if = { \
|
||||
.name = #_name, \
|
||||
.module_init = init_fn, \
|
||||
.module_init = init_fn, \
|
||||
.module_fini = fini_fn, \
|
||||
.config_text = config_fn, \
|
||||
.get_ctx_size = ctx_size_fn, \
|
||||
.get_ctx_size = ctx_size_fn, \
|
||||
.examine = examine_fn, \
|
||||
}; \
|
||||
__attribute__((constructor)) static void _name ## _init(void) \
|
||||
{ \
|
||||
spdk_bdev_module_list_add(&_name ## _if); \
|
||||
}; \
|
||||
__attribute__((constructor)) static void _name ## _init(void) \
|
||||
{ \
|
||||
spdk_bdev_module_list_add(&_name ## _if); \
|
||||
}
|
||||
|
||||
#define SPDK_GET_BDEV_MODULE(name) (&name ## _if)
|
||||
|
@ -82,14 +82,14 @@ void spdk_copy_module_list_add(struct spdk_copy_module_if *copy_module);
|
||||
|
||||
#define SPDK_COPY_MODULE_REGISTER(init_fn, fini_fn, config_fn, ctx_size_fn) \
|
||||
static struct spdk_copy_module_if init_fn ## _if = { \
|
||||
.module_init = init_fn, \
|
||||
.module_init = init_fn, \
|
||||
.module_fini = fini_fn, \
|
||||
.config_text = config_fn, \
|
||||
.get_ctx_size = ctx_size_fn, \
|
||||
}; \
|
||||
__attribute__((constructor)) static void init_fn ## _init(void) \
|
||||
{ \
|
||||
spdk_copy_module_list_add(&init_fn ## _if); \
|
||||
.get_ctx_size = ctx_size_fn, \
|
||||
}; \
|
||||
__attribute__((constructor)) static void init_fn ## _init(void) \
|
||||
{ \
|
||||
spdk_copy_module_list_add(&init_fn ## _if); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -571,10 +571,10 @@ bdev_aio_initialize(void)
|
||||
static void
|
||||
bdev_aio_get_spdk_running_config(FILE *fp)
|
||||
{
|
||||
char *file;
|
||||
char *name;
|
||||
uint32_t block_size;
|
||||
struct file_disk *fdisk;
|
||||
char *file;
|
||||
char *name;
|
||||
uint32_t block_size;
|
||||
struct file_disk *fdisk;
|
||||
|
||||
fprintf(fp,
|
||||
"\n"
|
||||
|
@ -1641,7 +1641,7 @@ _spdk_bdev_reset_dev(struct spdk_io_channel_iter *i, int status)
|
||||
static void
|
||||
_spdk_bdev_reset_freeze_channel(struct spdk_io_channel_iter *i)
|
||||
{
|
||||
struct spdk_io_channel *ch;
|
||||
struct spdk_io_channel *ch;
|
||||
struct spdk_bdev_channel *channel;
|
||||
struct spdk_bdev_mgmt_channel *mgmt_channel;
|
||||
struct spdk_bdev_module_channel *shared_ch;
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
struct lvol_store_bdev {
|
||||
struct spdk_lvol_store *lvs;
|
||||
struct spdk_bdev *bdev;
|
||||
struct spdk_bdev *bdev;
|
||||
struct spdk_lvs_req *req;
|
||||
|
||||
TAILQ_ENTRY(lvol_store_bdev) lvol_stores;
|
||||
|
@ -49,7 +49,7 @@
|
||||
|
||||
struct malloc_disk {
|
||||
struct spdk_bdev disk;
|
||||
void *malloc_buf;
|
||||
void *malloc_buf;
|
||||
TAILQ_ENTRY(malloc_disk) link;
|
||||
};
|
||||
|
||||
|
@ -178,9 +178,9 @@ struct firmware_update_info {
|
||||
void *fw_image;
|
||||
void *p;
|
||||
unsigned int size;
|
||||
unsigned int size_remaining;
|
||||
unsigned int offset;
|
||||
unsigned int transfer;
|
||||
unsigned int size_remaining;
|
||||
unsigned int offset;
|
||||
unsigned int transfer;
|
||||
|
||||
void *desc;
|
||||
struct spdk_io_channel *ch;
|
||||
|
@ -183,7 +183,7 @@ _spdk_blob_alloc(struct spdk_blob_store *bs, spdk_blob_id id)
|
||||
static void
|
||||
_spdk_xattrs_free(struct spdk_xattr_tailq *xattrs)
|
||||
{
|
||||
struct spdk_xattr *xattr, *xattr_tmp;
|
||||
struct spdk_xattr *xattr, *xattr_tmp;
|
||||
|
||||
TAILQ_FOREACH_SAFE(xattr, xattrs, link, xattr_tmp) {
|
||||
TAILQ_REMOVE(xattrs, xattr, link);
|
||||
@ -681,7 +681,7 @@ _spdk_blob_serialize(const struct spdk_blob *blob, struct spdk_blob_md_page **pa
|
||||
uint32_t *page_count)
|
||||
{
|
||||
struct spdk_blob_md_page *cur_page;
|
||||
int rc;
|
||||
int rc;
|
||||
uint8_t *buf;
|
||||
size_t remaining_sz;
|
||||
uint64_t last_cluster;
|
||||
@ -745,7 +745,7 @@ _spdk_blob_serialize(const struct spdk_blob *blob, struct spdk_blob_md_page **pa
|
||||
}
|
||||
|
||||
struct spdk_blob_load_ctx {
|
||||
struct spdk_blob *blob;
|
||||
struct spdk_blob *blob;
|
||||
|
||||
struct spdk_blob_md_page *pages;
|
||||
uint32_t num_pages;
|
||||
@ -770,8 +770,8 @@ _spdk_blob_md_page_calc_crc(void *page)
|
||||
static void
|
||||
_spdk_blob_load_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
{
|
||||
struct spdk_blob_load_ctx *ctx = cb_arg;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
struct spdk_blob_load_ctx *ctx = cb_arg;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
struct spdk_blob_md_page *page;
|
||||
int rc;
|
||||
uint32_t crc;
|
||||
@ -877,7 +877,7 @@ _spdk_blob_load(spdk_bs_sequence_t *seq, struct spdk_blob *blob,
|
||||
}
|
||||
|
||||
struct spdk_blob_persist_ctx {
|
||||
struct spdk_blob *blob;
|
||||
struct spdk_blob *blob;
|
||||
|
||||
struct spdk_blob_md_page *pages;
|
||||
|
||||
@ -891,8 +891,8 @@ struct spdk_blob_persist_ctx {
|
||||
static void
|
||||
_spdk_blob_persist_complete(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
{
|
||||
struct spdk_blob_persist_ctx *ctx = cb_arg;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
struct spdk_blob_persist_ctx *ctx = cb_arg;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
|
||||
if (bserrno == 0) {
|
||||
_spdk_blob_mark_clean(blob);
|
||||
@ -909,8 +909,8 @@ _spdk_blob_persist_complete(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
static void
|
||||
_spdk_blob_persist_unmap_clusters_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
{
|
||||
struct spdk_blob_persist_ctx *ctx = cb_arg;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
struct spdk_blob_persist_ctx *ctx = cb_arg;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
struct spdk_blob_store *bs = blob->bs;
|
||||
void *tmp;
|
||||
size_t i;
|
||||
@ -942,8 +942,8 @@ _spdk_blob_persist_unmap_clusters_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int
|
||||
static void
|
||||
_spdk_blob_persist_unmap_clusters(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
{
|
||||
struct spdk_blob_persist_ctx *ctx = cb_arg;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
struct spdk_blob_persist_ctx *ctx = cb_arg;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
struct spdk_blob_store *bs = blob->bs;
|
||||
spdk_bs_batch_t *batch;
|
||||
size_t i;
|
||||
@ -999,7 +999,7 @@ static void
|
||||
_spdk_blob_persist_zero_pages_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
{
|
||||
struct spdk_blob_persist_ctx *ctx = cb_arg;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
struct spdk_blob_store *bs = blob->bs;
|
||||
size_t i;
|
||||
|
||||
@ -1025,8 +1025,8 @@ _spdk_blob_persist_zero_pages_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bse
|
||||
static void
|
||||
_spdk_blob_persist_zero_pages(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
{
|
||||
struct spdk_blob_persist_ctx *ctx = cb_arg;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
struct spdk_blob_persist_ctx *ctx = cb_arg;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
struct spdk_blob_store *bs = blob->bs;
|
||||
uint64_t lba;
|
||||
uint32_t lba_count;
|
||||
@ -1090,10 +1090,10 @@ _spdk_blob_persist_write_page_root(spdk_bs_sequence_t *seq, void *cb_arg, int bs
|
||||
static void
|
||||
_spdk_blob_persist_write_page_chain(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
{
|
||||
struct spdk_blob_persist_ctx *ctx = cb_arg;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
struct spdk_blob_persist_ctx *ctx = cb_arg;
|
||||
struct spdk_blob *blob = ctx->blob;
|
||||
struct spdk_blob_store *bs = blob->bs;
|
||||
uint64_t lba;
|
||||
uint64_t lba;
|
||||
uint32_t lba_count;
|
||||
struct spdk_blob_md_page *page;
|
||||
spdk_bs_batch_t *batch;
|
||||
@ -2589,7 +2589,7 @@ static void
|
||||
_spdk_bs_recover(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
{
|
||||
struct spdk_bs_load_ctx *ctx = cb_arg;
|
||||
int rc;
|
||||
int rc;
|
||||
|
||||
if (bserrno != 0) {
|
||||
_spdk_bs_load_ctx_fail(seq, ctx, -EIO);
|
||||
@ -3277,7 +3277,7 @@ void spdk_bs_create_blob_ext(struct spdk_blob_store *bs, const struct spdk_blob_
|
||||
{
|
||||
struct spdk_blob *blob;
|
||||
uint32_t page_idx;
|
||||
struct spdk_bs_cpl cpl;
|
||||
struct spdk_bs_cpl cpl;
|
||||
struct spdk_blob_opts opts_default;
|
||||
spdk_bs_sequence_t *seq;
|
||||
spdk_blob_id id;
|
||||
@ -3454,7 +3454,7 @@ spdk_bs_delete_blob(struct spdk_blob_store *bs, spdk_blob_id blobid,
|
||||
spdk_blob_op_complete cb_fn, void *cb_arg)
|
||||
{
|
||||
struct spdk_bs_cpl cpl;
|
||||
spdk_bs_sequence_t *seq;
|
||||
spdk_bs_sequence_t *seq;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Deleting blob %lu\n", blobid);
|
||||
|
||||
@ -3912,7 +3912,7 @@ _spdk_blob_set_xattr(struct spdk_blob *blob, const char *name, const void *value
|
||||
uint16_t value_len, bool internal)
|
||||
{
|
||||
struct spdk_xattr_tailq *xattrs;
|
||||
struct spdk_xattr *xattr;
|
||||
struct spdk_xattr *xattr;
|
||||
|
||||
_spdk_blob_verify_md_op(blob);
|
||||
|
||||
|
@ -165,12 +165,12 @@ struct spdk_blob_store {
|
||||
uint32_t pages_per_cluster;
|
||||
|
||||
spdk_blob_id super_blob;
|
||||
struct spdk_bs_type bstype;
|
||||
struct spdk_bs_type bstype;
|
||||
|
||||
struct spdk_bs_cpl unload_cpl;
|
||||
int unload_err;
|
||||
|
||||
TAILQ_HEAD(, spdk_blob) blobs;
|
||||
TAILQ_HEAD(, spdk_blob) blobs;
|
||||
};
|
||||
|
||||
struct spdk_bs_channel {
|
||||
@ -316,7 +316,7 @@ struct spdk_bs_super_block {
|
||||
uint32_t md_start; /* Offset from beginning of disk, in pages */
|
||||
uint32_t md_len; /* Count, in pages */
|
||||
|
||||
struct spdk_bs_type bstype; /* blobstore type */
|
||||
struct spdk_bs_type bstype; /* blobstore type */
|
||||
|
||||
uint32_t used_blobid_mask_start; /* Offset from beginning of disk, in pages */
|
||||
uint32_t used_blobid_mask_len; /* Count, in pages */
|
||||
|
@ -113,7 +113,7 @@ struct spdk_bs_request_set {
|
||||
|
||||
struct spdk_bs_channel *channel;
|
||||
|
||||
struct spdk_bs_dev_cb_args cb_args;
|
||||
struct spdk_bs_dev_cb_args cb_args;
|
||||
|
||||
union {
|
||||
struct {
|
||||
@ -122,8 +122,8 @@ struct spdk_bs_request_set {
|
||||
} sequence;
|
||||
|
||||
struct {
|
||||
uint32_t outstanding_ops;
|
||||
uint32_t batch_closed;
|
||||
uint32_t outstanding_ops;
|
||||
uint32_t batch_closed;
|
||||
spdk_bs_sequence_cpl cb_fn;
|
||||
void *cb_arg;
|
||||
} batch;
|
||||
|
@ -72,7 +72,7 @@ extern struct rte_pci_bus rte_pci_bus;
|
||||
struct spdk_pci_enum_ctx {
|
||||
struct rte_pci_driver driver;
|
||||
spdk_pci_enum_cb cb_fn;
|
||||
void *cb_arg;
|
||||
void *cb_arg;
|
||||
pthread_mutex_t mtx;
|
||||
bool is_registered;
|
||||
};
|
||||
|
@ -90,7 +90,7 @@ struct spdk_reactor {
|
||||
struct spdk_poller *rusage_poller;
|
||||
|
||||
/* The last known rusage values */
|
||||
struct rusage rusage;
|
||||
struct rusage rusage;
|
||||
|
||||
/*
|
||||
* Contains pollers actively running on this reactor. Pollers
|
||||
@ -412,7 +412,7 @@ _spdk_reactor_run(void *arg)
|
||||
uint64_t idle_started, now;
|
||||
uint64_t spin_cycles, sleep_cycles;
|
||||
uint32_t sleep_us;
|
||||
uint32_t timer_poll_count;
|
||||
uint32_t timer_poll_count;
|
||||
char thread_name[32];
|
||||
|
||||
snprintf(thread_name, sizeof(thread_name), "reactor_%u", reactor->lcore);
|
||||
|
@ -467,7 +467,7 @@ ioat_channel_start(struct spdk_ioat_chan *ioat)
|
||||
static struct spdk_ioat_chan *
|
||||
ioat_attach(void *device)
|
||||
{
|
||||
struct spdk_ioat_chan *ioat;
|
||||
struct spdk_ioat_chan *ioat;
|
||||
uint32_t cmd_reg;
|
||||
|
||||
ioat = calloc(1, sizeof(struct spdk_ioat_chan));
|
||||
|
@ -693,9 +693,9 @@ spdk_iscsi_tgt_node_add_pg_ig_map(struct spdk_iscsi_tgt_node *target,
|
||||
int pg_tag, int ig_tag)
|
||||
{
|
||||
struct spdk_iscsi_portal_grp *pg;
|
||||
struct spdk_iscsi_pg_map *pg_map;
|
||||
struct spdk_iscsi_pg_map *pg_map;
|
||||
struct spdk_iscsi_init_grp *ig;
|
||||
struct spdk_iscsi_ig_map *ig_map;
|
||||
struct spdk_iscsi_ig_map *ig_map;
|
||||
bool new_pg_map = false;
|
||||
|
||||
pg = spdk_iscsi_portal_grp_find_by_tag(pg_tag);
|
||||
|
@ -45,7 +45,7 @@ struct spdk_iscsi_portal_grp;
|
||||
struct spdk_iscsi_portal;
|
||||
|
||||
#define MAX_TARGET_MAP 256
|
||||
#define SPDK_TN_TAG_MAX 0x0000ffff
|
||||
#define SPDK_TN_TAG_MAX 0x0000ffff
|
||||
|
||||
struct spdk_iscsi_ig_map {
|
||||
struct spdk_iscsi_init_grp *ig;
|
||||
|
@ -203,17 +203,17 @@ static int spdk_prepare_ifc_list(void)
|
||||
struct ifinfomsg ifi;
|
||||
};
|
||||
int netlink_fd;
|
||||
struct sockaddr_nl local; /* Our local (user space) side of the communication */
|
||||
struct sockaddr_nl kernel; /* The remote (kernel space) side of the communication */
|
||||
struct sockaddr_nl local; /* Our local (user space) side of the communication */
|
||||
struct sockaddr_nl kernel; /* The remote (kernel space) side of the communication */
|
||||
|
||||
struct msghdr rtnl_msg; /* Generic msghdr struct for use with sendmsg */
|
||||
struct iovec io; /* IO vector for sendmsg */
|
||||
struct msghdr rtnl_msg; /* Generic msghdr struct for use with sendmsg */
|
||||
struct iovec io; /* IO vector for sendmsg */
|
||||
|
||||
struct nl_req_s req; /* Structure that describes the rtnetlink packet itself */
|
||||
char reply[16384]; /* a large buffer to receive lots of link information */
|
||||
struct nl_req_s req; /* Structure that describes the rtnetlink packet itself */
|
||||
char reply[16384]; /* a large buffer to receive lots of link information */
|
||||
|
||||
pid_t pid = getpid(); /* Our process ID to build the correct netlink address */
|
||||
int end = 0; /* some flag to end loop parsing */
|
||||
pid_t pid = getpid(); /* Our process ID to build the correct netlink address */
|
||||
int end = 0; /* some flag to end loop parsing */
|
||||
|
||||
/*
|
||||
* Prepare netlink socket for kernel/user space communication
|
||||
|
@ -1046,7 +1046,7 @@ nvme_ctrlr_construct_namespaces(struct spdk_nvme_ctrlr *ctrlr)
|
||||
|
||||
for (i = 0; i < nn; i++) {
|
||||
struct spdk_nvme_ns *ns = &ctrlr->ns[i];
|
||||
uint32_t nsid = i + 1;
|
||||
uint32_t nsid = i + 1;
|
||||
|
||||
if (nvme_ns_construct(ns, nsid, ctrlr) != 0) {
|
||||
goto fail;
|
||||
|
@ -956,7 +956,7 @@ nvme_pcie_qpair_construct(struct spdk_nvme_qpair *qpair)
|
||||
uint64_t phys_addr = 0;
|
||||
uint64_t offset;
|
||||
uint16_t num_trackers;
|
||||
size_t page_size = sysconf(_SC_PAGESIZE);
|
||||
size_t page_size = sysconf(_SC_PAGESIZE);
|
||||
|
||||
/*
|
||||
* Limit the maximum number of completions to return per call to prevent wraparound,
|
||||
|
@ -37,7 +37,7 @@ static void nvme_qpair_fail(struct spdk_nvme_qpair *qpair);
|
||||
|
||||
struct nvme_string {
|
||||
uint16_t value;
|
||||
const char *str;
|
||||
const char *str;
|
||||
};
|
||||
|
||||
static const struct nvme_string admin_opcode[] = {
|
||||
|
@ -112,7 +112,7 @@ struct spdk_nvme_rdma_req {
|
||||
|
||||
struct ibv_send_wr send_wr;
|
||||
|
||||
struct nvme_request *req;
|
||||
struct nvme_request *req;
|
||||
|
||||
struct ibv_sge send_sgl;
|
||||
|
||||
@ -495,13 +495,13 @@ static int
|
||||
nvme_rdma_connect(struct nvme_rdma_qpair *rqpair)
|
||||
{
|
||||
struct rdma_conn_param param = {};
|
||||
struct spdk_nvmf_rdma_request_private_data request_data = {};
|
||||
struct spdk_nvmf_rdma_request_private_data request_data = {};
|
||||
struct spdk_nvmf_rdma_accept_private_data *accept_data;
|
||||
struct ibv_device_attr attr;
|
||||
int ret;
|
||||
struct rdma_cm_event *event;
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct nvme_rdma_ctrlr *rctrlr;
|
||||
struct ibv_device_attr attr;
|
||||
int ret;
|
||||
struct rdma_cm_event *event;
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct nvme_rdma_ctrlr *rctrlr;
|
||||
|
||||
ret = ibv_query_device(rqpair->cm_id->verbs, &attr);
|
||||
if (ret != 0) {
|
||||
@ -1485,10 +1485,10 @@ int
|
||||
nvme_rdma_qpair_process_completions(struct spdk_nvme_qpair *qpair,
|
||||
uint32_t max_completions)
|
||||
{
|
||||
struct nvme_rdma_qpair *rqpair = nvme_rdma_qpair(qpair);
|
||||
struct ibv_wc wc[MAX_COMPLETIONS_PER_POLL];
|
||||
struct nvme_rdma_qpair *rqpair = nvme_rdma_qpair(qpair);
|
||||
struct ibv_wc wc[MAX_COMPLETIONS_PER_POLL];
|
||||
int i, rc, batch_size;
|
||||
uint32_t reaped;
|
||||
uint32_t reaped;
|
||||
struct ibv_cq *cq;
|
||||
|
||||
if (max_completions == 0) {
|
||||
|
@ -57,7 +57,7 @@ nvme_transport_unknown(enum spdk_nvme_transport_type trtype)
|
||||
#define TRANSPORT_FABRICS_RDMA(func_name, args) case SPDK_NVME_TRANSPORT_RDMA: SPDK_UNREACHABLE();
|
||||
#define TRANSPORT_RDMA_AVAILABLE false
|
||||
#endif
|
||||
#define NVME_TRANSPORT_CALL(trtype, func_name, args) \
|
||||
#define NVME_TRANSPORT_CALL(trtype, func_name, args) \
|
||||
do { \
|
||||
switch (trtype) { \
|
||||
TRANSPORT_PCIE(func_name, args) \
|
||||
|
@ -90,8 +90,8 @@ static void
|
||||
nvmf_bdev_ctrlr_complete_cmd(struct spdk_bdev_io *bdev_io, bool success,
|
||||
void *cb_arg)
|
||||
{
|
||||
struct spdk_nvmf_request *req = cb_arg;
|
||||
struct spdk_nvme_cpl *response = &req->rsp->nvme_cpl;
|
||||
struct spdk_nvmf_request *req = cb_arg;
|
||||
struct spdk_nvme_cpl *response = &req->rsp->nvme_cpl;
|
||||
int sc, sct;
|
||||
|
||||
spdk_bdev_io_get_nvme_status(bdev_io, &sc, &sct);
|
||||
@ -282,8 +282,8 @@ nvmf_virtual_ctrlr_dsm_cpl(struct spdk_bdev_io *bdev_io, bool success,
|
||||
void *cb_arg)
|
||||
{
|
||||
struct nvmf_virtual_ctrlr_unmap *unmap_ctx = cb_arg;
|
||||
struct spdk_nvmf_request *req = unmap_ctx->req;
|
||||
struct spdk_nvme_cpl *response = &req->rsp->nvme_cpl;
|
||||
struct spdk_nvmf_request *req = unmap_ctx->req;
|
||||
struct spdk_nvme_cpl *response = &req->rsp->nvme_cpl;
|
||||
int sc, sct;
|
||||
|
||||
unmap_ctx->count--;
|
||||
|
@ -601,31 +601,31 @@ static const struct spdk_nvme_cmds_and_effect_log_page g_cmds_and_effect_log_pag
|
||||
.admin_cmds_supported = {
|
||||
/* CSUPP, LBCC, NCC, NIC, CCC, CSE */
|
||||
/* Get Log Page */
|
||||
[SPDK_NVME_OPC_GET_LOG_PAGE] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
[SPDK_NVME_OPC_GET_LOG_PAGE] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
/* Identify */
|
||||
[SPDK_NVME_OPC_IDENTIFY] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
[SPDK_NVME_OPC_IDENTIFY] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
/* Abort */
|
||||
[SPDK_NVME_OPC_ABORT] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
[SPDK_NVME_OPC_ABORT] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
/* Set Features */
|
||||
[SPDK_NVME_OPC_SET_FEATURES] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
[SPDK_NVME_OPC_SET_FEATURES] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
/* Get Features */
|
||||
[SPDK_NVME_OPC_GET_FEATURES] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
[SPDK_NVME_OPC_GET_FEATURES] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
/* Async Event Request */
|
||||
[SPDK_NVME_OPC_ASYNC_EVENT_REQUEST] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
[SPDK_NVME_OPC_ASYNC_EVENT_REQUEST] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
/* Keep Alive */
|
||||
[SPDK_NVME_OPC_KEEP_ALIVE] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
[SPDK_NVME_OPC_KEEP_ALIVE] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
},
|
||||
.io_cmds_supported = {
|
||||
/* FLUSH */
|
||||
[SPDK_NVME_OPC_FLUSH] = {1, 1, 0, 0, 0, 0, 0, 0},
|
||||
[SPDK_NVME_OPC_FLUSH] = {1, 1, 0, 0, 0, 0, 0, 0},
|
||||
/* WRITE */
|
||||
[SPDK_NVME_OPC_WRITE] = {1, 1, 0, 0, 0, 0, 0, 0},
|
||||
[SPDK_NVME_OPC_WRITE] = {1, 1, 0, 0, 0, 0, 0, 0},
|
||||
/* READ */
|
||||
[SPDK_NVME_OPC_READ] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
[SPDK_NVME_OPC_READ] = {1, 0, 0, 0, 0, 0, 0, 0},
|
||||
/* WRITE ZEROES */
|
||||
[SPDK_NVME_OPC_WRITE_ZEROES] = {1, 1, 0, 0, 0, 0, 0, 0},
|
||||
[SPDK_NVME_OPC_WRITE_ZEROES] = {1, 1, 0, 0, 0, 0, 0, 0},
|
||||
/* DATASET MANAGEMENT */
|
||||
[SPDK_NVME_OPC_DATASET_MANAGEMENT] = {1, 1, 0, 0, 0, 0, 0, 0},
|
||||
[SPDK_NVME_OPC_DATASET_MANAGEMENT] = {1, 1, 0, 0, 0, 0, 0, 0},
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -62,7 +62,7 @@ struct spdk_nvmf_tgt {
|
||||
|
||||
/* Array of subsystem pointers of size max_sid indexed by sid */
|
||||
struct spdk_nvmf_subsystem **subsystems;
|
||||
uint32_t max_sid;
|
||||
uint32_t max_sid;
|
||||
|
||||
struct spdk_nvmf_discovery_log_page *discovery_log_page;
|
||||
size_t discovery_log_page_size;
|
||||
@ -150,7 +150,7 @@ struct spdk_nvmf_qpair {
|
||||
uint16_t sq_head;
|
||||
uint16_t sq_head_max;
|
||||
|
||||
TAILQ_ENTRY(spdk_nvmf_qpair) link;
|
||||
TAILQ_ENTRY(spdk_nvmf_qpair) link;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -159,7 +159,7 @@ struct spdk_nvmf_qpair {
|
||||
*/
|
||||
struct spdk_nvmf_ctrlr {
|
||||
uint16_t cntlid;
|
||||
struct spdk_nvmf_subsystem *subsys;
|
||||
struct spdk_nvmf_subsystem *subsys;
|
||||
|
||||
struct {
|
||||
union spdk_nvme_cap_register cap;
|
||||
@ -177,7 +177,7 @@ struct spdk_nvmf_ctrlr {
|
||||
struct spdk_nvmf_request *aer_req;
|
||||
uint8_t hostid[16];
|
||||
|
||||
TAILQ_ENTRY(spdk_nvmf_ctrlr) link;
|
||||
TAILQ_ENTRY(spdk_nvmf_ctrlr) link;
|
||||
};
|
||||
|
||||
struct spdk_nvmf_subsystem {
|
||||
@ -196,7 +196,7 @@ struct spdk_nvmf_subsystem {
|
||||
|
||||
/* Array of pointers to namespaces of size max_nsid indexed by nsid - 1 */
|
||||
struct spdk_nvmf_ns **ns;
|
||||
uint32_t max_nsid;
|
||||
uint32_t max_nsid;
|
||||
uint32_t num_allocated_nsid;
|
||||
|
||||
TAILQ_HEAD(, spdk_nvmf_ctrlr) ctrlrs;
|
||||
@ -271,7 +271,7 @@ spdk_nvmf_qpair_is_admin_queue(struct spdk_nvmf_qpair *qpair)
|
||||
#define TRACE_NVMF_IO_START SPDK_TPOINT_ID(TRACE_GROUP_NVMF, 0x0)
|
||||
#define TRACE_RDMA_READ_START SPDK_TPOINT_ID(TRACE_GROUP_NVMF, 0x1)
|
||||
#define TRACE_RDMA_WRITE_START SPDK_TPOINT_ID(TRACE_GROUP_NVMF, 0x2)
|
||||
#define TRACE_RDMA_READ_COMPLETE SPDK_TPOINT_ID(TRACE_GROUP_NVMF, 0x3)
|
||||
#define TRACE_RDMA_READ_COMPLETE SPDK_TPOINT_ID(TRACE_GROUP_NVMF, 0x3)
|
||||
#define TRACE_RDMA_WRITE_COMPLETE SPDK_TPOINT_ID(TRACE_GROUP_NVMF, 0x4)
|
||||
#define TRACE_NVMF_LIB_READ_START SPDK_TPOINT_ID(TRACE_GROUP_NVMF, 0x5)
|
||||
#define TRACE_NVMF_LIB_WRITE_START SPDK_TPOINT_ID(TRACE_GROUP_NVMF, 0x6)
|
||||
|
@ -255,11 +255,11 @@ struct spdk_nvmf_rdma_transport {
|
||||
|
||||
struct spdk_mempool *data_buf_pool;
|
||||
|
||||
pthread_mutex_t lock;
|
||||
pthread_mutex_t lock;
|
||||
|
||||
uint16_t max_queue_depth;
|
||||
uint32_t max_io_size;
|
||||
uint32_t in_capsule_data_size;
|
||||
uint16_t max_queue_depth;
|
||||
uint32_t max_io_size;
|
||||
uint32_t in_capsule_data_size;
|
||||
|
||||
TAILQ_HEAD(, spdk_nvmf_rdma_device) devices;
|
||||
TAILQ_HEAD(, spdk_nvmf_rdma_port) ports;
|
||||
@ -463,8 +463,8 @@ request_transfer_in(struct spdk_nvmf_request *req)
|
||||
{
|
||||
int rc;
|
||||
struct spdk_nvmf_rdma_request *rdma_req;
|
||||
struct spdk_nvmf_qpair *qpair;
|
||||
struct spdk_nvmf_rdma_qpair *rqpair;
|
||||
struct spdk_nvmf_qpair *qpair;
|
||||
struct spdk_nvmf_rdma_qpair *rqpair;
|
||||
struct ibv_send_wr *bad_wr = NULL;
|
||||
|
||||
qpair = req->qpair;
|
||||
@ -497,10 +497,10 @@ request_transfer_in(struct spdk_nvmf_request *req)
|
||||
static int
|
||||
request_transfer_out(struct spdk_nvmf_request *req)
|
||||
{
|
||||
int rc;
|
||||
int rc;
|
||||
struct spdk_nvmf_rdma_request *rdma_req;
|
||||
struct spdk_nvmf_qpair *qpair;
|
||||
struct spdk_nvmf_rdma_qpair *rqpair;
|
||||
struct spdk_nvmf_rdma_qpair *rqpair;
|
||||
struct spdk_nvme_cpl *rsp;
|
||||
struct ibv_recv_wr *bad_recv_wr = NULL;
|
||||
struct ibv_send_wr *send_wr, *bad_send_wr = NULL;
|
||||
@ -610,7 +610,7 @@ nvmf_rdma_connect(struct spdk_nvmf_transport *transport, struct rdma_cm_event *e
|
||||
{
|
||||
struct spdk_nvmf_rdma_transport *rtransport;
|
||||
struct spdk_nvmf_rdma_qpair *rqpair = NULL;
|
||||
struct spdk_nvmf_rdma_port *port;
|
||||
struct spdk_nvmf_rdma_port *port;
|
||||
struct rdma_conn_param *rdma_param = NULL;
|
||||
const struct spdk_nvmf_rdma_request_private_data *private_data = NULL;
|
||||
uint16_t max_queue_depth;
|
||||
@ -708,9 +708,9 @@ nvmf_rdma_connect(struct spdk_nvmf_transport *transport, struct rdma_cm_event *e
|
||||
static void
|
||||
nvmf_rdma_handle_disconnect(void *ctx)
|
||||
{
|
||||
struct spdk_nvmf_qpair *qpair = ctx;
|
||||
struct spdk_nvmf_qpair *qpair = ctx;
|
||||
struct spdk_nvmf_ctrlr *ctrlr;
|
||||
struct spdk_nvmf_rdma_qpair *rqpair;
|
||||
struct spdk_nvmf_rdma_qpair *rqpair;
|
||||
|
||||
rqpair = SPDK_CONTAINEROF(qpair, struct spdk_nvmf_rdma_qpair, qpair);
|
||||
|
||||
@ -730,7 +730,7 @@ static int
|
||||
nvmf_rdma_disconnect(struct rdma_cm_event *evt)
|
||||
{
|
||||
struct spdk_nvmf_qpair *qpair;
|
||||
struct spdk_io_channel *ch;
|
||||
struct spdk_io_channel *ch;
|
||||
|
||||
if (evt->id == NULL) {
|
||||
SPDK_ERRLOG("disconnect request: missing cm_id\n");
|
||||
@ -1258,7 +1258,7 @@ spdk_nvmf_rdma_listen(struct spdk_nvmf_transport *transport,
|
||||
{
|
||||
struct spdk_nvmf_rdma_transport *rtransport;
|
||||
struct spdk_nvmf_rdma_device *device;
|
||||
struct spdk_nvmf_rdma_port *port_tmp, *port;
|
||||
struct spdk_nvmf_rdma_port *port_tmp, *port;
|
||||
struct addrinfo *res;
|
||||
struct addrinfo hints;
|
||||
int family;
|
||||
@ -1578,8 +1578,8 @@ spdk_nvmf_rdma_poll_group_add(struct spdk_nvmf_transport_poll_group *group,
|
||||
{
|
||||
struct spdk_nvmf_rdma_transport *rtransport;
|
||||
struct spdk_nvmf_rdma_poll_group *rgroup;
|
||||
struct spdk_nvmf_rdma_qpair *rqpair;
|
||||
struct spdk_nvmf_rdma_device *device;
|
||||
struct spdk_nvmf_rdma_qpair *rqpair;
|
||||
struct spdk_nvmf_rdma_device *device;
|
||||
struct spdk_nvmf_rdma_poller *poller;
|
||||
int rc;
|
||||
|
||||
@ -1640,8 +1640,8 @@ spdk_nvmf_rdma_poll_group_remove(struct spdk_nvmf_transport_poll_group *group,
|
||||
struct spdk_nvmf_qpair *qpair)
|
||||
{
|
||||
struct spdk_nvmf_rdma_poll_group *rgroup;
|
||||
struct spdk_nvmf_rdma_qpair *rqpair;
|
||||
struct spdk_nvmf_rdma_device *device;
|
||||
struct spdk_nvmf_rdma_qpair *rqpair;
|
||||
struct spdk_nvmf_rdma_device *device;
|
||||
struct spdk_nvmf_rdma_poller *poller;
|
||||
struct spdk_nvmf_rdma_qpair *rq, *trq;
|
||||
|
||||
|
@ -1549,7 +1549,7 @@ spdk_bdev_scsi_unmap(struct spdk_bdev *bdev, struct spdk_bdev_desc *bdev_desc,
|
||||
{
|
||||
uint8_t *data;
|
||||
struct spdk_bdev_scsi_unmap_ctx *ctx;
|
||||
int desc_count, i;
|
||||
int desc_count, i;
|
||||
int data_len;
|
||||
int rc;
|
||||
|
||||
|
@ -69,7 +69,7 @@ struct spdk_scsi_dev {
|
||||
int num_ports;
|
||||
struct spdk_scsi_port port[SPDK_SCSI_DEV_MAX_PORTS];
|
||||
|
||||
uint8_t protocol_id;
|
||||
uint8_t protocol_id;
|
||||
};
|
||||
|
||||
struct spdk_scsi_lun {
|
||||
|
@ -51,6 +51,17 @@ else
|
||||
fi
|
||||
rm -f comment.log
|
||||
|
||||
echo -n "Checking for spaces before tabs..."
|
||||
git grep --line-number $' \t' -- > whitespace.log || true
|
||||
if [ -s whitespace.log ]; then
|
||||
echo " Spaces before tabs detected"
|
||||
cat whitespace.log
|
||||
rc=1
|
||||
else
|
||||
echo " OK"
|
||||
fi
|
||||
rm -f whitespace.log
|
||||
|
||||
echo -n "Checking trailing whitespace in output strings..."
|
||||
|
||||
git grep --line-number -e ' \\n"' -- '*.[ch]' > whitespace.log || true
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "CUnit/Basic.h"
|
||||
|
||||
#define BUFFER_IOVS 1024
|
||||
#define BUFFER_SIZE 260 * 1024
|
||||
#define BUFFER_SIZE 260 * 1024
|
||||
#define BDEV_TASK_ARRAY_SIZE 2048
|
||||
|
||||
#define LCORE_ID_INIT 0
|
||||
|
@ -275,7 +275,7 @@ bdevperf_complete(struct spdk_bdev_io *bdev_io, bool success, void *cb_arg)
|
||||
{
|
||||
struct io_target *target;
|
||||
struct bdevperf_task *task = cb_arg;
|
||||
struct spdk_event *complete;
|
||||
struct spdk_event *complete;
|
||||
struct iovec *iovs;
|
||||
int iovcnt;
|
||||
|
||||
|
2
test/lib/env/vtophys/vtophys.c
vendored
2
test/lib/env/vtophys/vtophys.c
vendored
@ -149,7 +149,7 @@ mem_map_test(void)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int rc;
|
||||
int rc;
|
||||
struct spdk_env_opts opts;
|
||||
|
||||
spdk_env_opts_init(&opts);
|
||||
|
@ -43,7 +43,7 @@ struct dev {
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_health_information_page *health_page;
|
||||
uint32_t orig_temp_threshold;
|
||||
char name[SPDK_NVMF_TRADDR_MAX_LEN + 1];
|
||||
char name[SPDK_NVMF_TRADDR_MAX_LEN + 1];
|
||||
};
|
||||
|
||||
static void get_feature_test(struct dev *dev);
|
||||
|
@ -48,7 +48,7 @@
|
||||
|
||||
struct dev {
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
char name[SPDK_NVMF_TRADDR_MAX_LEN + 1];
|
||||
char name[SPDK_NVMF_TRADDR_MAX_LEN + 1];
|
||||
};
|
||||
|
||||
static struct dev devs[MAX_DEVS];
|
||||
|
@ -624,7 +624,7 @@ register_controllers(void)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int rc;
|
||||
int rc;
|
||||
struct spdk_env_opts opts;
|
||||
|
||||
rc = parse_args(argc, argv);
|
||||
|
@ -71,7 +71,7 @@ struct reset_task {
|
||||
};
|
||||
|
||||
struct worker_thread {
|
||||
struct ns_worker_ctx *ns_ctx;
|
||||
struct ns_worker_ctx *ns_ctx;
|
||||
unsigned lcore;
|
||||
};
|
||||
|
||||
@ -621,8 +621,8 @@ spdk_reset_free_tasks(void)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int rc;
|
||||
int i;
|
||||
int rc;
|
||||
int i;
|
||||
struct spdk_env_opts opts;
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
struct dev {
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
char name[SPDK_NVMF_TRADDR_MAX_LEN + 1];
|
||||
char name[SPDK_NVMF_TRADDR_MAX_LEN + 1];
|
||||
};
|
||||
|
||||
static struct dev devs[MAX_DEVS];
|
||||
|
@ -47,7 +47,7 @@
|
||||
#define SPDK_CU_ASSERT_FATAL(cond) \
|
||||
do { \
|
||||
int result_ = !!(cond); \
|
||||
CU_ASSERT_FATAL(result_); \
|
||||
CU_ASSERT_FATAL(result_); \
|
||||
if (!result_) { \
|
||||
abort(); \
|
||||
} \
|
||||
|
@ -2905,7 +2905,7 @@ blob_thin_prov_rw(void)
|
||||
struct spdk_bs_dev *dev;
|
||||
struct spdk_blob *blob;
|
||||
struct spdk_io_channel *channel;
|
||||
struct spdk_blob_opts opts;
|
||||
struct spdk_blob_opts opts;
|
||||
spdk_blob_id blobid;
|
||||
uint64_t free_clusters;
|
||||
uint8_t payload_read[10 * 4096];
|
||||
@ -2991,7 +2991,7 @@ blob_thin_prov_rw_iov(void)
|
||||
struct spdk_bs_dev *dev;
|
||||
struct spdk_blob *blob;
|
||||
struct spdk_io_channel *channel;
|
||||
struct spdk_blob_opts opts;
|
||||
struct spdk_blob_opts opts;
|
||||
spdk_blob_id blobid;
|
||||
uint64_t free_clusters;
|
||||
uint8_t payload_read[10 * 4096];
|
||||
|
@ -250,7 +250,7 @@ int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
CU_pSuite suite = NULL;
|
||||
unsigned int num_failures;
|
||||
unsigned int num_failures;
|
||||
|
||||
if (CU_initialize_registry() != CUE_SUCCESS) {
|
||||
return CU_get_error();
|
||||
|
@ -61,7 +61,7 @@ struct spdk_blob {
|
||||
uint32_t ref;
|
||||
int close_status;
|
||||
int open_status;
|
||||
int load_status;
|
||||
int load_status;
|
||||
TAILQ_ENTRY(spdk_blob) link;
|
||||
char uuid[UUID_STRING_LEN];
|
||||
char name[SPDK_LVS_NAME_MAX];
|
||||
|
@ -1345,7 +1345,7 @@ test_nvme_ctrlr_construct_intel_support_log_page_list(void)
|
||||
bool res;
|
||||
struct spdk_nvme_ctrlr ctrlr = {};
|
||||
struct spdk_nvme_intel_log_page_directory payload = {};
|
||||
struct spdk_pci_id pci_id = {};
|
||||
struct spdk_pci_id pci_id = {};
|
||||
|
||||
/* Get quirks for a device with all 0 vendor/device id */
|
||||
ctrlr.quirks = nvme_get_quirks(&pci_id);
|
||||
|
@ -370,7 +370,7 @@ static void
|
||||
ut_insert_cq_entry(struct spdk_nvme_qpair *qpair, uint32_t slot)
|
||||
{
|
||||
struct nvme_request *req;
|
||||
struct nvme_tracker *tr;
|
||||
struct nvme_tracker *tr;
|
||||
struct spdk_nvme_cpl *cpl;
|
||||
|
||||
req = calloc(1, sizeof(*req));
|
||||
@ -437,8 +437,8 @@ test_sgl_req(void)
|
||||
struct nvme_request *req;
|
||||
struct spdk_nvme_ctrlr ctrlr = {};
|
||||
struct nvme_payload payload = {};
|
||||
struct nvme_tracker *sgl_tr = NULL;
|
||||
uint64_t i;
|
||||
struct nvme_tracker *sgl_tr = NULL;
|
||||
uint64_t i;
|
||||
struct io_request io_req = {};
|
||||
|
||||
payload.type = NVME_PAYLOAD_TYPE_SGL;
|
||||
@ -515,8 +515,8 @@ test_hw_sgl_req(void)
|
||||
struct nvme_request *req;
|
||||
struct spdk_nvme_ctrlr ctrlr = {};
|
||||
struct nvme_payload payload = {};
|
||||
struct nvme_tracker *sgl_tr = NULL;
|
||||
uint64_t i;
|
||||
struct nvme_tracker *sgl_tr = NULL;
|
||||
uint64_t i;
|
||||
struct io_request io_req = {};
|
||||
|
||||
payload.type = NVME_PAYLOAD_TYPE_SGL;
|
||||
|
@ -599,7 +599,7 @@ int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
CU_pSuite suite = NULL;
|
||||
unsigned int num_failures;
|
||||
unsigned int num_failures;
|
||||
int rc;
|
||||
|
||||
if (CU_initialize_registry() != CUE_SUCCESS) {
|
||||
|
@ -52,7 +52,7 @@ int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
CU_pSuite suite = NULL;
|
||||
unsigned int num_failures;
|
||||
unsigned int num_failures;
|
||||
|
||||
if (CU_initialize_registry() != CUE_SUCCESS) {
|
||||
return CU_get_error();
|
||||
|
Loading…
x
Reference in New Issue
Block a user