log: simplify SPDK_LOG_REGISTER_COMPONENT
This patch removes the string from register component. Removed are all instances in libs or hardcoded in apps. Starting with this patch literal passed to register, serves as name for the flag. All instances of SPDK_LOG_* were replaced with just * in lowercase. No actual name change for flags occur in this patch. Affected are SPDK_LOG_REGISTER_COMPONENT() and SPDK_*LOG() macros. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I002b232fde57ecf9c6777726b181fc0341f1bb17 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4495 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Mellanox Build Bot Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Community-CI: Broadcom CI
This commit is contained in:
parent
e19b294a22
commit
2172c432cf
@ -56,14 +56,14 @@ void spdk_log_register_flag(const char *name, struct spdk_log_flag *flag);
|
||||
struct spdk_log_flag *spdk_log_get_first_flag(void);
|
||||
struct spdk_log_flag *spdk_log_get_next_flag(struct spdk_log_flag *flag);
|
||||
|
||||
#define SPDK_LOG_REGISTER_COMPONENT(str, FLAG) \
|
||||
#define SPDK_LOG_REGISTER_COMPONENT(FLAG) \
|
||||
struct spdk_log_flag SPDK_LOG_##FLAG = { \
|
||||
.enabled = false, \
|
||||
.name = str, \
|
||||
.name = #FLAG, \
|
||||
}; \
|
||||
__attribute__((constructor)) static void register_flag_##FLAG(void) \
|
||||
{ \
|
||||
spdk_log_register_flag(str, &SPDK_LOG_##FLAG); \
|
||||
spdk_log_register_flag(#FLAG, &SPDK_LOG_##FLAG); \
|
||||
}
|
||||
|
||||
#define SPDK_INFOLOG(FLAG, ...) \
|
||||
|
@ -551,7 +551,7 @@ spdk_bdev_first(void)
|
||||
|
||||
bdev = TAILQ_FIRST(&g_bdev_mgr.bdevs);
|
||||
if (bdev) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Starting bdev iteration at %s\n", bdev->name);
|
||||
SPDK_DEBUGLOG(bdev, "Starting bdev iteration at %s\n", bdev->name);
|
||||
}
|
||||
|
||||
return bdev;
|
||||
@ -564,7 +564,7 @@ spdk_bdev_next(struct spdk_bdev *prev)
|
||||
|
||||
bdev = TAILQ_NEXT(prev, internal.link);
|
||||
if (bdev) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Continuing bdev iteration at %s\n", bdev->name);
|
||||
SPDK_DEBUGLOG(bdev, "Continuing bdev iteration at %s\n", bdev->name);
|
||||
}
|
||||
|
||||
return bdev;
|
||||
@ -592,7 +592,7 @@ spdk_bdev_first_leaf(void)
|
||||
bdev = _bdev_next_leaf(TAILQ_FIRST(&g_bdev_mgr.bdevs));
|
||||
|
||||
if (bdev) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Starting bdev iteration at %s\n", bdev->name);
|
||||
SPDK_DEBUGLOG(bdev, "Starting bdev iteration at %s\n", bdev->name);
|
||||
}
|
||||
|
||||
return bdev;
|
||||
@ -606,7 +606,7 @@ spdk_bdev_next_leaf(struct spdk_bdev *prev)
|
||||
bdev = _bdev_next_leaf(TAILQ_NEXT(prev, internal.link));
|
||||
|
||||
if (bdev) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Continuing bdev iteration at %s\n", bdev->name);
|
||||
SPDK_DEBUGLOG(bdev, "Continuing bdev iteration at %s\n", bdev->name);
|
||||
}
|
||||
|
||||
return bdev;
|
||||
@ -1478,7 +1478,7 @@ bdev_finish_unregister_bdevs_iter(void *cb_arg, int bdeverrno)
|
||||
}
|
||||
|
||||
if (TAILQ_EMPTY(&g_bdev_mgr.bdevs)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Done unregistering bdevs\n");
|
||||
SPDK_DEBUGLOG(bdev, "Done unregistering bdevs\n");
|
||||
/*
|
||||
* Bdev module finish need to be deferred as we might be in the middle of some context
|
||||
* (like bdev part free) that will use this bdev (or private bdev driver ctx data)
|
||||
@ -1499,12 +1499,12 @@ bdev_finish_unregister_bdevs_iter(void *cb_arg, int bdeverrno)
|
||||
for (bdev = TAILQ_LAST(&g_bdev_mgr.bdevs, spdk_bdev_list);
|
||||
bdev; bdev = TAILQ_PREV(bdev, spdk_bdev_list, internal.link)) {
|
||||
if (bdev->internal.claim_module != NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Skipping claimed bdev '%s'(<-'%s').\n",
|
||||
SPDK_DEBUGLOG(bdev, "Skipping claimed bdev '%s'(<-'%s').\n",
|
||||
bdev->name, bdev->internal.claim_module->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Unregistering bdev '%s'\n", bdev->name);
|
||||
SPDK_DEBUGLOG(bdev, "Unregistering bdev '%s'\n", bdev->name);
|
||||
spdk_bdev_unregister(bdev, bdev_finish_unregister_bdevs_iter, bdev);
|
||||
return;
|
||||
}
|
||||
@ -2458,7 +2458,7 @@ bdev_enable_qos(struct spdk_bdev *bdev, struct spdk_bdev_channel *ch)
|
||||
if (qos->ch == NULL) {
|
||||
struct spdk_io_channel *io_ch;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Selecting channel %p as QoS channel for bdev %s on thread %p\n", ch,
|
||||
SPDK_DEBUGLOG(bdev, "Selecting channel %p as QoS channel for bdev %s on thread %p\n", ch,
|
||||
bdev->name, spdk_get_thread());
|
||||
|
||||
/* No qos channel has been selected, so set one up */
|
||||
@ -2831,7 +2831,7 @@ bdev_qos_channel_destroy(void *cb_arg)
|
||||
spdk_put_io_channel(spdk_io_channel_from_ctx(qos->ch));
|
||||
spdk_poller_unregister(&qos->poller);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Free QoS %p.\n", qos);
|
||||
SPDK_DEBUGLOG(bdev, "Free QoS %p.\n", qos);
|
||||
|
||||
free(qos);
|
||||
}
|
||||
@ -2915,7 +2915,7 @@ bdev_channel_destroy(void *io_device, void *ctx_buf)
|
||||
struct spdk_bdev_mgmt_channel *mgmt_ch;
|
||||
struct spdk_bdev_shared_resource *shared_resource = ch->shared_resource;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Destroying channel %p for bdev %s on thread %p\n", ch, ch->bdev->name,
|
||||
SPDK_DEBUGLOG(bdev, "Destroying channel %p for bdev %s on thread %p\n", ch, ch->bdev->name,
|
||||
spdk_get_thread());
|
||||
|
||||
/* This channel is going away, so add its statistics into the bdev so that they don't get lost. */
|
||||
@ -2984,7 +2984,7 @@ spdk_bdev_alias_del(struct spdk_bdev *bdev, const char *alias)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_BDEV, "Alias %s does not exists\n", alias);
|
||||
SPDK_INFOLOG(bdev, "Alias %s does not exists\n", alias);
|
||||
|
||||
return -ENOENT;
|
||||
}
|
||||
@ -5260,7 +5260,7 @@ bdev_qos_config_limit(struct spdk_bdev *bdev, uint64_t *limits)
|
||||
|
||||
for (i = 0; i < SPDK_BDEV_QOS_NUM_RATE_LIMIT_TYPES; i++) {
|
||||
bdev->internal.qos->rate_limits[i].limit = limits[i];
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Bdev:%s QoS type:%d set:%lu\n",
|
||||
SPDK_DEBUGLOG(bdev, "Bdev:%s QoS type:%d set:%lu\n",
|
||||
bdev->name, i, limits[i]);
|
||||
}
|
||||
|
||||
@ -5436,7 +5436,7 @@ bdev_fini(struct spdk_bdev *bdev)
|
||||
static void
|
||||
bdev_start(struct spdk_bdev *bdev)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Inserting bdev %s into list\n", bdev->name);
|
||||
SPDK_DEBUGLOG(bdev, "Inserting bdev %s into list\n", bdev->name);
|
||||
TAILQ_INSERT_TAIL(&g_bdev_mgr.bdevs, bdev, internal.link);
|
||||
|
||||
/* Examine configuration before initializing I/O */
|
||||
@ -5526,7 +5526,7 @@ bdev_unregister_unsafe(struct spdk_bdev *bdev)
|
||||
/* If there are no descriptors, proceed removing the bdev */
|
||||
if (rc == 0) {
|
||||
TAILQ_REMOVE(&g_bdev_mgr.bdevs, bdev, internal.link);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Removing bdev %s from list done\n", bdev->name);
|
||||
SPDK_DEBUGLOG(bdev, "Removing bdev %s from list done\n", bdev->name);
|
||||
spdk_notify_send("bdev_unregister", spdk_bdev_get_name(bdev));
|
||||
}
|
||||
|
||||
@ -5539,7 +5539,7 @@ spdk_bdev_unregister(struct spdk_bdev *bdev, spdk_bdev_unregister_cb cb_fn, void
|
||||
struct spdk_thread *thread;
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Removing bdev %s from list\n", bdev->name);
|
||||
SPDK_DEBUGLOG(bdev, "Removing bdev %s from list\n", bdev->name);
|
||||
|
||||
thread = spdk_get_thread();
|
||||
if (!thread) {
|
||||
@ -5578,7 +5578,7 @@ spdk_bdev_unregister(struct spdk_bdev *bdev, spdk_bdev_unregister_cb cb_fn, void
|
||||
static void
|
||||
bdev_dummy_event_cb(void *remove_ctx)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Bdev remove event received with no remove callback specified");
|
||||
SPDK_DEBUGLOG(bdev, "Bdev remove event received with no remove callback specified");
|
||||
}
|
||||
|
||||
static int
|
||||
@ -5614,7 +5614,7 @@ bdev_open(struct spdk_bdev *bdev, bool write, struct spdk_bdev_desc *desc)
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Opening descriptor %p for bdev %s on thread %p\n", desc, bdev->name,
|
||||
SPDK_DEBUGLOG(bdev, "Opening descriptor %p for bdev %s on thread %p\n", desc, bdev->name,
|
||||
spdk_get_thread());
|
||||
|
||||
desc->bdev = bdev;
|
||||
@ -5762,7 +5762,7 @@ spdk_bdev_close(struct spdk_bdev_desc *desc)
|
||||
struct spdk_bdev *bdev = spdk_bdev_desc_get_bdev(desc);
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Closing descriptor %p for bdev %s on thread %p\n", desc, bdev->name,
|
||||
SPDK_DEBUGLOG(bdev, "Closing descriptor %p for bdev %s on thread %p\n", desc, bdev->name,
|
||||
spdk_get_thread());
|
||||
|
||||
assert(desc->thread == spdk_get_thread());
|
||||
@ -5785,7 +5785,7 @@ spdk_bdev_close(struct spdk_bdev_desc *desc)
|
||||
|
||||
/* If no more descriptors, kill QoS channel */
|
||||
if (bdev->internal.qos && TAILQ_EMPTY(&bdev->internal.open_descs)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Closed last descriptor for bdev %s on thread %p. Stopping QoS.\n",
|
||||
SPDK_DEBUGLOG(bdev, "Closed last descriptor for bdev %s on thread %p. Stopping QoS.\n",
|
||||
bdev->name, spdk_get_thread());
|
||||
|
||||
if (bdev_qos_destroy(bdev)) {
|
||||
@ -6815,7 +6815,7 @@ bdev_unlock_lba_range(struct spdk_bdev_desc *desc, struct spdk_io_channel *_ch,
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("bdev", SPDK_LOG_BDEV)
|
||||
SPDK_LOG_REGISTER_COMPONENT(bdev)
|
||||
|
||||
SPDK_TRACE_REGISTER_FN(bdev_trace, "bdev", TRACE_GROUP_BDEV)
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ bs_claim_cluster(struct spdk_blob_store *bs)
|
||||
return UINT32_MAX;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Claiming cluster %u\n", cluster_num);
|
||||
SPDK_DEBUGLOG(blob, "Claiming cluster %u\n", cluster_num);
|
||||
bs->num_free_clusters--;
|
||||
|
||||
return cluster_num;
|
||||
@ -129,7 +129,7 @@ bs_release_cluster(struct spdk_blob_store *bs, uint32_t cluster_num)
|
||||
assert(spdk_bit_pool_is_allocated(bs->used_clusters, cluster_num) == true);
|
||||
assert(bs->num_free_clusters < bs->total_clusters);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Releasing cluster %u\n", cluster_num);
|
||||
SPDK_DEBUGLOG(blob, "Releasing cluster %u\n", cluster_num);
|
||||
|
||||
spdk_bit_pool_free_bit(bs->used_clusters, cluster_num);
|
||||
bs->num_free_clusters++;
|
||||
@ -177,7 +177,7 @@ bs_allocate_cluster(struct spdk_blob *blob, uint32_t cluster_num,
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Claiming cluster %lu for blob %lu\n", *cluster, blob->id);
|
||||
SPDK_DEBUGLOG(blob, "Claiming cluster %lu for blob %lu\n", *cluster, blob->id);
|
||||
|
||||
if (update_map) {
|
||||
blob_insert_cluster(blob, cluster_num, *cluster);
|
||||
@ -2029,7 +2029,7 @@ blob_persist_generate_new_md(struct spdk_blob_persist_ctx *ctx)
|
||||
ctx->pages[i - 1].crc = blob_md_page_calc_crc(&ctx->pages[i - 1]);
|
||||
blob->active.pages[i] = page_num;
|
||||
bs_claim_md_page(bs, page_num);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Claiming page %u for blob %lu\n", page_num, blob->id);
|
||||
SPDK_DEBUGLOG(blob, "Claiming page %u for blob %lu\n", page_num, blob->id);
|
||||
page_num++;
|
||||
}
|
||||
ctx->pages[i - 1].crc = blob_md_page_calc_crc(&ctx->pages[i - 1]);
|
||||
@ -3177,7 +3177,7 @@ bs_alloc(struct spdk_bs_dev *dev, struct spdk_bs_opts *opts, struct spdk_blob_st
|
||||
dev_size = dev->blocklen * dev->blockcnt;
|
||||
if (dev_size < opts->cluster_sz) {
|
||||
/* Device size cannot be smaller than cluster size of blobstore */
|
||||
SPDK_INFOLOG(SPDK_LOG_BLOB, "Device size %" PRIu64 " is smaller than cluster size %" PRIu32 "\n",
|
||||
SPDK_INFOLOG(blob, "Device size %" PRIu64 " is smaller than cluster size %" PRIu32 "\n",
|
||||
dev_size, opts->cluster_sz);
|
||||
return -ENOSPC;
|
||||
}
|
||||
@ -4191,13 +4191,13 @@ bs_load_super_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno)
|
||||
}
|
||||
|
||||
if (memcmp(&ctx->bs->bstype, &ctx->super->bstype, SPDK_BLOBSTORE_TYPE_LENGTH) == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Bstype matched - loading blobstore\n");
|
||||
SPDK_DEBUGLOG(blob, "Bstype matched - loading blobstore\n");
|
||||
} else if (memcmp(&ctx->bs->bstype, zeros, SPDK_BLOBSTORE_TYPE_LENGTH) == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Bstype wildcard used - loading blobstore regardless bstype\n");
|
||||
SPDK_DEBUGLOG(blob, "Bstype wildcard used - loading blobstore regardless bstype\n");
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Unexpected bstype\n");
|
||||
SPDK_LOGDUMP(SPDK_LOG_BLOB, "Expected:", ctx->bs->bstype.bstype, SPDK_BLOBSTORE_TYPE_LENGTH);
|
||||
SPDK_LOGDUMP(SPDK_LOG_BLOB, "Found:", ctx->super->bstype.bstype, SPDK_BLOBSTORE_TYPE_LENGTH);
|
||||
SPDK_DEBUGLOG(blob, "Unexpected bstype\n");
|
||||
SPDK_LOGDUMP(blob, "Expected:", ctx->bs->bstype.bstype, SPDK_BLOBSTORE_TYPE_LENGTH);
|
||||
SPDK_LOGDUMP(blob, "Found:", ctx->super->bstype.bstype, SPDK_BLOBSTORE_TYPE_LENGTH);
|
||||
bs_load_ctx_fail(ctx, -ENXIO);
|
||||
return;
|
||||
}
|
||||
@ -4255,10 +4255,10 @@ spdk_bs_load(struct spdk_bs_dev *dev, struct spdk_bs_opts *o,
|
||||
struct spdk_bs_opts opts = {};
|
||||
int err;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Loading blobstore from dev %p\n", dev);
|
||||
SPDK_DEBUGLOG(blob, "Loading blobstore from dev %p\n", dev);
|
||||
|
||||
if ((SPDK_BS_PAGE_SIZE % dev->blocklen) != 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "unsupported dev block length of %d\n", dev->blocklen);
|
||||
SPDK_DEBUGLOG(blob, "unsupported dev block length of %d\n", dev->blocklen);
|
||||
dev->destroy(dev);
|
||||
cb_fn(cb_arg, NULL, -EINVAL);
|
||||
return;
|
||||
@ -4521,7 +4521,7 @@ spdk_bs_dump(struct spdk_bs_dev *dev, FILE *fp, spdk_bs_dump_print_xattr print_x
|
||||
struct spdk_bs_opts opts = {};
|
||||
int err;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Dumping blobstore from dev %p\n", dev);
|
||||
SPDK_DEBUGLOG(blob, "Dumping blobstore from dev %p\n", dev);
|
||||
|
||||
spdk_bs_opts_init(&opts);
|
||||
|
||||
@ -4598,7 +4598,7 @@ spdk_bs_init(struct spdk_bs_dev *dev, struct spdk_bs_opts *o,
|
||||
int rc;
|
||||
uint64_t lba, lba_count;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Initializing blobstore on dev %p\n", dev);
|
||||
SPDK_DEBUGLOG(blob, "Initializing blobstore on dev %p\n", dev);
|
||||
|
||||
if ((SPDK_BS_PAGE_SIZE % dev->blocklen) != 0) {
|
||||
SPDK_ERRLOG("unsupported dev block length of %d\n",
|
||||
@ -4813,7 +4813,7 @@ spdk_bs_destroy(struct spdk_blob_store *bs, spdk_bs_op_complete cb_fn,
|
||||
spdk_bs_sequence_t *seq;
|
||||
struct spdk_bs_load_ctx *ctx;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Destroying blobstore\n");
|
||||
SPDK_DEBUGLOG(blob, "Destroying blobstore\n");
|
||||
|
||||
if (!TAILQ_EMPTY(&bs->blobs)) {
|
||||
SPDK_ERRLOG("Blobstore still has open blobs\n");
|
||||
@ -4948,7 +4948,7 @@ spdk_bs_unload(struct spdk_blob_store *bs, spdk_bs_op_complete cb_fn, void *cb_a
|
||||
struct spdk_bs_cpl cpl;
|
||||
struct spdk_bs_load_ctx *ctx;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Syncing blobstore\n");
|
||||
SPDK_DEBUGLOG(blob, "Syncing blobstore\n");
|
||||
|
||||
if (!TAILQ_EMPTY(&bs->blobs)) {
|
||||
SPDK_ERRLOG("Blobstore still has open blobs\n");
|
||||
@ -5039,7 +5039,7 @@ spdk_bs_set_super(struct spdk_blob_store *bs, spdk_blob_id blobid,
|
||||
spdk_bs_sequence_t *seq;
|
||||
struct spdk_bs_set_super_ctx *ctx;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Setting super blob id on blobstore\n");
|
||||
SPDK_DEBUGLOG(blob, "Setting super blob id on blobstore\n");
|
||||
|
||||
ctx = calloc(1, sizeof(*ctx));
|
||||
if (!ctx) {
|
||||
@ -5237,7 +5237,7 @@ bs_create_blob(struct spdk_blob_store *bs,
|
||||
|
||||
id = bs_page_to_blobid(page_idx);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Creating blob with id %lu at page %u\n", id, page_idx);
|
||||
SPDK_DEBUGLOG(blob, "Creating blob with id %lu at page %u\n", id, page_idx);
|
||||
|
||||
blob = blob_alloc(bs, id);
|
||||
if (!blob) {
|
||||
@ -5654,7 +5654,7 @@ bs_snapshot_origblob_open_cpl(void *cb_arg, struct spdk_blob *_blob, int bserrno
|
||||
ctx->original.blob = _blob;
|
||||
|
||||
if (_blob->data_ro || _blob->md_ro) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Cannot create snapshot from read only blob with id %lu\n",
|
||||
SPDK_DEBUGLOG(blob, "Cannot create snapshot from read only blob with id %lu\n",
|
||||
_blob->id);
|
||||
ctx->bserrno = -EINVAL;
|
||||
spdk_blob_close(_blob, bs_clone_snapshot_cleanup_finish, ctx);
|
||||
@ -5662,7 +5662,7 @@ bs_snapshot_origblob_open_cpl(void *cb_arg, struct spdk_blob *_blob, int bserrno
|
||||
}
|
||||
|
||||
if (_blob->locked_operation_in_progress) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Cannot create snapshot - another operation in progress\n");
|
||||
SPDK_DEBUGLOG(blob, "Cannot create snapshot - another operation in progress\n");
|
||||
ctx->bserrno = -EBUSY;
|
||||
spdk_blob_close(_blob, bs_clone_snapshot_cleanup_finish, ctx);
|
||||
return;
|
||||
@ -5766,14 +5766,14 @@ bs_clone_origblob_open_cpl(void *cb_arg, struct spdk_blob *_blob, int bserrno)
|
||||
ctx->original.blob = _blob;
|
||||
|
||||
if (!_blob->data_ro || !_blob->md_ro) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Clone not from read-only blob\n");
|
||||
SPDK_DEBUGLOG(blob, "Clone not from read-only blob\n");
|
||||
ctx->bserrno = -EINVAL;
|
||||
spdk_blob_close(_blob, bs_clone_snapshot_cleanup_finish, ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_blob->locked_operation_in_progress) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Cannot create clone - another operation in progress\n");
|
||||
SPDK_DEBUGLOG(blob, "Cannot create clone - another operation in progress\n");
|
||||
ctx->bserrno = -EBUSY;
|
||||
spdk_blob_close(_blob, bs_clone_snapshot_cleanup_finish, ctx);
|
||||
return;
|
||||
@ -5955,7 +5955,7 @@ bs_inflate_blob_open_cpl(void *cb_arg, struct spdk_blob *_blob, int bserrno)
|
||||
ctx->original.blob = _blob;
|
||||
|
||||
if (_blob->locked_operation_in_progress) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Cannot inflate blob - another operation in progress\n");
|
||||
SPDK_DEBUGLOG(blob, "Cannot inflate blob - another operation in progress\n");
|
||||
ctx->bserrno = -EBUSY;
|
||||
spdk_blob_close(_blob, bs_clone_snapshot_cleanup_finish, ctx);
|
||||
return;
|
||||
@ -6085,7 +6085,7 @@ spdk_blob_resize(struct spdk_blob *blob, uint64_t sz, spdk_blob_op_complete cb_f
|
||||
|
||||
blob_verify_md_op(blob);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Resizing blob %lu to %lu clusters\n", blob->id, sz);
|
||||
SPDK_DEBUGLOG(blob, "Resizing blob %lu to %lu clusters\n", blob->id, sz);
|
||||
|
||||
if (blob->md_ro) {
|
||||
cb_fn(cb_arg, -EPERM);
|
||||
@ -6426,7 +6426,7 @@ delete_snapshot_open_clone_cb(void *cb_arg, struct spdk_blob *clone, int bserrno
|
||||
ctx->clone = clone;
|
||||
|
||||
if (clone->locked_operation_in_progress) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Cannot remove blob - another operation in progress on its clone\n");
|
||||
SPDK_DEBUGLOG(blob, "Cannot remove blob - another operation in progress on its clone\n");
|
||||
ctx->bserrno = -EBUSY;
|
||||
spdk_blob_close(ctx->clone, delete_snapshot_cleanup_snapshot, ctx);
|
||||
return;
|
||||
@ -6579,7 +6579,7 @@ bs_delete_open_cpl(void *cb_arg, struct spdk_blob *blob, int bserrno)
|
||||
}
|
||||
|
||||
if (blob->locked_operation_in_progress) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Cannot remove blob - another operation in progress\n");
|
||||
SPDK_DEBUGLOG(blob, "Cannot remove blob - another operation in progress\n");
|
||||
ctx->bserrno = -EBUSY;
|
||||
spdk_blob_close(blob, delete_blob_cleanup_finish, ctx);
|
||||
return;
|
||||
@ -6612,7 +6612,7 @@ spdk_bs_delete_blob(struct spdk_blob_store *bs, spdk_blob_id blobid,
|
||||
struct spdk_bs_cpl cpl;
|
||||
spdk_bs_sequence_t *seq;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Deleting blob %lu\n", blobid);
|
||||
SPDK_DEBUGLOG(blob, "Deleting blob %lu\n", blobid);
|
||||
|
||||
assert(spdk_get_thread() == bs->md_thread);
|
||||
|
||||
@ -6676,7 +6676,7 @@ bs_open_blob(struct spdk_blob_store *bs,
|
||||
spdk_bs_sequence_t *seq;
|
||||
uint32_t page_num;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Opening blob %lu\n", blobid);
|
||||
SPDK_DEBUGLOG(blob, "Opening blob %lu\n", blobid);
|
||||
assert(spdk_get_thread() == bs->md_thread);
|
||||
|
||||
page_num = bs_blobid_to_page(blobid);
|
||||
@ -6786,7 +6786,7 @@ spdk_blob_sync_md(struct spdk_blob *blob, spdk_blob_op_complete cb_fn, void *cb_
|
||||
{
|
||||
blob_verify_md_op(blob);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Syncing blob %lu\n", blob->id);
|
||||
SPDK_DEBUGLOG(blob, "Syncing blob %lu\n", blob->id);
|
||||
|
||||
if (blob->md_ro) {
|
||||
assert(blob->state == SPDK_BLOB_STATE_CLEAN);
|
||||
@ -6975,7 +6975,7 @@ void spdk_blob_close(struct spdk_blob *blob, spdk_blob_op_complete cb_fn, void *
|
||||
|
||||
blob_verify_md_op(blob);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Closing blob %lu\n", blob->id);
|
||||
SPDK_DEBUGLOG(blob, "Closing blob %lu\n", blob->id);
|
||||
|
||||
if (blob->open_ref == 0) {
|
||||
cb_fn(cb_arg, -EBADF);
|
||||
@ -7154,7 +7154,7 @@ blob_set_xattr(struct spdk_blob *blob, const char *name, const void *value,
|
||||
|
||||
desc_size = sizeof(struct spdk_blob_md_descriptor_xattr) + strlen(name) + value_len;
|
||||
if (desc_size > SPDK_BS_MAX_DESC_SIZE) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Xattr '%s' of size %ld does not fix into single page %ld\n", name,
|
||||
SPDK_DEBUGLOG(blob, "Xattr '%s' of size %ld does not fix into single page %ld\n", name,
|
||||
desc_size, SPDK_BS_MAX_DESC_SIZE);
|
||||
return -ENOMEM;
|
||||
}
|
||||
@ -7461,4 +7461,4 @@ spdk_blob_get_clones(struct spdk_blob_store *bs, spdk_blob_id blobid, spdk_blob_
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("blob", SPDK_LOG_BLOB)
|
||||
SPDK_LOG_REGISTER_COMPONENT(blob)
|
||||
|
@ -133,7 +133,7 @@ bs_sequence_read_bs_dev(spdk_bs_sequence_t *seq, struct spdk_bs_dev *bs_dev,
|
||||
struct spdk_bs_request_set *set = (struct spdk_bs_request_set *)seq;
|
||||
struct spdk_bs_channel *channel = set->channel;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB_RW, "Reading %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
SPDK_DEBUGLOG(blob_rw, "Reading %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
lba);
|
||||
|
||||
set->u.sequence.cb_fn = cb_fn;
|
||||
@ -150,7 +150,7 @@ bs_sequence_read_dev(spdk_bs_sequence_t *seq, void *payload,
|
||||
struct spdk_bs_request_set *set = (struct spdk_bs_request_set *)seq;
|
||||
struct spdk_bs_channel *channel = set->channel;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB_RW, "Reading %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
SPDK_DEBUGLOG(blob_rw, "Reading %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
lba);
|
||||
|
||||
set->u.sequence.cb_fn = cb_fn;
|
||||
@ -167,7 +167,7 @@ bs_sequence_write_dev(spdk_bs_sequence_t *seq, void *payload,
|
||||
struct spdk_bs_request_set *set = (struct spdk_bs_request_set *)seq;
|
||||
struct spdk_bs_channel *channel = set->channel;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB_RW, "Writing %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
SPDK_DEBUGLOG(blob_rw, "Writing %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
lba);
|
||||
|
||||
set->u.sequence.cb_fn = cb_fn;
|
||||
@ -185,7 +185,7 @@ bs_sequence_readv_bs_dev(spdk_bs_sequence_t *seq, struct spdk_bs_dev *bs_dev,
|
||||
struct spdk_bs_request_set *set = (struct spdk_bs_request_set *)seq;
|
||||
struct spdk_bs_channel *channel = set->channel;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB_RW, "Reading %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
SPDK_DEBUGLOG(blob_rw, "Reading %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
lba);
|
||||
|
||||
set->u.sequence.cb_fn = cb_fn;
|
||||
@ -202,7 +202,7 @@ bs_sequence_readv_dev(spdk_bs_sequence_t *seq, struct iovec *iov, int iovcnt,
|
||||
struct spdk_bs_request_set *set = (struct spdk_bs_request_set *)seq;
|
||||
struct spdk_bs_channel *channel = set->channel;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB_RW, "Reading %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
SPDK_DEBUGLOG(blob_rw, "Reading %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
lba);
|
||||
|
||||
set->u.sequence.cb_fn = cb_fn;
|
||||
@ -219,7 +219,7 @@ bs_sequence_writev_dev(spdk_bs_sequence_t *seq, struct iovec *iov, int iovcnt,
|
||||
struct spdk_bs_request_set *set = (struct spdk_bs_request_set *)seq;
|
||||
struct spdk_bs_channel *channel = set->channel;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB_RW, "Writing %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
SPDK_DEBUGLOG(blob_rw, "Writing %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
lba);
|
||||
|
||||
set->u.sequence.cb_fn = cb_fn;
|
||||
@ -237,7 +237,7 @@ bs_sequence_write_zeroes_dev(spdk_bs_sequence_t *seq,
|
||||
struct spdk_bs_request_set *set = (struct spdk_bs_request_set *)seq;
|
||||
struct spdk_bs_channel *channel = set->channel;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB_RW, "writing zeroes to %" PRIu32 " blocks at LBA %" PRIu64 "\n",
|
||||
SPDK_DEBUGLOG(blob_rw, "writing zeroes to %" PRIu32 " blocks at LBA %" PRIu64 "\n",
|
||||
lba_count, lba);
|
||||
|
||||
set->u.sequence.cb_fn = cb_fn;
|
||||
@ -323,7 +323,7 @@ bs_batch_read_bs_dev(spdk_bs_batch_t *batch, struct spdk_bs_dev *bs_dev,
|
||||
struct spdk_bs_request_set *set = (struct spdk_bs_request_set *)batch;
|
||||
struct spdk_bs_channel *channel = set->channel;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB_RW, "Reading %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
SPDK_DEBUGLOG(blob_rw, "Reading %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
lba);
|
||||
|
||||
set->u.batch.outstanding_ops++;
|
||||
@ -337,7 +337,7 @@ bs_batch_read_dev(spdk_bs_batch_t *batch, void *payload,
|
||||
struct spdk_bs_request_set *set = (struct spdk_bs_request_set *)batch;
|
||||
struct spdk_bs_channel *channel = set->channel;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB_RW, "Reading %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
SPDK_DEBUGLOG(blob_rw, "Reading %" PRIu32 " blocks from LBA %" PRIu64 "\n", lba_count,
|
||||
lba);
|
||||
|
||||
set->u.batch.outstanding_ops++;
|
||||
@ -351,7 +351,7 @@ bs_batch_write_dev(spdk_bs_batch_t *batch, void *payload,
|
||||
struct spdk_bs_request_set *set = (struct spdk_bs_request_set *)batch;
|
||||
struct spdk_bs_channel *channel = set->channel;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB_RW, "Writing %" PRIu32 " blocks to LBA %" PRIu64 "\n", lba_count, lba);
|
||||
SPDK_DEBUGLOG(blob_rw, "Writing %" PRIu32 " blocks to LBA %" PRIu64 "\n", lba_count, lba);
|
||||
|
||||
set->u.batch.outstanding_ops++;
|
||||
channel->dev->write(channel->dev, channel->dev_channel, payload, lba, lba_count,
|
||||
@ -365,7 +365,7 @@ bs_batch_unmap_dev(spdk_bs_batch_t *batch,
|
||||
struct spdk_bs_request_set *set = (struct spdk_bs_request_set *)batch;
|
||||
struct spdk_bs_channel *channel = set->channel;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB_RW, "Unmapping %" PRIu32 " blocks at LBA %" PRIu64 "\n", lba_count,
|
||||
SPDK_DEBUGLOG(blob_rw, "Unmapping %" PRIu32 " blocks at LBA %" PRIu64 "\n", lba_count,
|
||||
lba);
|
||||
|
||||
set->u.batch.outstanding_ops++;
|
||||
@ -380,7 +380,7 @@ bs_batch_write_zeroes_dev(spdk_bs_batch_t *batch,
|
||||
struct spdk_bs_request_set *set = (struct spdk_bs_request_set *)batch;
|
||||
struct spdk_bs_channel *channel = set->channel;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOB_RW, "Zeroing %" PRIu32 " blocks at LBA %" PRIu64 "\n", lba_count, lba);
|
||||
SPDK_DEBUGLOG(blob_rw, "Zeroing %" PRIu32 " blocks at LBA %" PRIu64 "\n", lba_count, lba);
|
||||
|
||||
set->u.batch.outstanding_ops++;
|
||||
channel->dev->write_zeroes(channel->dev, channel->dev_channel, lba, lba_count,
|
||||
@ -518,4 +518,4 @@ bs_sequence_to_batch_completion(void *cb_arg, int bserrno)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("blob_rw", SPDK_LOG_BLOB_RW)
|
||||
SPDK_LOG_REGISTER_COMPONENT(blob_rw)
|
||||
|
@ -46,10 +46,10 @@
|
||||
#include "spdk/trace.h"
|
||||
|
||||
#define BLOBFS_TRACE(file, str, args...) \
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "file=%s " str, file->name, ##args)
|
||||
SPDK_DEBUGLOG(blobfs, "file=%s " str, file->name, ##args)
|
||||
|
||||
#define BLOBFS_TRACE_RW(file, str, args...) \
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS_RW, "file=%s " str, file->name, ##args)
|
||||
SPDK_DEBUGLOG(blobfs_rw, "file=%s " str, file->name, ##args)
|
||||
|
||||
#define BLOBFS_DEFAULT_CACHE_SIZE (4ULL * 1024 * 1024 * 1024)
|
||||
#define SPDK_BLOBFS_DEFAULT_OPTS_CLUSTER_SZ (1024 * 1024)
|
||||
@ -787,7 +787,7 @@ iter_cb(void *ctx, struct spdk_blob *blob, int rc)
|
||||
f->length_flushed = *length;
|
||||
f->length_xattr = *length;
|
||||
f->append_pos = *length;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "added file %s length=%ju\n", f->name, f->length);
|
||||
SPDK_DEBUGLOG(blobfs, "added file %s length=%ju\n", f->name, f->length);
|
||||
} else {
|
||||
struct spdk_deleted_file *deleted_file;
|
||||
|
||||
@ -823,11 +823,11 @@ load_cb(void *ctx, struct spdk_blob_store *bs, int bserrno)
|
||||
bstype = spdk_bs_get_bstype(bs);
|
||||
|
||||
if (!memcmp(&bstype, &zeros, sizeof(bstype))) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "assigning bstype\n");
|
||||
SPDK_DEBUGLOG(blobfs, "assigning bstype\n");
|
||||
spdk_bs_set_bstype(bs, blobfs_type);
|
||||
} else if (memcmp(&bstype, &blobfs_type, sizeof(bstype))) {
|
||||
SPDK_ERRLOG("not blobfs\n");
|
||||
SPDK_LOGDUMP(SPDK_LOG_BLOBFS, "bstype", &bstype, sizeof(bstype));
|
||||
SPDK_LOGDUMP(blobfs, "bstype", &bstype, sizeof(bstype));
|
||||
args->fn.fs_op_with_handle(args->arg, NULL, -EINVAL);
|
||||
free_fs_request(req);
|
||||
fs_free_io_channels(fs);
|
||||
@ -1143,7 +1143,7 @@ __fs_create_file_done(void *arg, int fserrno)
|
||||
struct spdk_fs_cb_args *args = &req->args;
|
||||
|
||||
__wake_caller(args, fserrno);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "file=%s\n", args->op.create.name);
|
||||
SPDK_DEBUGLOG(blobfs, "file=%s\n", args->op.create.name);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1152,7 +1152,7 @@ __fs_create_file(void *arg)
|
||||
struct spdk_fs_request *req = arg;
|
||||
struct spdk_fs_cb_args *args = &req->args;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "file=%s\n", args->op.create.name);
|
||||
SPDK_DEBUGLOG(blobfs, "file=%s\n", args->op.create.name);
|
||||
spdk_fs_create_file_async(args->fs, args->op.create.name, __fs_create_file_done, req);
|
||||
}
|
||||
|
||||
@ -1164,7 +1164,7 @@ spdk_fs_create_file(struct spdk_filesystem *fs, struct spdk_fs_thread_ctx *ctx,
|
||||
struct spdk_fs_cb_args *args;
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "file=%s\n", name);
|
||||
SPDK_DEBUGLOG(blobfs, "file=%s\n", name);
|
||||
|
||||
req = alloc_fs_request(channel);
|
||||
if (req == NULL) {
|
||||
@ -1290,7 +1290,7 @@ __fs_open_file_done(void *arg, struct spdk_file *file, int bserrno)
|
||||
|
||||
args->file = file;
|
||||
__wake_caller(args, bserrno);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "file=%s\n", args->op.open.name);
|
||||
SPDK_DEBUGLOG(blobfs, "file=%s\n", args->op.open.name);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1299,7 +1299,7 @@ __fs_open_file(void *arg)
|
||||
struct spdk_fs_request *req = arg;
|
||||
struct spdk_fs_cb_args *args = &req->args;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "file=%s\n", args->op.open.name);
|
||||
SPDK_DEBUGLOG(blobfs, "file=%s\n", args->op.open.name);
|
||||
spdk_fs_open_file_async(args->fs, args->op.open.name, args->op.open.flags,
|
||||
__fs_open_file_done, req);
|
||||
}
|
||||
@ -1313,7 +1313,7 @@ spdk_fs_open_file(struct spdk_filesystem *fs, struct spdk_fs_thread_ctx *ctx,
|
||||
struct spdk_fs_cb_args *args;
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "file=%s\n", name);
|
||||
SPDK_DEBUGLOG(blobfs, "file=%s\n", name);
|
||||
|
||||
req = alloc_fs_request(channel);
|
||||
if (req == NULL) {
|
||||
@ -1395,7 +1395,7 @@ spdk_fs_rename_file_async(struct spdk_filesystem *fs,
|
||||
struct spdk_fs_request *req;
|
||||
struct spdk_fs_cb_args *args;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "old=%s new=%s\n", old_name, new_name);
|
||||
SPDK_DEBUGLOG(blobfs, "old=%s new=%s\n", old_name, new_name);
|
||||
if (strnlen(new_name, SPDK_FILE_NAME_MAX + 1) == SPDK_FILE_NAME_MAX + 1) {
|
||||
cb_fn(cb_arg, -ENAMETOOLONG);
|
||||
return;
|
||||
@ -1495,7 +1495,7 @@ spdk_fs_delete_file_async(struct spdk_filesystem *fs, const char *name,
|
||||
struct spdk_fs_request *req;
|
||||
struct spdk_fs_cb_args *args;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "file=%s\n", name);
|
||||
SPDK_DEBUGLOG(blobfs, "file=%s\n", name);
|
||||
|
||||
if (strnlen(name, SPDK_FILE_NAME_MAX + 1) == SPDK_FILE_NAME_MAX + 1) {
|
||||
cb_fn(cb_arg, -ENAMETOOLONG);
|
||||
@ -1575,7 +1575,7 @@ spdk_fs_delete_file(struct spdk_filesystem *fs, struct spdk_fs_thread_ctx *ctx,
|
||||
|
||||
req = alloc_fs_request(channel);
|
||||
if (req == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "Cannot allocate req to delete file=%s\n", name);
|
||||
SPDK_DEBUGLOG(blobfs, "Cannot allocate req to delete file=%s\n", name);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -1627,7 +1627,7 @@ spdk_file_get_length(struct spdk_file *file)
|
||||
assert(file != NULL);
|
||||
|
||||
length = file->append_pos >= file->length ? file->append_pos : file->length;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "file=%s length=0x%jx\n", file->name, length);
|
||||
SPDK_DEBUGLOG(blobfs, "file=%s length=0x%jx\n", file->name, length);
|
||||
return length;
|
||||
}
|
||||
|
||||
@ -1680,7 +1680,7 @@ spdk_file_truncate_async(struct spdk_file *file, uint64_t length,
|
||||
struct spdk_fs_request *req;
|
||||
struct spdk_fs_cb_args *args;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "file=%s old=0x%jx new=0x%jx\n", file->name, file->length, length);
|
||||
SPDK_DEBUGLOG(blobfs, "file=%s old=0x%jx new=0x%jx\n", file->name, file->length, length);
|
||||
if (length == file->length) {
|
||||
cb_fn(cb_arg, 0);
|
||||
return;
|
||||
@ -1895,7 +1895,7 @@ __readvwritev(struct spdk_file *file, struct spdk_io_channel *_channel,
|
||||
args->op.rw.pin_buf = spdk_malloc(pin_buf_length, lba_size, NULL,
|
||||
SPDK_ENV_SOCKET_ID_ANY, SPDK_MALLOC_DMA);
|
||||
if (args->op.rw.pin_buf == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "Failed to allocate buf for: file=%s offset=%jx length=%jx\n",
|
||||
SPDK_DEBUGLOG(blobfs, "Failed to allocate buf for: file=%s offset=%jx length=%jx\n",
|
||||
file->name, offset, length);
|
||||
free_fs_request(req);
|
||||
cb_fn(cb_arg, -ENOMEM);
|
||||
@ -1944,7 +1944,7 @@ spdk_file_writev_async(struct spdk_file *file, struct spdk_io_channel *channel,
|
||||
struct iovec *iovs, uint32_t iovcnt, uint64_t offset, uint64_t length,
|
||||
spdk_file_op_complete cb_fn, void *cb_arg)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "file=%s offset=%jx length=%jx\n",
|
||||
SPDK_DEBUGLOG(blobfs, "file=%s offset=%jx length=%jx\n",
|
||||
file->name, offset, length);
|
||||
|
||||
__readvwritev(file, channel, iovs, iovcnt, offset, length, cb_fn, cb_arg, 0);
|
||||
@ -1955,7 +1955,7 @@ spdk_file_read_async(struct spdk_file *file, struct spdk_io_channel *channel,
|
||||
void *payload, uint64_t offset, uint64_t length,
|
||||
spdk_file_op_complete cb_fn, void *cb_arg)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "file=%s offset=%jx length=%jx\n",
|
||||
SPDK_DEBUGLOG(blobfs, "file=%s offset=%jx length=%jx\n",
|
||||
file->name, offset, length);
|
||||
__readwrite(file, channel, payload, offset, length, cb_fn, cb_arg, 1);
|
||||
}
|
||||
@ -1965,7 +1965,7 @@ spdk_file_readv_async(struct spdk_file *file, struct spdk_io_channel *channel,
|
||||
struct iovec *iovs, uint32_t iovcnt, uint64_t offset, uint64_t length,
|
||||
spdk_file_op_complete cb_fn, void *cb_arg)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "file=%s offset=%jx length=%jx\n",
|
||||
SPDK_DEBUGLOG(blobfs, "file=%s offset=%jx length=%jx\n",
|
||||
file->name, offset, length);
|
||||
|
||||
__readvwritev(file, channel, iovs, iovcnt, offset, length, cb_fn, cb_arg, 1);
|
||||
@ -2166,7 +2166,7 @@ cache_insert_buffer(struct spdk_file *file, uint64_t offset)
|
||||
|
||||
buf = calloc(1, sizeof(*buf));
|
||||
if (buf == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "calloc failed\n");
|
||||
SPDK_DEBUGLOG(blobfs, "calloc failed\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -2209,7 +2209,7 @@ cache_append_buffer(struct spdk_file *file)
|
||||
|
||||
last = cache_insert_buffer(file, file->append_pos);
|
||||
if (last == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "cache_insert_buffer failed\n");
|
||||
SPDK_DEBUGLOG(blobfs, "cache_insert_buffer failed\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -2976,5 +2976,5 @@ file_free(struct spdk_file *file)
|
||||
pthread_spin_unlock(&file->lock);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("blobfs", SPDK_LOG_BLOBFS)
|
||||
SPDK_LOG_REGISTER_COMPONENT("blobfs_rw", SPDK_LOG_BLOBFS_RW)
|
||||
SPDK_LOG_REGISTER_COMPONENT(blobfs)
|
||||
SPDK_LOG_REGISTER_COMPONENT(blobfs_rw)
|
||||
|
@ -81,7 +81,7 @@ rpc_spdk_kill_instance(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_spdk_kill_instance_decoders,
|
||||
SPDK_COUNTOF(rpc_spdk_kill_instance_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_APP_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(app_rpc, "spdk_json_decode_object failed\n");
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ rpc_spdk_kill_instance(struct spdk_jsonrpc_request *request,
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_APP_RPC, "sending signal %d\n", signals[i].signal);
|
||||
SPDK_DEBUGLOG(app_rpc, "sending signal %d\n", signals[i].signal);
|
||||
free_rpc_spdk_kill_instance(&req);
|
||||
kill(getpid(), signals[i].signal);
|
||||
|
||||
@ -134,7 +134,7 @@ rpc_framework_monitor_context_switch(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_framework_monitor_context_switch_decoders,
|
||||
SPDK_COUNTOF(rpc_framework_monitor_context_switch_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_APP_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(app_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS, "Invalid parameters");
|
||||
return;
|
||||
}
|
||||
@ -544,4 +544,4 @@ err:
|
||||
free(ctx);
|
||||
}
|
||||
SPDK_RPC_REGISTER("thread_set_cpumask", rpc_thread_set_cpumask, SPDK_RPC_RUNTIME)
|
||||
SPDK_LOG_REGISTER_COMPONENT("app_rpc", SPDK_LOG_APP_RPC)
|
||||
SPDK_LOG_REGISTER_COMPONENT(app_rpc)
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include "spdk_internal/event.h"
|
||||
#include "spdk_internal/log.h"
|
||||
|
||||
#define SPDK_DEBUG_APP_CFG(...) SPDK_DEBUGLOG(SPDK_LOG_APP_CONFIG, __VA_ARGS__)
|
||||
#define SPDK_DEBUG_APP_CFG(...) SPDK_DEBUGLOG(app_config, __VA_ARGS__)
|
||||
|
||||
/* JSON configuration format is as follows
|
||||
*
|
||||
@ -630,4 +630,4 @@ fail:
|
||||
app_json_config_load_done(ctx, -EINVAL);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("app_config", SPDK_LOG_APP_CONFIG)
|
||||
SPDK_LOG_REGISTER_COMPONENT(app_config)
|
||||
|
@ -108,7 +108,7 @@ rpc_log_set_print_level(struct spdk_jsonrpc_request *request,
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_log_level_decoders,
|
||||
SPDK_COUNTOF(rpc_log_level_decoders), &req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_LOG_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(log_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto invalid;
|
||||
@ -116,7 +116,7 @@ rpc_log_set_print_level(struct spdk_jsonrpc_request *request,
|
||||
|
||||
level = _parse_log_level(req.level);
|
||||
if (level == -1) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_LOG_RPC, "tried to set invalid log level\n");
|
||||
SPDK_DEBUGLOG(log_rpc, "tried to set invalid log level\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
||||
"invalid log level");
|
||||
goto invalid;
|
||||
@ -178,7 +178,7 @@ rpc_log_set_level(struct spdk_jsonrpc_request *request,
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_log_level_decoders,
|
||||
SPDK_COUNTOF(rpc_log_level_decoders), &req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_LOG_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(log_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto invalid;
|
||||
@ -186,7 +186,7 @@ rpc_log_set_level(struct spdk_jsonrpc_request *request,
|
||||
|
||||
level = _parse_log_level(req.level);
|
||||
if (level == -1) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_LOG_RPC, "tried to set invalid log level\n");
|
||||
SPDK_DEBUGLOG(log_rpc, "tried to set invalid log level\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
||||
"invalid log level");
|
||||
goto invalid;
|
||||
@ -246,14 +246,14 @@ rpc_log_set_flag(struct spdk_jsonrpc_request *request,
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_log_flag_decoders,
|
||||
SPDK_COUNTOF(rpc_log_flag_decoders), &req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_LOG_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(log_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
if (req.flag == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_LOG_RPC, "invalid flag 0\n");
|
||||
SPDK_DEBUGLOG(log_rpc, "invalid flag 0\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
||||
"invalid flag 0");
|
||||
goto invalid;
|
||||
@ -282,14 +282,14 @@ rpc_log_clear_flag(struct spdk_jsonrpc_request *request,
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_log_flag_decoders,
|
||||
SPDK_COUNTOF(rpc_log_flag_decoders), &req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_LOG_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(log_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
if (req.flag == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_LOG_RPC, "Invalid flag 0\n");
|
||||
SPDK_DEBUGLOG(log_rpc, "Invalid flag 0\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
||||
"invalid flag 0");
|
||||
goto invalid;
|
||||
@ -368,4 +368,4 @@ rpc_log_enable_timestamps(struct spdk_jsonrpc_request *request,
|
||||
spdk_jsonrpc_end_result(request, w);
|
||||
}
|
||||
SPDK_RPC_REGISTER("log_enable_timestamps", rpc_log_enable_timestamps, SPDK_RPC_RUNTIME)
|
||||
SPDK_LOG_REGISTER_COMPONENT("log_rpc", SPDK_LOG_LOG_RPC)
|
||||
SPDK_LOG_REGISTER_COMPONENT(log_rpc)
|
||||
|
@ -270,7 +270,7 @@ get_rusage(struct spdk_reactor *reactor)
|
||||
}
|
||||
|
||||
if (rusage.ru_nvcsw != reactor->rusage.ru_nvcsw || rusage.ru_nivcsw != reactor->rusage.ru_nivcsw) {
|
||||
SPDK_INFOLOG(SPDK_LOG_REACTOR,
|
||||
SPDK_INFOLOG(reactor,
|
||||
"Reactor %d: %ld voluntary context switches and %ld involuntary context switches in the last second.\n",
|
||||
reactor->lcore, rusage.ru_nvcsw - reactor->rusage.ru_nvcsw,
|
||||
rusage.ru_nivcsw - reactor->rusage.ru_nivcsw);
|
||||
@ -610,12 +610,12 @@ on_reactor(void *arg1, void *arg2)
|
||||
cr->cur_core = spdk_env_get_next_core(cr->cur_core);
|
||||
|
||||
if (cr->cur_core > spdk_env_get_last_core()) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_REACTOR, "Completed reactor iteration\n");
|
||||
SPDK_DEBUGLOG(reactor, "Completed reactor iteration\n");
|
||||
|
||||
evt = spdk_event_allocate(cr->orig_core, cr->cpl, cr->arg1, cr->arg2);
|
||||
free(cr);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_REACTOR, "Continuing reactor iteration to %d\n",
|
||||
SPDK_DEBUGLOG(reactor, "Continuing reactor iteration to %d\n",
|
||||
cr->cur_core);
|
||||
|
||||
evt = spdk_event_allocate(cr->cur_core, on_reactor, arg1, NULL);
|
||||
@ -644,7 +644,7 @@ spdk_for_each_reactor(spdk_event_fn fn, void *arg1, void *arg2, spdk_event_fn cp
|
||||
cr->orig_core = spdk_env_get_current_core();
|
||||
cr->cur_core = spdk_env_get_first_core();
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_REACTOR, "Starting reactor iteration from %d\n", cr->orig_core);
|
||||
SPDK_DEBUGLOG(reactor, "Starting reactor iteration from %d\n", cr->orig_core);
|
||||
|
||||
evt = spdk_event_allocate(cr->cur_core, on_reactor, cr, NULL);
|
||||
assert(evt != NULL);
|
||||
@ -652,4 +652,4 @@ spdk_for_each_reactor(spdk_event_fn fn, void *arg1, void *arg2, spdk_event_fn cp
|
||||
spdk_event_call(evt);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("reactor", SPDK_LOG_REACTOR)
|
||||
SPDK_LOG_REGISTER_COMPONENT(reactor)
|
||||
|
@ -712,7 +712,7 @@ ftl_add_direct_wptr(struct ftl_band *band)
|
||||
|
||||
LIST_INSERT_HEAD(&dev->wptr_list, wptr, list_entry);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_FTL_CORE, "wptr: direct band %u\n", band->id);
|
||||
SPDK_DEBUGLOG(ftl_core, "wptr: direct band %u\n", band->id);
|
||||
ftl_trace_write_band(dev, band);
|
||||
return 0;
|
||||
}
|
||||
@ -765,7 +765,7 @@ ftl_add_wptr(struct spdk_ftl_dev *dev)
|
||||
|
||||
LIST_INSERT_HEAD(&dev->wptr_list, wptr, list_entry);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_FTL_CORE, "wptr: band %u\n", band->id);
|
||||
SPDK_DEBUGLOG(ftl_core, "wptr: band %u\n", band->id);
|
||||
ftl_trace_write_band(dev, band);
|
||||
return 0;
|
||||
}
|
||||
@ -795,7 +795,7 @@ ftl_wptr_advance(struct ftl_wptr *wptr, size_t xfer_size)
|
||||
|
||||
assert(!ftl_addr_invalid(wptr->addr));
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_FTL_CORE, "wptr: pu:%lu band:%lu, offset:%lu\n",
|
||||
SPDK_DEBUGLOG(ftl_core, "wptr: pu:%lu band:%lu, offset:%lu\n",
|
||||
ftl_addr_get_punit(dev, wptr->addr),
|
||||
ftl_addr_get_band(dev, wptr->addr),
|
||||
wptr->addr.offset);
|
||||
@ -1131,7 +1131,7 @@ ftl_read_next_logical_addr(struct ftl_io *io, struct ftl_addr *addr)
|
||||
|
||||
*addr = ftl_l2p_get(dev, ftl_io_current_lba(io));
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_FTL_CORE, "Read addr:%lx, lba:%lu\n",
|
||||
SPDK_DEBUGLOG(ftl_core, "Read addr:%lx, lba:%lu\n",
|
||||
addr->offset, ftl_io_current_lba(io));
|
||||
|
||||
/* If the address is invalid, skip it (the buffer should already be zero'ed) */
|
||||
@ -1584,7 +1584,7 @@ ftl_write_cb(struct ftl_io *io, void *arg, int status)
|
||||
pthread_spin_unlock(&entry->lock);
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_FTL_CORE, "Write addr:%lu, lba:%lu\n",
|
||||
SPDK_DEBUGLOG(ftl_core, "Write addr:%lu, lba:%lu\n",
|
||||
entry->addr.offset, entry->lba);
|
||||
|
||||
addr = ftl_band_next_addr(io->band, addr, 1);
|
||||
@ -1926,7 +1926,7 @@ ftl_wptr_process_writes(struct ftl_wptr *wptr)
|
||||
ftl_update_stats(dev, entry);
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_FTL_CORE, "Write addr:%lx\n", wptr->addr.offset);
|
||||
SPDK_DEBUGLOG(ftl_core, "Write addr:%lx\n", wptr->addr.offset);
|
||||
|
||||
if (ftl_submit_write(wptr, io)) {
|
||||
/* TODO: we need some recovery here */
|
||||
@ -2457,4 +2457,4 @@ ftl_task_core(void *ctx)
|
||||
return busy ? SPDK_POLLER_BUSY : SPDK_POLLER_IDLE;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("ftl_core", SPDK_LOG_FTL_CORE)
|
||||
SPDK_LOG_REGISTER_COMPONENT(ftl_core)
|
||||
|
@ -281,7 +281,7 @@ ftl_dev_init_nv_cache(struct spdk_ftl_dev *dev, const char *bdev_name)
|
||||
return -1;
|
||||
}
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_FTL_INIT, "Using %s as write buffer cache\n",
|
||||
SPDK_INFOLOG(ftl_init, "Using %s as write buffer cache\n",
|
||||
spdk_bdev_get_name(bdev));
|
||||
|
||||
if (spdk_bdev_get_block_size(bdev) != FTL_BLOCK_SIZE) {
|
||||
@ -1685,4 +1685,4 @@ spdk_ftl_dev_free(struct spdk_ftl_dev *dev, spdk_ftl_init_fn cb_fn, void *cb_arg
|
||||
return ftl_dev_free(dev, cb_fn, cb_arg, spdk_get_thread());
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("ftl_init", SPDK_LOG_FTL_INIT)
|
||||
SPDK_LOG_REGISTER_COMPONENT(ftl_init)
|
||||
|
@ -455,7 +455,7 @@ ftl_nv_cache_restore_done(struct ftl_nv_cache_restore *restore, uint64_t current
|
||||
nv_cache->ready = true;
|
||||
pthread_spin_unlock(&nv_cache->lock);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_FTL_INIT, "Enabling non-volatile cache (phase: %u, addr: %"
|
||||
SPDK_DEBUGLOG(ftl_init, "Enabling non-volatile cache (phase: %u, addr: %"
|
||||
PRIu64")\n", nv_cache->phase, current_addr);
|
||||
|
||||
ftl_nv_cache_restore_complete(restore, 0);
|
||||
@ -588,7 +588,7 @@ ftl_nv_cache_recovery_done(struct ftl_nv_cache_restore *restore)
|
||||
if ((range_prev->num_blocks + range_current->num_blocks < nv_cache->num_data_blocks) ||
|
||||
(range_prev->start_addr < range_current->last_addr &&
|
||||
range_current->start_addr < range_prev->last_addr)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_FTL_INIT, "Non-volatile cache inconsistency detected\n");
|
||||
SPDK_DEBUGLOG(ftl_init, "Non-volatile cache inconsistency detected\n");
|
||||
|
||||
rc = ftl_flush_wbuf(dev, ftl_nv_cache_wbuf_flush_cb, restore);
|
||||
if (spdk_unlikely(rc != 0)) {
|
||||
@ -656,7 +656,7 @@ ftl_nv_cache_recover_range(struct ftl_nv_cache_restore *restore)
|
||||
|
||||
/* There are no ranges to be recovered, we're done */
|
||||
if (range->num_recovered == range->num_blocks || !range->recovery) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_FTL_INIT, "Non-volatile cache recovery done\n");
|
||||
SPDK_DEBUGLOG(ftl_init, "Non-volatile cache recovery done\n");
|
||||
ftl_nv_cache_recovery_done(restore);
|
||||
return;
|
||||
}
|
||||
@ -664,7 +664,7 @@ ftl_nv_cache_recover_range(struct ftl_nv_cache_restore *restore)
|
||||
range->current_addr = range->start_addr;
|
||||
restore->phase = phase;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_FTL_INIT, "Recovering range %u %"PRIu64"-%"PRIu64" (%"PRIu64")\n",
|
||||
SPDK_DEBUGLOG(ftl_init, "Recovering range %u %"PRIu64"-%"PRIu64" (%"PRIu64")\n",
|
||||
phase, range->start_addr, range->last_addr, range->num_blocks);
|
||||
|
||||
ftl_nv_cache_recover_block(&restore->block[0]);
|
||||
@ -791,7 +791,7 @@ ftl_nv_cache_scan_done(struct ftl_nv_cache_restore *restore)
|
||||
|
||||
for (i = 0; i < FTL_NV_CACHE_PHASE_COUNT; ++i) {
|
||||
range = &restore->range[i];
|
||||
SPDK_DEBUGLOG(SPDK_LOG_FTL_INIT, "Range %"PRIu64": %"PRIu64"-%"PRIu64" (%" PRIu64
|
||||
SPDK_DEBUGLOG(ftl_init, "Range %"PRIu64": %"PRIu64"-%"PRIu64" (%" PRIu64
|
||||
")\n", i, range->start_addr, range->last_addr, range->num_blocks);
|
||||
num_blocks += range->num_blocks;
|
||||
}
|
||||
@ -979,7 +979,7 @@ ftl_nv_cache_read_header_cb(struct spdk_bdev_io *bdev_io, bool success, void *cb
|
||||
* by scrubbing the device once again.
|
||||
*/
|
||||
if (hdr->phase == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_FTL_INIT, "Detected phase 0, restarting scrub\n");
|
||||
SPDK_DEBUGLOG(ftl_init, "Detected phase 0, restarting scrub\n");
|
||||
rc = ftl_nv_cache_scrub(nv_cache, ftl_nv_cache_scrub_cb, restore);
|
||||
if (spdk_unlikely(rc != 0)) {
|
||||
SPDK_ERRLOG("Unable to scrub the non-volatile cache: %s\n",
|
||||
|
@ -971,7 +971,7 @@ spdk_idxd_batch_create(struct spdk_idxd_io_channel *chan)
|
||||
batch->start_index = batch->cur_index = batch->batch_num * DESC_PER_BATCH;
|
||||
|
||||
TAILQ_INSERT_TAIL(&chan->batches, batch, link);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_IDXD, "New batch %p num %u\n", batch, batch->batch_num);
|
||||
SPDK_DEBUGLOG(idxd, "New batch %p num %u\n", batch, batch->batch_num);
|
||||
|
||||
return batch;
|
||||
}
|
||||
@ -1026,7 +1026,7 @@ spdk_idxd_batch_submit(struct spdk_idxd_io_channel *chan, struct idxd_batch *bat
|
||||
/* Common prep. */
|
||||
desc = _idxd_prep_command(chan, cb_fn, cb_arg, batch);
|
||||
if (desc == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_IDXD, "Can't submit batch %p busy batch num %u\n", batch, batch->batch_num);
|
||||
SPDK_DEBUGLOG(idxd, "Can't submit batch %p busy batch num %u\n", batch, batch->batch_num);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
@ -1070,7 +1070,7 @@ _idxd_prep_batch_cmd(struct spdk_idxd_io_channel *chan, spdk_idxd_req_cb cb_fn,
|
||||
|
||||
desc = &chan->ring_ctrl.user_desc[batch->cur_index];
|
||||
comp = &chan->ring_ctrl.user_completions[batch->cur_index];
|
||||
SPDK_DEBUGLOG(SPDK_LOG_IDXD, "Prep batch %p index %u\n", batch, batch->cur_index);
|
||||
SPDK_DEBUGLOG(idxd, "Prep batch %p index %u\n", batch, batch->cur_index);
|
||||
|
||||
batch->cur_index++;
|
||||
assert(batch->cur_index > batch->start_index);
|
||||
@ -1422,4 +1422,4 @@ spdk_idxd_process_events(struct spdk_idxd_io_channel *chan)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("idxd", SPDK_LOG_IDXD)
|
||||
SPDK_LOG_REGISTER_COMPONENT(idxd)
|
||||
|
@ -772,4 +772,4 @@ spdk_ioat_process_events(struct spdk_ioat_chan *ioat)
|
||||
return ioat_process_channel_events(ioat);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("ioat", SPDK_LOG_IOAT)
|
||||
SPDK_LOG_REGISTER_COMPONENT(ioat)
|
||||
|
@ -123,7 +123,7 @@ int initialize_iscsi_conns(void)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "spdk_iscsi_init\n");
|
||||
SPDK_DEBUGLOG(iscsi, "spdk_iscsi_init\n");
|
||||
|
||||
g_conns_array = calloc(MAX_ISCSI_CONNECTIONS, sizeof(struct spdk_iscsi_conn));
|
||||
if (g_conns_array == NULL) {
|
||||
@ -257,7 +257,7 @@ iscsi_conn_construct(struct spdk_iscsi_portal *portal,
|
||||
conn->logout_request_timer = NULL;
|
||||
conn->logout_timer = NULL;
|
||||
conn->shutdown_timer = NULL;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Launching connection on acceptor thread\n");
|
||||
SPDK_DEBUGLOG(iscsi, "Launching connection on acceptor thread\n");
|
||||
conn->pending_task_cnt = 0;
|
||||
|
||||
/* Get the first poll group. */
|
||||
@ -390,17 +390,17 @@ iscsi_conn_free(struct spdk_iscsi_conn *conn)
|
||||
|
||||
if (sess->connections == 0) {
|
||||
/* cleanup last connection */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"cleanup last conn free sess\n");
|
||||
iscsi_free_sess(sess);
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Terminating connections(tsih %d): %d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "Terminating connections(tsih %d): %d\n",
|
||||
sess->tsih, sess->connections);
|
||||
|
||||
end:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "cleanup free conn\n");
|
||||
SPDK_DEBUGLOG(iscsi, "cleanup free conn\n");
|
||||
iscsi_param_free(conn->params);
|
||||
_free_conn(conn);
|
||||
|
||||
@ -877,7 +877,7 @@ iscsi_drop_conns(struct spdk_iscsi_conn *conn, const char *conn_match,
|
||||
struct spdk_thread *thread;
|
||||
int num;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "iscsi_drop_conns\n");
|
||||
SPDK_DEBUGLOG(iscsi, "iscsi_drop_conns\n");
|
||||
|
||||
num = 0;
|
||||
pthread_mutex_lock(&g_conns_mutex);
|
||||
@ -912,12 +912,12 @@ iscsi_drop_conns(struct spdk_iscsi_conn *conn, const char *conn_match,
|
||||
SPDK_ERRLOG("exiting conn by %s (%s)\n",
|
||||
xconn_match, xconn->initiator_addr);
|
||||
if (xconn->sess != NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "TSIH=%u\n", xconn->sess->tsih);
|
||||
SPDK_DEBUGLOG(iscsi, "TSIH=%u\n", xconn->sess->tsih);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "TSIH=xx\n");
|
||||
SPDK_DEBUGLOG(iscsi, "TSIH=xx\n");
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "CID=%u\n", xconn->cid);
|
||||
SPDK_DEBUGLOG(iscsi, "CID=%u\n", xconn->cid);
|
||||
|
||||
thread = spdk_io_channel_get_thread(spdk_io_channel_from_ctx(xconn->pg));
|
||||
spdk_thread_send_msg(thread, _iscsi_conn_drop, xconn);
|
||||
@ -1235,9 +1235,9 @@ iscsi_conn_send_nopin(struct spdk_iscsi_conn *conn)
|
||||
!iscsi_param_eq_val(conn->sess->params, "SessionType", "Normal")) {
|
||||
return;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "send NOPIN isid=%"PRIx64", tsih=%u, cid=%u\n",
|
||||
SPDK_DEBUGLOG(iscsi, "send NOPIN isid=%"PRIx64", tsih=%u, cid=%u\n",
|
||||
conn->sess->isid, conn->sess->tsih, conn->cid);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "StatSN=%u, ExpCmdSN=%u, MaxCmdSN=%u\n",
|
||||
SPDK_DEBUGLOG(iscsi, "StatSN=%u, ExpCmdSN=%u, MaxCmdSN=%u\n",
|
||||
conn->StatSN, conn->sess->ExpCmdSN,
|
||||
conn->sess->MaxCmdSN);
|
||||
rsp_pdu = iscsi_get_pdu(conn);
|
||||
@ -1329,7 +1329,7 @@ iscsi_conn_read_data(struct spdk_iscsi_conn *conn, int bytes,
|
||||
|
||||
/* For connect reset issue, do not output error log */
|
||||
if (errno == ECONNRESET) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "spdk_sock_recv() failed, errno %d: %s\n",
|
||||
SPDK_DEBUGLOG(iscsi, "spdk_sock_recv() failed, errno %d: %s\n",
|
||||
errno, spdk_strerror(errno));
|
||||
} else {
|
||||
SPDK_ERRLOG("spdk_sock_recv() failed, errno %d: %s\n",
|
||||
@ -1370,7 +1370,7 @@ iscsi_conn_readv_data(struct spdk_iscsi_conn *conn,
|
||||
|
||||
/* For connect reset issue, do not output error log */
|
||||
if (errno == ECONNRESET) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "spdk_sock_readv() failed, errno %d: %s\n",
|
||||
SPDK_DEBUGLOG(iscsi, "spdk_sock_readv() failed, errno %d: %s\n",
|
||||
errno, spdk_strerror(errno));
|
||||
} else {
|
||||
SPDK_ERRLOG("spdk_sock_readv() failed, errno %d: %s\n",
|
||||
@ -1442,7 +1442,7 @@ _iscsi_conn_pdu_write_done(void *cb_arg, int err)
|
||||
if ((conn->full_feature) &&
|
||||
(conn->sess->ErrorRecoveryLevel >= 1) &&
|
||||
iscsi_is_free_pdu_deferred(pdu)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "stat_sn=%d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "stat_sn=%d\n",
|
||||
from_be32(&pdu->bhs.stat_sn));
|
||||
TAILQ_INSERT_TAIL(&conn->snack_pdu_list, pdu,
|
||||
tailq);
|
||||
@ -1531,7 +1531,7 @@ iscsi_conn_full_feature_migrate(void *arg)
|
||||
|
||||
if (conn->state >= ISCSI_CONN_STATE_EXITING) {
|
||||
/* Connection is being exited before this callback is executed. */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Connection is already exited.\n");
|
||||
SPDK_DEBUGLOG(iscsi, "Connection is already exited.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ iscsi_init_grp_add_initiator(struct spdk_iscsi_init_grp *ig, char *name)
|
||||
TAILQ_INSERT_TAIL(&ig->initiator_head, iname, tailq);
|
||||
ig->ninitiators++;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "InitiatorName %s\n", name);
|
||||
SPDK_DEBUGLOG(iscsi, "InitiatorName %s\n", name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -248,7 +248,7 @@ iscsi_init_grp_add_netmask(struct spdk_iscsi_init_grp *ig, char *mask)
|
||||
TAILQ_INSERT_TAIL(&ig->netmask_head, imask, tailq);
|
||||
ig->nnetmasks++;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Netmask %s\n", mask);
|
||||
SPDK_DEBUGLOG(iscsi, "Netmask %s\n", mask);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -337,11 +337,11 @@ iscsi_parse_init_grp(struct spdk_conf_section *sp)
|
||||
char **initiators = NULL, **netmasks = NULL;
|
||||
int tag = spdk_conf_section_get_num(sp);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "add initiator group %d\n", tag);
|
||||
SPDK_DEBUGLOG(iscsi, "add initiator group %d\n", tag);
|
||||
|
||||
val = spdk_conf_section_get_val(sp, "Comment");
|
||||
if (val != NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Comment %s\n", val);
|
||||
SPDK_DEBUGLOG(iscsi, "Comment %s\n", val);
|
||||
}
|
||||
|
||||
/* counts number of definitions */
|
||||
@ -388,7 +388,7 @@ iscsi_parse_init_grp(struct spdk_conf_section *sp)
|
||||
rc = -EINVAL;
|
||||
goto cleanup;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "InitiatorName %s\n", val);
|
||||
SPDK_DEBUGLOG(iscsi, "InitiatorName %s\n", val);
|
||||
initiators[i] = strdup(val);
|
||||
if (!initiators[i]) {
|
||||
SPDK_ERRLOG("strdup() failed for temp initiator name\n");
|
||||
@ -409,7 +409,7 @@ iscsi_parse_init_grp(struct spdk_conf_section *sp)
|
||||
rc = -EINVAL;
|
||||
goto cleanup;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Netmask %s\n", val);
|
||||
SPDK_DEBUGLOG(iscsi, "Netmask %s\n", val);
|
||||
netmasks[i] = strdup(val);
|
||||
if (!netmasks[i]) {
|
||||
SPDK_ERRLOG("strdup() failed for temp initiator mask\n");
|
||||
@ -475,7 +475,7 @@ iscsi_init_grp_create_from_initiator_list(int tag,
|
||||
int rc = -1;
|
||||
struct spdk_iscsi_init_grp *ig = NULL;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"add initiator group (from initiator list) tag=%d, #initiators=%d, #masks=%d\n",
|
||||
tag, num_initiator_names, num_initiator_masks);
|
||||
|
||||
@ -521,7 +521,7 @@ iscsi_init_grp_add_initiators_from_initiator_list(int tag,
|
||||
int rc = -1;
|
||||
struct spdk_iscsi_init_grp *ig;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"add initiator to initiator group: tag=%d, #initiators=%d, #masks=%d\n",
|
||||
tag, num_initiator_names, num_initiator_masks);
|
||||
|
||||
@ -563,7 +563,7 @@ iscsi_init_grp_delete_initiators_from_initiator_list(int tag,
|
||||
int rc = -1;
|
||||
struct spdk_iscsi_init_grp *ig;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"delete initiator from initiator group: tag=%d, #initiators=%d, #masks=%d\n",
|
||||
tag, num_initiator_names, num_initiator_masks);
|
||||
|
||||
@ -651,7 +651,7 @@ iscsi_init_grps_destroy(void)
|
||||
{
|
||||
struct spdk_iscsi_init_grp *ig, *tmp;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "iscsi_init_grp_array_destroy\n");
|
||||
SPDK_DEBUGLOG(iscsi, "iscsi_init_grp_array_destroy\n");
|
||||
pthread_mutex_lock(&g_iscsi.mutex);
|
||||
TAILQ_FOREACH_SAFE(ig, &g_iscsi.ig_head, tailq, tmp) {
|
||||
TAILQ_REMOVE(&g_iscsi.ig_head, ig, tailq);
|
||||
|
@ -236,15 +236,15 @@ iscsi_reject(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Reject PDU reason=%d\n", reason);
|
||||
SPDK_DEBUGLOG(iscsi, "Reject PDU reason=%d\n", reason);
|
||||
|
||||
if (conn->sess != NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"StatSN=%u, ExpCmdSN=%u, MaxCmdSN=%u\n",
|
||||
conn->StatSN, conn->sess->ExpCmdSN,
|
||||
conn->sess->MaxCmdSN);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "StatSN=%u\n", conn->StatSN);
|
||||
SPDK_DEBUGLOG(iscsi, "StatSN=%u\n", conn->StatSN);
|
||||
}
|
||||
|
||||
memcpy(data, &pdu->bhs, ISCSI_BHS_LEN);
|
||||
@ -286,7 +286,7 @@ iscsi_reject(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu,
|
||||
to_be32(&rsph->max_cmd_sn, 1);
|
||||
}
|
||||
|
||||
SPDK_LOGDUMP(SPDK_LOG_ISCSI, "PDU", (void *)&rsp_pdu->bhs, ISCSI_BHS_LEN);
|
||||
SPDK_LOGDUMP(iscsi, "PDU", (void *)&rsp_pdu->bhs, ISCSI_BHS_LEN);
|
||||
|
||||
iscsi_conn_write_pdu(conn, rsp_pdu, iscsi_conn_pdu_generic_complete, NULL);
|
||||
|
||||
@ -719,7 +719,7 @@ append_iscsi_sess(struct spdk_iscsi_conn *conn,
|
||||
{
|
||||
struct spdk_iscsi_sess *sess;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "append session: init port name=%s, tsih=%u, cid=%u\n",
|
||||
SPDK_DEBUGLOG(iscsi, "append session: init port name=%s, tsih=%u, cid=%u\n",
|
||||
initiator_port_name, tsih, cid);
|
||||
|
||||
sess = get_iscsi_sess_by_tsih(tsih);
|
||||
@ -743,7 +743,7 @@ append_iscsi_sess(struct spdk_iscsi_conn *conn,
|
||||
return ISCSI_LOGIN_TOO_MANY_CONNECTIONS;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Connections (tsih %d): %d\n", sess->tsih, sess->connections);
|
||||
SPDK_DEBUGLOG(iscsi, "Connections (tsih %d): %d\n", sess->tsih, sess->connections);
|
||||
conn->sess = sess;
|
||||
|
||||
/*
|
||||
@ -793,7 +793,7 @@ iscsi_append_param(struct spdk_iscsi_conn *conn, const char *key,
|
||||
if (param == NULL) {
|
||||
param = iscsi_param_find(conn->sess->params, key);
|
||||
if (param == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "no key %.64s\n", key);
|
||||
SPDK_DEBUGLOG(iscsi, "no key %.64s\n", key);
|
||||
return data_len;
|
||||
}
|
||||
}
|
||||
@ -867,7 +867,7 @@ iscsi_auth_params(struct spdk_iscsi_conn *conn,
|
||||
goto error_return;
|
||||
}
|
||||
/* selected algorithm is 5 (MD5) */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "got CHAP_A=%s\n", new_val);
|
||||
SPDK_DEBUGLOG(iscsi, "got CHAP_A=%s\n", new_val);
|
||||
total = iscsi_append_text("CHAP_A", new_val, data, alloc_len, total);
|
||||
|
||||
/* Identifier is one octet */
|
||||
@ -920,9 +920,9 @@ iscsi_auth_params(struct spdk_iscsi_conn *conn,
|
||||
SPDK_ERRLOG("response format error\n");
|
||||
goto error_return;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "got CHAP_N/CHAP_R\n");
|
||||
SPDK_DEBUGLOG(iscsi, "got CHAP_N/CHAP_R\n");
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "ag_tag=%d\n", conn->chap_group);
|
||||
SPDK_DEBUGLOG(iscsi, "ag_tag=%d\n", conn->chap_group);
|
||||
|
||||
rc = iscsi_chap_get_authinfo(&conn->auth, name, conn->chap_group);
|
||||
if (rc < 0) {
|
||||
@ -951,7 +951,7 @@ iscsi_auth_params(struct spdk_iscsi_conn *conn,
|
||||
bin2hex(in_val, ISCSI_TEXT_MAX_VAL_LEN, tgtmd5, SPDK_MD5DIGEST_LEN);
|
||||
|
||||
#if 0
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "tgtmd5=%s, resmd5=%s\n", in_val, response);
|
||||
SPDK_DEBUGLOG(iscsi, "tgtmd5=%s, resmd5=%s\n", in_val, response);
|
||||
spdk_dump("tgtmd5", tgtmd5, SPDK_MD5DIGEST_LEN);
|
||||
spdk_dump("resmd5", resmd5, SPDK_MD5DIGEST_LEN);
|
||||
#endif
|
||||
@ -1002,7 +1002,7 @@ iscsi_auth_params(struct spdk_iscsi_conn *conn,
|
||||
spdk_dump("MChallenge", conn->auth.chap_mchallenge,
|
||||
conn->auth.chap_mchallenge_len);
|
||||
#endif
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "got CHAP_I/CHAP_C\n");
|
||||
SPDK_DEBUGLOG(iscsi, "got CHAP_I/CHAP_C\n");
|
||||
|
||||
if (conn->auth.muser[0] == '\0' || conn->auth.msecret[0] == '\0') {
|
||||
/* SPDK_ERRLOG("mutual auth user or secret is missing\n"); */
|
||||
@ -1038,7 +1038,7 @@ iscsi_auth_params(struct spdk_iscsi_conn *conn,
|
||||
conn->auth.chap_phase = ISCSI_CHAP_PHASE_END;
|
||||
} else {
|
||||
/* not found CHAP keys */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "start CHAP\n");
|
||||
SPDK_DEBUGLOG(iscsi, "start CHAP\n");
|
||||
conn->auth.chap_phase = ISCSI_CHAP_PHASE_WAIT_A;
|
||||
}
|
||||
|
||||
@ -1150,7 +1150,7 @@ iscsi_conn_login_pdu_success_complete(void *arg)
|
||||
|
||||
if (conn->state >= ISCSI_CONN_STATE_EXITING) {
|
||||
/* Connection is being exited before this callback is executed. */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Connection is already exited.\n");
|
||||
SPDK_DEBUGLOG(iscsi, "Connection is already exited.\n");
|
||||
return;
|
||||
}
|
||||
if (conn->full_feature) {
|
||||
@ -1190,8 +1190,8 @@ iscsi_op_login_response(struct spdk_iscsi_conn *conn,
|
||||
to_be32(&rsph->max_cmd_sn, rsp_pdu->cmd_sn);
|
||||
}
|
||||
|
||||
SPDK_LOGDUMP(SPDK_LOG_ISCSI, "PDU", (uint8_t *)rsph, ISCSI_BHS_LEN);
|
||||
SPDK_LOGDUMP(SPDK_LOG_ISCSI, "DATA", rsp_pdu->data, rsp_pdu->data_segment_len);
|
||||
SPDK_LOGDUMP(iscsi, "PDU", (uint8_t *)rsph, ISCSI_BHS_LEN);
|
||||
SPDK_LOGDUMP(iscsi, "DATA", rsp_pdu->data, rsp_pdu->data_segment_len);
|
||||
|
||||
/* Set T/CSG/NSG to reserved if login error. */
|
||||
if (rsph->status_class != 0) {
|
||||
@ -1249,9 +1249,9 @@ iscsi_op_login_rsp_init(struct spdk_iscsi_conn *conn,
|
||||
rsph->stat_sn = reqh->exp_stat_sn;
|
||||
}
|
||||
|
||||
SPDK_LOGDUMP(SPDK_LOG_ISCSI, "PDU", (uint8_t *)&pdu->bhs, ISCSI_BHS_LEN);
|
||||
SPDK_LOGDUMP(iscsi, "PDU", (uint8_t *)&pdu->bhs, ISCSI_BHS_LEN);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"T=%d, C=%d, CSG=%d, NSG=%d, Min=%d, Max=%d, ITT=%x\n",
|
||||
ISCSI_BHS_LOGIN_GET_TBIT(rsph->flags),
|
||||
ISCSI_BHS_LOGIN_GET_CBIT(rsph->flags),
|
||||
@ -1260,14 +1260,14 @@ iscsi_op_login_rsp_init(struct spdk_iscsi_conn *conn,
|
||||
reqh->version_min, reqh->version_max, from_be32(&rsph->itt));
|
||||
|
||||
if (conn->sess != NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"CmdSN=%u, ExpStatSN=%u, StatSN=%u, ExpCmdSN=%u,"
|
||||
"MaxCmdSN=%u\n", rsp_pdu->cmd_sn,
|
||||
from_be32(&rsph->stat_sn), conn->StatSN,
|
||||
conn->sess->ExpCmdSN,
|
||||
conn->sess->MaxCmdSN);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"CmdSN=%u, ExpStatSN=%u, StatSN=%u\n",
|
||||
rsp_pdu->cmd_sn, from_be32(&rsph->stat_sn),
|
||||
conn->StatSN);
|
||||
@ -1363,8 +1363,8 @@ iscsi_op_login_initialize_port(struct spdk_iscsi_conn *conn,
|
||||
"%s,i,0x%12.12" PRIx64, val, iscsi_get_isid(rsph->isid));
|
||||
spdk_strlwr(conn->initiator_name);
|
||||
spdk_strlwr(initiator_port_name);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Initiator name: %s\n", conn->initiator_name);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Initiator port: %s\n", initiator_port_name);
|
||||
SPDK_DEBUGLOG(iscsi, "Initiator name: %s\n", conn->initiator_name);
|
||||
SPDK_DEBUGLOG(iscsi, "Initiator port: %s\n", initiator_port_name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1410,7 +1410,7 @@ iscsi_op_login_session_type(struct spdk_iscsi_conn *conn,
|
||||
return SPDK_ISCSI_LOGIN_ERROR_RESPONSE;
|
||||
}
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Session Type: %s\n", session_type_str);
|
||||
SPDK_DEBUGLOG(iscsi, "Session Type: %s\n", session_type_str);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1446,7 +1446,7 @@ iscsi_op_login_check_target(struct spdk_iscsi_conn *conn,
|
||||
return SPDK_ISCSI_LOGIN_ERROR_RESPONSE;
|
||||
}
|
||||
if (iscsi_tgt_node_is_redirected(conn, *target, buf, MAX_TMPBUF)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_ISCSI, "target %s is redirectd\n", target_name);
|
||||
SPDK_INFOLOG(iscsi, "target %s is redirectd\n", target_name);
|
||||
rsp_pdu->data_segment_len = iscsi_append_text("TargetAddress",
|
||||
buf,
|
||||
rsp_pdu->data,
|
||||
@ -1484,7 +1484,7 @@ iscsi_op_login_check_session(struct spdk_iscsi_conn *conn,
|
||||
|
||||
rsph = (struct iscsi_bhs_login_rsp *)&rsp_pdu->bhs;
|
||||
/* check existing session */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "isid=%"PRIx64", tsih=%u, cid=%u\n",
|
||||
SPDK_DEBUGLOG(iscsi, "isid=%"PRIx64", tsih=%u, cid=%u\n",
|
||||
iscsi_get_isid(rsph->isid), from_be16(&rsph->tsih), cid);
|
||||
if (rsph->tsih != 0) {
|
||||
/* multiple connections */
|
||||
@ -1981,11 +1981,11 @@ iscsi_op_login_rsp_handle_csg_bit(struct spdk_iscsi_conn *conn,
|
||||
rsph->flags &= ~ISCSI_LOGIN_TRANSIT;
|
||||
} else {
|
||||
if (conn->auth.chap_phase != ISCSI_CHAP_PHASE_END) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "CHAP phase not complete");
|
||||
SPDK_DEBUGLOG(iscsi, "CHAP phase not complete");
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_LOGDUMP(SPDK_LOG_ISCSI, "Negotiated Auth Params",
|
||||
SPDK_LOGDUMP(iscsi, "Negotiated Auth Params",
|
||||
rsp_pdu->data, rsp_pdu->data_segment_len);
|
||||
}
|
||||
break;
|
||||
@ -2045,7 +2045,7 @@ iscsi_op_login_notify_session_info(struct spdk_iscsi_conn *conn,
|
||||
rsph = (struct iscsi_bhs_login_rsp *)&rsp_pdu->bhs;
|
||||
if (conn->sess->session_type == SESSION_TYPE_NORMAL) {
|
||||
/* normal session */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Login from %s (%s) on %s tgt_node%d"
|
||||
SPDK_DEBUGLOG(iscsi, "Login from %s (%s) on %s tgt_node%d"
|
||||
" (%s:%s,%d), ISID=%"PRIx64", TSIH=%u,"
|
||||
" CID=%u, HeaderDigest=%s, DataDigest=%s\n",
|
||||
conn->initiator_name, conn->initiator_addr,
|
||||
@ -2058,7 +2058,7 @@ iscsi_op_login_notify_session_info(struct spdk_iscsi_conn *conn,
|
||||
? "on" : "off"));
|
||||
} else if (conn->sess->session_type == SESSION_TYPE_DISCOVERY) {
|
||||
/* discovery session */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Login(discovery) from %s (%s) on"
|
||||
SPDK_DEBUGLOG(iscsi, "Login(discovery) from %s (%s) on"
|
||||
" (%s:%s,%d), ISID=%"PRIx64", TSIH=%u,"
|
||||
" CID=%u, HeaderDigest=%s, DataDigest=%s\n",
|
||||
conn->initiator_name, conn->initiator_addr,
|
||||
@ -2159,7 +2159,7 @@ iscsi_op_login_rsp_handle(struct spdk_iscsi_conn *conn,
|
||||
}
|
||||
|
||||
rsp_pdu->data_segment_len = rc;
|
||||
SPDK_LOGDUMP(SPDK_LOG_ISCSI, "Negotiated Params", rsp_pdu->data, rc);
|
||||
SPDK_LOGDUMP(iscsi, "Negotiated Params", rsp_pdu->data, rc);
|
||||
|
||||
/* handle the CSG bit case */
|
||||
rc = iscsi_op_login_rsp_handle_csg_bit(conn, rsp_pdu, *params);
|
||||
@ -2274,10 +2274,10 @@ iscsi_pdu_hdr_op_text(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
task_tag = from_be32(&reqh->itt);
|
||||
ExpStatSN = from_be32(&reqh->exp_stat_sn);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "I=%d, F=%d, C=%d, ITT=%x, TTT=%x\n",
|
||||
SPDK_DEBUGLOG(iscsi, "I=%d, F=%d, C=%d, ITT=%x, TTT=%x\n",
|
||||
reqh->immediate, F_bit, C_bit, task_tag, from_be32(&reqh->ttt));
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"CmdSN=%u, ExpStatSN=%u, StatSN=%u, ExpCmdSN=%u, MaxCmdSN=%u\n",
|
||||
pdu->cmd_sn, ExpStatSN, conn->StatSN, conn->sess->ExpCmdSN,
|
||||
conn->sess->MaxCmdSN);
|
||||
@ -2288,7 +2288,7 @@ iscsi_pdu_hdr_op_text(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
return -1;
|
||||
#else
|
||||
/* StarPort have a bug */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "StatSN(%u) rewound\n", ExpStatSN);
|
||||
SPDK_DEBUGLOG(iscsi, "StatSN(%u) rewound\n", ExpStatSN);
|
||||
conn->StatSN = ExpStatSN;
|
||||
#endif
|
||||
}
|
||||
@ -2413,7 +2413,7 @@ iscsi_pdu_payload_op_text(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *p
|
||||
}
|
||||
|
||||
iscsi_param_free(params);
|
||||
SPDK_LOGDUMP(SPDK_LOG_ISCSI, "Negotiated Params", data, data_len);
|
||||
SPDK_LOGDUMP(iscsi, "Negotiated Params", data, data_len);
|
||||
|
||||
/* response PDU */
|
||||
rsp_pdu = iscsi_get_pdu(conn);
|
||||
@ -2468,12 +2468,12 @@ static void iscsi_conn_logout_pdu_complete(void *arg)
|
||||
* login failed but initiator still sent a logout rather than
|
||||
* just closing the TCP connection.
|
||||
*/
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Logout(login failed) from %s (%s) on"
|
||||
SPDK_DEBUGLOG(iscsi, "Logout(login failed) from %s (%s) on"
|
||||
" (%s:%s,%d)\n",
|
||||
conn->initiator_name, conn->initiator_addr,
|
||||
conn->portal_host, conn->portal_port, conn->pg_tag);
|
||||
} else if (iscsi_param_eq_val(conn->sess->params, "SessionType", "Normal")) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Logout from %s (%s) on %s tgt_node%d"
|
||||
SPDK_DEBUGLOG(iscsi, "Logout from %s (%s) on %s tgt_node%d"
|
||||
" (%s:%s,%d), ISID=%"PRIx64", TSIH=%u,"
|
||||
" CID=%u, HeaderDigest=%s, DataDigest=%s\n",
|
||||
conn->initiator_name, conn->initiator_addr,
|
||||
@ -2486,7 +2486,7 @@ static void iscsi_conn_logout_pdu_complete(void *arg)
|
||||
? "on" : "off"));
|
||||
} else {
|
||||
/* discovery session */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Logout(discovery) from %s (%s) on"
|
||||
SPDK_DEBUGLOG(iscsi, "Logout(discovery) from %s (%s) on"
|
||||
" (%s:%s,%d), ISID=%"PRIx64", TSIH=%u,"
|
||||
" CID=%u, HeaderDigest=%s, DataDigest=%s\n",
|
||||
conn->initiator_name, conn->initiator_addr,
|
||||
@ -2516,7 +2516,7 @@ iscsi_pdu_hdr_op_logout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu
|
||||
task_tag = from_be32(&reqh->itt);
|
||||
ExpStatSN = from_be32(&reqh->exp_stat_sn);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "reason=%d, ITT=%x, cid=%d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "reason=%d, ITT=%x, cid=%d\n",
|
||||
reqh->reason, task_tag, cid);
|
||||
|
||||
if (conn->sess != NULL) {
|
||||
@ -2528,22 +2528,22 @@ iscsi_pdu_hdr_op_logout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu
|
||||
return SPDK_ISCSI_CONNECTION_FATAL;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"CmdSN=%u, ExpStatSN=%u, StatSN=%u, ExpCmdSN=%u, MaxCmdSN=%u\n",
|
||||
pdu->cmd_sn, ExpStatSN, conn->StatSN,
|
||||
conn->sess->ExpCmdSN, conn->sess->MaxCmdSN);
|
||||
|
||||
if (pdu->cmd_sn != conn->sess->ExpCmdSN) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "CmdSN(%u) might have dropped\n", pdu->cmd_sn);
|
||||
SPDK_DEBUGLOG(iscsi, "CmdSN(%u) might have dropped\n", pdu->cmd_sn);
|
||||
/* ignore error */
|
||||
}
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "CmdSN=%u, ExpStatSN=%u, StatSN=%u\n",
|
||||
SPDK_DEBUGLOG(iscsi, "CmdSN=%u, ExpStatSN=%u, StatSN=%u\n",
|
||||
pdu->cmd_sn, ExpStatSN, conn->StatSN);
|
||||
}
|
||||
|
||||
if (ExpStatSN != conn->StatSN) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "StatSN(%u/%u) might have dropped\n",
|
||||
SPDK_DEBUGLOG(iscsi, "StatSN(%u/%u) might have dropped\n",
|
||||
ExpStatSN, conn->StatSN);
|
||||
/* ignore error */
|
||||
}
|
||||
@ -2678,7 +2678,7 @@ iscsi_send_r2t_recovery(struct spdk_iscsi_conn *conn,
|
||||
/* remove the r2t pdu from the snack_list */
|
||||
pdu = iscsi_remove_r2t_pdu_from_snack_list(conn, task, r2t_sn);
|
||||
if (!pdu) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "No pdu is found\n");
|
||||
SPDK_DEBUGLOG(iscsi, "No pdu is found\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -3022,17 +3022,17 @@ iscsi_transfer_in(struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task)
|
||||
|
||||
if (data_len < transfer_len) {
|
||||
/* underflow */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Underflow %u/%u\n", data_len, transfer_len);
|
||||
SPDK_DEBUGLOG(iscsi, "Underflow %u/%u\n", data_len, transfer_len);
|
||||
residual_len = transfer_len - data_len;
|
||||
transfer_len = data_len;
|
||||
datain_flag |= ISCSI_DATAIN_UNDERFLOW;
|
||||
} else if (data_len > transfer_len) {
|
||||
/* overflow */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Overflow %u/%u\n", data_len, transfer_len);
|
||||
SPDK_DEBUGLOG(iscsi, "Overflow %u/%u\n", data_len, transfer_len);
|
||||
residual_len = data_len - transfer_len;
|
||||
datain_flag |= ISCSI_DATAIN_OVERFLOW;
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Transfer %u\n", transfer_len);
|
||||
SPDK_DEBUGLOG(iscsi, "Transfer %u\n", transfer_len);
|
||||
residual_len = 0;
|
||||
}
|
||||
|
||||
@ -3065,9 +3065,9 @@ iscsi_transfer_in(struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Transfer=%d, Offset=%d, Len=%d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "Transfer=%d, Offset=%d, Len=%d\n",
|
||||
sequence_end, offset, len);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "StatSN=%u, DataSN=%u, Offset=%u, Len=%d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "StatSN=%u, DataSN=%u, Offset=%u, Len=%d\n",
|
||||
conn->StatSN, DataSN, offset, len);
|
||||
|
||||
DataSN = iscsi_send_datain(conn, task, datain_flag, residual_len,
|
||||
@ -3123,16 +3123,16 @@ void iscsi_task_response(struct spdk_iscsi_conn *conn,
|
||||
(task->scsi.status == SPDK_SCSI_STATUS_GOOD)) {
|
||||
if (data_len < transfer_len) {
|
||||
/* underflow */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Underflow %zu/%u\n", data_len, transfer_len);
|
||||
SPDK_DEBUGLOG(iscsi, "Underflow %zu/%u\n", data_len, transfer_len);
|
||||
residual_len = transfer_len - data_len;
|
||||
U_bit = 1;
|
||||
} else if (data_len > transfer_len) {
|
||||
/* overflow */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Overflow %zu/%u\n", data_len, transfer_len);
|
||||
SPDK_DEBUGLOG(iscsi, "Overflow %zu/%u\n", data_len, transfer_len);
|
||||
residual_len = data_len - transfer_len;
|
||||
O_bit = 1;
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Transfer %u\n", transfer_len);
|
||||
SPDK_DEBUGLOG(iscsi, "Transfer %u\n", transfer_len);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3319,7 +3319,7 @@ iscsi_pdu_hdr_op_scsi(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
transfer_len = from_be32(&reqh->expected_data_xfer_len);
|
||||
cdb = reqh->cdb;
|
||||
|
||||
SPDK_LOGDUMP(SPDK_LOG_ISCSI, "CDB", cdb, 16);
|
||||
SPDK_LOGDUMP(iscsi, "CDB", cdb, 16);
|
||||
|
||||
task = iscsi_task_get(conn, NULL, iscsi_task_cpl);
|
||||
if (!task) {
|
||||
@ -3582,10 +3582,10 @@ iscsi_pdu_hdr_op_task(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
task_tag = from_be32(&reqh->itt);
|
||||
ref_task_tag = from_be32(&reqh->ref_task_tag);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "I=%d, func=%d, ITT=%x, ref TT=%x, LUN=0x%16.16"PRIx64"\n",
|
||||
SPDK_DEBUGLOG(iscsi, "I=%d, func=%d, ITT=%x, ref TT=%x, LUN=0x%16.16"PRIx64"\n",
|
||||
reqh->immediate, function, task_tag, ref_task_tag, lun);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "StatSN=%u, ExpCmdSN=%u, MaxCmdSN=%u\n",
|
||||
SPDK_DEBUGLOG(iscsi, "StatSN=%u, ExpCmdSN=%u, MaxCmdSN=%u\n",
|
||||
conn->StatSN, conn->sess->ExpCmdSN, conn->sess->MaxCmdSN);
|
||||
|
||||
lun_i = spdk_scsi_lun_id_fmt_to_int(lun);
|
||||
@ -3694,10 +3694,10 @@ iscsi_pdu_hdr_op_nopout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu
|
||||
task_tag = from_be32(&reqh->itt);
|
||||
transfer_tag = from_be32(&reqh->ttt);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "I=%d, ITT=%x, TTT=%x\n",
|
||||
SPDK_DEBUGLOG(iscsi, "I=%d, ITT=%x, TTT=%x\n",
|
||||
I_bit, task_tag, transfer_tag);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "CmdSN=%u, StatSN=%u, ExpCmdSN=%u, MaxCmdSN=%u\n",
|
||||
SPDK_DEBUGLOG(iscsi, "CmdSN=%u, StatSN=%u, ExpCmdSN=%u, MaxCmdSN=%u\n",
|
||||
pdu->cmd_sn, conn->StatSN, conn->sess->ExpCmdSN,
|
||||
conn->sess->MaxCmdSN);
|
||||
|
||||
@ -3750,7 +3750,7 @@ iscsi_pdu_payload_op_nopout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu
|
||||
|
||||
if (task_tag == 0xffffffffU) {
|
||||
assert(I_bit == 1);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "got NOPOUT ITT=0xffffffff\n");
|
||||
SPDK_DEBUGLOG(iscsi, "got NOPOUT ITT=0xffffffff\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -3892,7 +3892,7 @@ iscsi_handle_recovery_datain(struct spdk_iscsi_conn *conn,
|
||||
|
||||
task = iscsi_task_get_primary(task);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "iscsi_handle_recovery_datain\n");
|
||||
SPDK_DEBUGLOG(iscsi, "iscsi_handle_recovery_datain\n");
|
||||
|
||||
if (beg_run < task->acked_data_sn) {
|
||||
SPDK_ERRLOG("ITT: 0x%08x, DATA IN SNACK requests retransmission of"
|
||||
@ -3951,7 +3951,7 @@ iscsi_handle_status_snack(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *p
|
||||
beg_run = from_be32(&reqh->beg_run);
|
||||
run_length = from_be32(&reqh->run_len);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "beg_run=%d, run_length=%d, conn->StatSN="
|
||||
SPDK_DEBUGLOG(iscsi, "beg_run=%d, run_length=%d, conn->StatSN="
|
||||
"%d, conn->exp_statsn=%d\n", beg_run, run_length,
|
||||
conn->StatSN, conn->exp_statsn);
|
||||
|
||||
@ -4011,7 +4011,7 @@ iscsi_handle_data_ack(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
task = NULL;
|
||||
datain_header = NULL;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "beg_run=%d,transfer_tag=%d,run_len=%d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "beg_run=%d,transfer_tag=%d,run_len=%d\n",
|
||||
beg_run, transfer_tag, run_length);
|
||||
|
||||
task = get_scsi_task_from_ttt(conn, transfer_tag);
|
||||
@ -4045,7 +4045,7 @@ iscsi_handle_data_ack(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Received Data ACK SNACK for TTT: 0x%08x,"
|
||||
SPDK_DEBUGLOG(iscsi, "Received Data ACK SNACK for TTT: 0x%08x,"
|
||||
" updated acked DataSN to 0x%08x.\n", transfer_tag,
|
||||
(task->acked_data_sn - 1));
|
||||
|
||||
@ -4079,7 +4079,7 @@ iscsi_pdu_hdr_op_snack(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
}
|
||||
|
||||
type = reqh->flags & ISCSI_FLAG_SNACK_TYPE_MASK;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "The value of type is %d\n", type);
|
||||
SPDK_DEBUGLOG(iscsi, "The value of type is %d\n", type);
|
||||
|
||||
switch (type) {
|
||||
case 0:
|
||||
@ -4088,7 +4088,7 @@ iscsi_pdu_hdr_op_snack(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
beg_run = from_be32(&reqh->beg_run);
|
||||
run_length = from_be32(&reqh->run_len);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "beg_run=%d, run_length=%d, "
|
||||
SPDK_DEBUGLOG(iscsi, "beg_run=%d, run_length=%d, "
|
||||
"task_tag=%x, transfer_tag=%u\n", beg_run,
|
||||
run_length, task_tag, from_be32(&reqh->ttt));
|
||||
|
||||
@ -4236,7 +4236,7 @@ iscsi_pdu_hdr_op_data(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
}
|
||||
|
||||
if (lun_dev == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "LUN %d is removed, complete the task immediately\n",
|
||||
SPDK_DEBUGLOG(iscsi, "LUN %d is removed, complete the task immediately\n",
|
||||
task->lun_id);
|
||||
subtask->scsi.transfer_len = subtask->scsi.length;
|
||||
spdk_scsi_task_process_null_lun(&subtask->scsi);
|
||||
@ -4292,7 +4292,7 @@ iscsi_pdu_payload_op_data(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *p
|
||||
}
|
||||
|
||||
if (spdk_scsi_dev_get_lun(conn->dev, subtask->lun_id) == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "LUN %d is removed, complete the task immediately\n",
|
||||
SPDK_DEBUGLOG(iscsi, "LUN %d is removed, complete the task immediately\n",
|
||||
subtask->lun_id);
|
||||
subtask->scsi.transfer_len = subtask->scsi.length;
|
||||
spdk_scsi_task_process_null_lun(&subtask->scsi);
|
||||
@ -4372,7 +4372,7 @@ iscsi_update_cmdsn(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
pdu->cmd_sn, sess->ExpCmdSN, sess->MaxCmdSN);
|
||||
|
||||
if (sess->ErrorRecoveryLevel >= 1) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Skip the error in ERL 1 and 2\n");
|
||||
SPDK_DEBUGLOG(iscsi, "Skip the error in ERL 1 and 2\n");
|
||||
} else {
|
||||
return SPDK_PDU_FATAL;
|
||||
}
|
||||
@ -4382,7 +4382,7 @@ iscsi_update_cmdsn(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
SPDK_ERRLOG("CmdSN(%u) error ExpCmdSN=%u\n", pdu->cmd_sn, sess->ExpCmdSN);
|
||||
|
||||
if (sess->ErrorRecoveryLevel >= 1) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Skip the error in ERL 1 and 2\n");
|
||||
SPDK_DEBUGLOG(iscsi, "Skip the error in ERL 1 and 2\n");
|
||||
} else if (opcode != ISCSI_OP_NOPOUT) {
|
||||
/*
|
||||
* The Linux initiator does not send valid CmdSNs for
|
||||
@ -4395,7 +4395,7 @@ iscsi_update_cmdsn(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
|
||||
ExpStatSN = from_be32(&reqh->exp_stat_sn);
|
||||
if (spdk_sn32_gt(ExpStatSN, conn->StatSN)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "StatSN(%u) advanced\n", ExpStatSN);
|
||||
SPDK_DEBUGLOG(iscsi, "StatSN(%u) advanced\n", ExpStatSN);
|
||||
ExpStatSN = conn->StatSN;
|
||||
}
|
||||
|
||||
@ -4423,7 +4423,7 @@ iscsi_pdu_hdr_handle(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||
|
||||
opcode = pdu->bhs.opcode;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "opcode %x\n", opcode);
|
||||
SPDK_DEBUGLOG(iscsi, "opcode %x\n", opcode);
|
||||
|
||||
if (opcode == ISCSI_OP_LOGIN) {
|
||||
return iscsi_pdu_hdr_op_login(conn, pdu);
|
||||
@ -4503,7 +4503,7 @@ iscsi_pdu_payload_handle(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pd
|
||||
|
||||
opcode = pdu->bhs.opcode;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "opcode %x\n", opcode);
|
||||
SPDK_DEBUGLOG(iscsi, "opcode %x\n", opcode);
|
||||
|
||||
switch (opcode) {
|
||||
case ISCSI_OP_LOGIN:
|
||||
@ -4588,7 +4588,7 @@ iscsi_read_pdu(struct spdk_iscsi_conn *conn)
|
||||
* and initiator may get logout timeout.
|
||||
*/
|
||||
if (spdk_unlikely(conn->is_logged_out)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "pdu received after logout\n");
|
||||
SPDK_DEBUGLOG(iscsi, "pdu received after logout\n");
|
||||
conn->pdu_recv_state = ISCSI_PDU_RECV_STATE_ERROR;
|
||||
break;
|
||||
}
|
||||
|
@ -334,54 +334,54 @@ struct spdk_iscsi_pdu *iscsi_get_pdu(struct spdk_iscsi_conn *conn)
|
||||
static void
|
||||
iscsi_log_globals(void)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "AuthFile %s\n",
|
||||
SPDK_DEBUGLOG(iscsi, "AuthFile %s\n",
|
||||
g_iscsi.authfile ? g_iscsi.authfile : "(none)");
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "NodeBase %s\n", g_iscsi.nodebase);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "MaxSessions %d\n", g_iscsi.MaxSessions);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "MaxConnectionsPerSession %d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "NodeBase %s\n", g_iscsi.nodebase);
|
||||
SPDK_DEBUGLOG(iscsi, "MaxSessions %d\n", g_iscsi.MaxSessions);
|
||||
SPDK_DEBUGLOG(iscsi, "MaxConnectionsPerSession %d\n",
|
||||
g_iscsi.MaxConnectionsPerSession);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "MaxQueueDepth %d\n", g_iscsi.MaxQueueDepth);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "DefaultTime2Wait %d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "MaxQueueDepth %d\n", g_iscsi.MaxQueueDepth);
|
||||
SPDK_DEBUGLOG(iscsi, "DefaultTime2Wait %d\n",
|
||||
g_iscsi.DefaultTime2Wait);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "DefaultTime2Retain %d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "DefaultTime2Retain %d\n",
|
||||
g_iscsi.DefaultTime2Retain);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "FirstBurstLength %d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "FirstBurstLength %d\n",
|
||||
g_iscsi.FirstBurstLength);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "ImmediateData %s\n",
|
||||
SPDK_DEBUGLOG(iscsi, "ImmediateData %s\n",
|
||||
g_iscsi.ImmediateData ? "Yes" : "No");
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "AllowDuplicateIsid %s\n",
|
||||
SPDK_DEBUGLOG(iscsi, "AllowDuplicateIsid %s\n",
|
||||
g_iscsi.AllowDuplicateIsid ? "Yes" : "No");
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "ErrorRecoveryLevel %d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "ErrorRecoveryLevel %d\n",
|
||||
g_iscsi.ErrorRecoveryLevel);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Timeout %d\n", g_iscsi.timeout);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "NopInInterval %d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "Timeout %d\n", g_iscsi.timeout);
|
||||
SPDK_DEBUGLOG(iscsi, "NopInInterval %d\n",
|
||||
g_iscsi.nopininterval);
|
||||
if (g_iscsi.disable_chap) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"DiscoveryAuthMethod None\n");
|
||||
} else if (!g_iscsi.require_chap) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"DiscoveryAuthMethod Auto\n");
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"DiscoveryAuthMethod %s %s\n",
|
||||
g_iscsi.require_chap ? "CHAP" : "",
|
||||
g_iscsi.mutual_chap ? "Mutual" : "");
|
||||
}
|
||||
|
||||
if (g_iscsi.chap_group == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"DiscoveryAuthGroup None\n");
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"DiscoveryAuthGroup AuthGroup%d\n",
|
||||
g_iscsi.chap_group);
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "MaxLargeDataInPerConnection %d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "MaxLargeDataInPerConnection %d\n",
|
||||
g_iscsi.MaxLargeDataInPerConnection);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "MaxR2TPerConnection %d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "MaxR2TPerConnection %d\n",
|
||||
g_iscsi.MaxR2TPerConnection);
|
||||
}
|
||||
|
||||
@ -505,7 +505,7 @@ iscsi_read_config_file_params(struct spdk_conf_section *sp,
|
||||
|
||||
val = spdk_conf_section_get_val(sp, "Comment");
|
||||
if (val != NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Comment %s\n", val);
|
||||
SPDK_DEBUGLOG(iscsi, "Comment %s\n", val);
|
||||
}
|
||||
|
||||
val = spdk_conf_section_get_val(sp, "AuthFile");
|
||||
@ -732,7 +732,7 @@ iscsi_parse_options(struct spdk_iscsi_opts **popts)
|
||||
}
|
||||
|
||||
/* Process parameters */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "iscsi_read_config_file_parmas\n");
|
||||
SPDK_DEBUGLOG(iscsi, "iscsi_read_config_file_parmas\n");
|
||||
sp = spdk_conf_find_section(NULL, "iSCSI");
|
||||
if (sp != NULL) {
|
||||
rc = iscsi_read_config_file_params(sp, opts);
|
||||
@ -993,7 +993,7 @@ iscsi_parse_auth_group(struct spdk_conf_section *sp)
|
||||
|
||||
val = spdk_conf_section_get_val(sp, "Comment");
|
||||
if (val != NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Comment %s\n", val);
|
||||
SPDK_DEBUGLOG(iscsi, "Comment %s\n", val);
|
||||
}
|
||||
|
||||
tag = spdk_conf_section_get_num(sp);
|
||||
@ -1041,7 +1041,7 @@ iscsi_parse_auth_info(void)
|
||||
|
||||
rc = spdk_conf_read(config, g_iscsi.authfile);
|
||||
if (rc != 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_ISCSI, "Failed to load auth file\n");
|
||||
SPDK_INFOLOG(iscsi, "Failed to load auth file\n");
|
||||
spdk_conf_free(config);
|
||||
return rc;
|
||||
}
|
||||
@ -1195,7 +1195,7 @@ iscsi_parse_configuration(void)
|
||||
SPDK_ERRLOG("iscsi_parse_auth_info() failed\n");
|
||||
}
|
||||
} else {
|
||||
SPDK_INFOLOG(SPDK_LOG_ISCSI, "CHAP secret file is not found in the path %s\n",
|
||||
SPDK_INFOLOG(iscsi, "CHAP secret file is not found in the path %s\n",
|
||||
g_iscsi.authfile);
|
||||
}
|
||||
}
|
||||
@ -1602,4 +1602,4 @@ spdk_iscsi_config_json(struct spdk_json_write_ctx *w)
|
||||
spdk_json_write_array_end(w);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("iscsi", SPDK_LOG_ISCSI)
|
||||
SPDK_LOG_REGISTER_COMPONENT(iscsi)
|
||||
|
@ -105,7 +105,7 @@ iscsi_param_del(struct iscsi_param **params, const char *key)
|
||||
{
|
||||
struct iscsi_param *param, *prev_param = NULL;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "del %s\n", key);
|
||||
SPDK_DEBUGLOG(iscsi, "del %s\n", key);
|
||||
if (params == NULL || key == NULL) {
|
||||
return 0;
|
||||
}
|
||||
@ -132,7 +132,7 @@ iscsi_param_add(struct iscsi_param **params, const char *key,
|
||||
{
|
||||
struct iscsi_param *param, *last_param;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "add %s=%s, list=[%s], type=%d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "add %s=%s, list=[%s], type=%d\n",
|
||||
key, val, list, type);
|
||||
if (key == NULL) {
|
||||
return -1;
|
||||
@ -174,7 +174,7 @@ iscsi_param_set(struct iscsi_param *params, const char *key,
|
||||
{
|
||||
struct iscsi_param *param;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "set %s=%s\n", key, val);
|
||||
SPDK_DEBUGLOG(iscsi, "set %s=%s\n", key, val);
|
||||
param = iscsi_param_find(params, key);
|
||||
if (param == NULL) {
|
||||
SPDK_ERRLOG("no key %s\n", key);
|
||||
@ -194,7 +194,7 @@ iscsi_param_set_int(struct iscsi_param *params, const char *key, uint32_t val)
|
||||
char buf[MAX_TMPBUF];
|
||||
struct iscsi_param *param;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "set %s=%d\n", key, val);
|
||||
SPDK_DEBUGLOG(iscsi, "set %s=%d\n", key, val);
|
||||
param = iscsi_param_find(params, key);
|
||||
if (param == NULL) {
|
||||
SPDK_ERRLOG("no key %s\n", key);
|
||||
@ -572,7 +572,7 @@ iscsi_special_param_construction(struct spdk_iscsi_conn *conn,
|
||||
return -1;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"returning MaxRecvDataSegmentLength=%d\n",
|
||||
SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH);
|
||||
len = snprintf((char *)data + total, alloc_len - total,
|
||||
@ -641,7 +641,7 @@ iscsi_construct_data_from_param(struct iscsi_param *param, char *new_val,
|
||||
return -1;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "negotiated %s=%s\n",
|
||||
SPDK_DEBUGLOG(iscsi, "negotiated %s=%s\n",
|
||||
param->key, new_val);
|
||||
len = snprintf((char *)data + total, alloc_len - total, "%s=%s",
|
||||
param->key, new_val);
|
||||
@ -680,7 +680,7 @@ iscsi_negotiate_param_list(int *add_param_value,
|
||||
*val_end = '\0';
|
||||
}
|
||||
if (strcasecmp(in_start, val_start) == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "match %s\n",
|
||||
SPDK_DEBUGLOG(iscsi, "match %s\n",
|
||||
val_start);
|
||||
flag = 1;
|
||||
break;
|
||||
@ -736,7 +736,7 @@ iscsi_negotiate_param_numerical(int *add_param_value,
|
||||
min_i = (min_val != NULL) ? (int)strtol(min_val, NULL, 10) : 0;
|
||||
max_i = (max_val != NULL) ? (int)strtol(max_val, NULL, 10) : 0;
|
||||
if (val_i < min_i || val_i > max_i) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "key %.64s reject\n", param->key);
|
||||
SPDK_DEBUGLOG(iscsi, "key %.64s reject\n", param->key);
|
||||
new_val = NULL;
|
||||
} else {
|
||||
switch (param->type) {
|
||||
@ -869,7 +869,7 @@ iscsi_negotiate_param_init(struct spdk_iscsi_conn *conn,
|
||||
if ((strncasecmp(param->key, "X-", 2) == 0) ||
|
||||
(strncasecmp(param->key, "X#", 2) == 0)) {
|
||||
/* Extension Key */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"extension key %.64s\n",
|
||||
param->key);
|
||||
} else {
|
||||
@ -1128,7 +1128,7 @@ iscsi_copy_param2var(struct spdk_iscsi_conn *conn)
|
||||
SPDK_ERRLOG("Getval MaxRecvDataSegmentLength failed\n");
|
||||
return -1;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"copy MaxRecvDataSegmentLength=%s\n", val);
|
||||
conn->MaxRecvDataSegmentLength = (int)strtol(val, NULL, 10);
|
||||
if (conn->MaxRecvDataSegmentLength > SPDK_BDEV_LARGE_BUF_MAX_SIZE) {
|
||||
@ -1141,10 +1141,10 @@ iscsi_copy_param2var(struct spdk_iscsi_conn *conn)
|
||||
return -1;
|
||||
}
|
||||
if (strcasecmp(val, "CRC32C") == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "set HeaderDigest=1\n");
|
||||
SPDK_DEBUGLOG(iscsi, "set HeaderDigest=1\n");
|
||||
conn->header_digest = 1;
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "set HeaderDigest=0\n");
|
||||
SPDK_DEBUGLOG(iscsi, "set HeaderDigest=0\n");
|
||||
conn->header_digest = 0;
|
||||
}
|
||||
val = iscsi_param_get_val(conn->params, "DataDigest");
|
||||
@ -1153,10 +1153,10 @@ iscsi_copy_param2var(struct spdk_iscsi_conn *conn)
|
||||
return -1;
|
||||
}
|
||||
if (strcasecmp(val, "CRC32C") == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "set DataDigest=1\n");
|
||||
SPDK_DEBUGLOG(iscsi, "set DataDigest=1\n");
|
||||
conn->data_digest = 1;
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "set DataDigest=0\n");
|
||||
SPDK_DEBUGLOG(iscsi, "set DataDigest=0\n");
|
||||
conn->data_digest = 0;
|
||||
}
|
||||
|
||||
@ -1165,28 +1165,28 @@ iscsi_copy_param2var(struct spdk_iscsi_conn *conn)
|
||||
SPDK_ERRLOG("Getval MaxConnections failed\n");
|
||||
return -1;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "copy MaxConnections=%s\n", val);
|
||||
SPDK_DEBUGLOG(iscsi, "copy MaxConnections=%s\n", val);
|
||||
conn->sess->MaxConnections = (uint32_t) strtol(val, NULL, 10);
|
||||
val = iscsi_param_get_val(conn->sess->params, "MaxOutstandingR2T");
|
||||
if (val == NULL) {
|
||||
SPDK_ERRLOG("Getval MaxOutstandingR2T failed\n");
|
||||
return -1;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "copy MaxOutstandingR2T=%s\n", val);
|
||||
SPDK_DEBUGLOG(iscsi, "copy MaxOutstandingR2T=%s\n", val);
|
||||
conn->sess->MaxOutstandingR2T = (uint32_t) strtol(val, NULL, 10);
|
||||
val = iscsi_param_get_val(conn->sess->params, "FirstBurstLength");
|
||||
if (val == NULL) {
|
||||
SPDK_ERRLOG("Getval FirstBurstLength failed\n");
|
||||
return -1;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "copy FirstBurstLength=%s\n", val);
|
||||
SPDK_DEBUGLOG(iscsi, "copy FirstBurstLength=%s\n", val);
|
||||
conn->sess->FirstBurstLength = (uint32_t) strtol(val, NULL, 10);
|
||||
val = iscsi_param_get_val(conn->sess->params, "MaxBurstLength");
|
||||
if (val == NULL) {
|
||||
SPDK_ERRLOG("Getval MaxBurstLength failed\n");
|
||||
return -1;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "copy MaxBurstLength=%s\n", val);
|
||||
SPDK_DEBUGLOG(iscsi, "copy MaxBurstLength=%s\n", val);
|
||||
conn->sess->MaxBurstLength = (uint32_t) strtol(val, NULL, 10);
|
||||
val = iscsi_param_get_val(conn->sess->params, "InitialR2T");
|
||||
if (val == NULL) {
|
||||
@ -1194,10 +1194,10 @@ iscsi_copy_param2var(struct spdk_iscsi_conn *conn)
|
||||
return -1;
|
||||
}
|
||||
if (strcasecmp(val, "Yes") == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "set InitialR2T=1\n");
|
||||
SPDK_DEBUGLOG(iscsi, "set InitialR2T=1\n");
|
||||
conn->sess->InitialR2T = true;
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "set InitialR2T=0\n");
|
||||
SPDK_DEBUGLOG(iscsi, "set InitialR2T=0\n");
|
||||
conn->sess->InitialR2T = false;
|
||||
}
|
||||
val = iscsi_param_get_val(conn->sess->params, "ImmediateData");
|
||||
@ -1206,10 +1206,10 @@ iscsi_copy_param2var(struct spdk_iscsi_conn *conn)
|
||||
return -1;
|
||||
}
|
||||
if (strcasecmp(val, "Yes") == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "set ImmediateData=1\n");
|
||||
SPDK_DEBUGLOG(iscsi, "set ImmediateData=1\n");
|
||||
conn->sess->ImmediateData = true;
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "set ImmediateData=0\n");
|
||||
SPDK_DEBUGLOG(iscsi, "set ImmediateData=0\n");
|
||||
conn->sess->ImmediateData = false;
|
||||
}
|
||||
return 0;
|
||||
|
@ -159,7 +159,7 @@ iscsi_portal_destroy(struct spdk_iscsi_portal *p)
|
||||
{
|
||||
assert(p != NULL);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "iscsi_portal_destroy\n");
|
||||
SPDK_DEBUGLOG(iscsi, "iscsi_portal_destroy\n");
|
||||
|
||||
pthread_mutex_lock(&g_iscsi.mutex);
|
||||
TAILQ_REMOVE(&g_iscsi.portal_head, p, g_tailq);
|
||||
@ -206,7 +206,7 @@ static void
|
||||
iscsi_portal_close(struct spdk_iscsi_portal *p)
|
||||
{
|
||||
if (p->sock) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "close portal (%s, %s)\n",
|
||||
SPDK_DEBUGLOG(iscsi, "close portal (%s, %s)\n",
|
||||
p->host, p->port);
|
||||
spdk_poller_unregister(&p->acceptor_poller);
|
||||
spdk_sock_close(&p->sock);
|
||||
@ -338,7 +338,7 @@ iscsi_portal_grp_destroy(struct spdk_iscsi_portal_grp *pg)
|
||||
|
||||
assert(pg != NULL);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "iscsi_portal_grp_destroy\n");
|
||||
SPDK_DEBUGLOG(iscsi, "iscsi_portal_grp_destroy\n");
|
||||
while (!TAILQ_EMPTY(&pg->head)) {
|
||||
p = TAILQ_FIRST(&pg->head);
|
||||
TAILQ_REMOVE(&pg->head, p, per_pg_tailq);
|
||||
@ -418,12 +418,12 @@ iscsi_parse_portal_grp(struct spdk_conf_section *sp)
|
||||
char *label, *portal;
|
||||
int i = 0, rc = 0;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "add portal group (from config file) %d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "add portal group (from config file) %d\n",
|
||||
spdk_conf_section_get_num(sp));
|
||||
|
||||
val = spdk_conf_section_get_val(sp, "Comment");
|
||||
if (val != NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Comment %s\n", val);
|
||||
SPDK_DEBUGLOG(iscsi, "Comment %s\n", val);
|
||||
}
|
||||
|
||||
pg = iscsi_portal_grp_create(spdk_conf_section_get_num(sp), false);
|
||||
@ -445,7 +445,7 @@ iscsi_parse_portal_grp(struct spdk_conf_section *sp)
|
||||
goto error;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
|
||||
SPDK_DEBUGLOG(iscsi,
|
||||
"RIndex=%d, Host=%s, Port=%s, Tag=%d\n",
|
||||
i, p->host, p->port, spdk_conf_section_get_num(sp));
|
||||
|
||||
@ -517,7 +517,7 @@ iscsi_portal_grps_destroy(void)
|
||||
{
|
||||
struct spdk_iscsi_portal_grp *pg;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "iscsi_portal_grps_destroy\n");
|
||||
SPDK_DEBUGLOG(iscsi, "iscsi_portal_grps_destroy\n");
|
||||
pthread_mutex_lock(&g_iscsi.mutex);
|
||||
while (!TAILQ_EMPTY(&g_iscsi.pg_head)) {
|
||||
pg = TAILQ_FIRST(&g_iscsi.pg_head);
|
||||
@ -559,7 +559,7 @@ iscsi_portal_grp_close_all(void)
|
||||
{
|
||||
struct spdk_iscsi_portal_grp *pg;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "iscsi_portal_grp_close_all\n");
|
||||
SPDK_DEBUGLOG(iscsi, "iscsi_portal_grp_close_all\n");
|
||||
pthread_mutex_lock(&g_iscsi.mutex);
|
||||
TAILQ_FOREACH(pg, &g_iscsi.pg_head, tailq) {
|
||||
iscsi_portal_grp_close(pg);
|
||||
|
@ -87,8 +87,8 @@ iscsi_ipv6_netmask_allow_addr(const char *netmask, const char *addr)
|
||||
}
|
||||
|
||||
#if 0
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "input %s\n", addr);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "mask %s / %d\n", mask, bits);
|
||||
SPDK_DEBUGLOG(iscsi, "input %s\n", addr);
|
||||
SPDK_DEBUGLOG(iscsi, "mask %s / %d\n", mask, bits);
|
||||
#endif
|
||||
|
||||
/* presentation to network order binary */
|
||||
@ -192,7 +192,7 @@ iscsi_init_grp_allow_addr(struct spdk_iscsi_init_grp *igp,
|
||||
struct spdk_iscsi_initiator_netmask *imask;
|
||||
|
||||
TAILQ_FOREACH(imask, &igp->netmask_head, tailq) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "netmask=%s, addr=%s\n",
|
||||
SPDK_DEBUGLOG(iscsi, "netmask=%s, addr=%s\n",
|
||||
imask->mask, addr);
|
||||
if (iscsi_netmask_allow_addr(imask->mask, addr)) {
|
||||
return true;
|
||||
@ -244,7 +244,7 @@ iscsi_tgt_node_access(struct spdk_iscsi_conn *conn,
|
||||
}
|
||||
pg = conn->portal->group;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "pg=%d, iqn=%s, addr=%s\n",
|
||||
SPDK_DEBUGLOG(iscsi, "pg=%d, iqn=%s, addr=%s\n",
|
||||
pg->tag, iqn, addr);
|
||||
pg_map = iscsi_tgt_node_find_pg_map(target, pg);
|
||||
if (pg_map == NULL) {
|
||||
@ -266,7 +266,7 @@ iscsi_tgt_node_access(struct spdk_iscsi_conn *conn,
|
||||
}
|
||||
|
||||
denied:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "access denied from %s (%s) to %s (%s:%s,%d)\n",
|
||||
SPDK_DEBUGLOG(iscsi, "access denied from %s (%s) to %s (%s:%s,%d)\n",
|
||||
iqn, addr, target->name, conn->portal_host,
|
||||
conn->portal_port, conn->pg_tag);
|
||||
return false;
|
||||
@ -340,7 +340,7 @@ iscsi_send_tgt_portals(struct spdk_iscsi_conn *conn,
|
||||
continue;
|
||||
}
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "TargetAddress=%s:%s,%d\n",
|
||||
SPDK_DEBUGLOG(iscsi, "TargetAddress=%s:%s,%d\n",
|
||||
host, p->port, pg->tag);
|
||||
len = snprintf((char *)data + total, alloc_len - total,
|
||||
"TargetAddress=%s:%s,%d", host, p->port, pg->tag);
|
||||
@ -600,7 +600,7 @@ iscsi_tgt_node_delete_pg_map(struct spdk_iscsi_tgt_node *target,
|
||||
}
|
||||
|
||||
if (pg_map->num_ig_maps > 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "delete %d ig_maps forcefully\n",
|
||||
SPDK_DEBUGLOG(iscsi, "delete %d ig_maps forcefully\n",
|
||||
pg_map->num_ig_maps);
|
||||
}
|
||||
|
||||
@ -1097,7 +1097,7 @@ struct spdk_iscsi_tgt_node *iscsi_tgt_node_construct(int target_index,
|
||||
if (queue_depth > 0 && ((uint32_t)queue_depth <= g_iscsi.MaxQueueDepth)) {
|
||||
target->queue_depth = queue_depth;
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "QueueDepth %d is invalid and %d is used instead.\n",
|
||||
SPDK_DEBUGLOG(iscsi, "QueueDepth %d is invalid and %d is used instead.\n",
|
||||
queue_depth, g_iscsi.MaxQueueDepth);
|
||||
target->queue_depth = g_iscsi.MaxQueueDepth;
|
||||
}
|
||||
@ -1132,7 +1132,7 @@ iscsi_parse_tgt_node(struct spdk_conf_section *sp)
|
||||
|
||||
target_num = spdk_conf_section_get_num(sp);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "add unit %d\n", target_num);
|
||||
SPDK_DEBUGLOG(iscsi, "add unit %d\n", target_num);
|
||||
|
||||
data_digest = false;
|
||||
header_digest = false;
|
||||
@ -1221,11 +1221,11 @@ iscsi_parse_tgt_node(struct spdk_conf_section *sp)
|
||||
}
|
||||
}
|
||||
if (disable_chap) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "AuthMethod None\n");
|
||||
SPDK_DEBUGLOG(iscsi, "AuthMethod None\n");
|
||||
} else if (!require_chap) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "AuthMethod Auto\n");
|
||||
SPDK_DEBUGLOG(iscsi, "AuthMethod Auto\n");
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "AuthMethod CHAP %s\n",
|
||||
SPDK_DEBUGLOG(iscsi, "AuthMethod CHAP %s\n",
|
||||
mutual_chap ? "Mutual" : "");
|
||||
}
|
||||
|
||||
@ -1250,9 +1250,9 @@ iscsi_parse_tgt_node(struct spdk_conf_section *sp)
|
||||
}
|
||||
}
|
||||
if (chap_group == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "AuthGroup None\n");
|
||||
SPDK_DEBUGLOG(iscsi, "AuthGroup None\n");
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "AuthGroup AuthGroup%d\n", chap_group);
|
||||
SPDK_DEBUGLOG(iscsi, "AuthGroup AuthGroup%d\n", chap_group);
|
||||
}
|
||||
|
||||
val = spdk_conf_section_get_val(sp, "UseDigest");
|
||||
@ -1276,9 +1276,9 @@ iscsi_parse_tgt_node(struct spdk_conf_section *sp)
|
||||
}
|
||||
}
|
||||
if (!header_digest && !data_digest) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "UseDigest Auto\n");
|
||||
SPDK_DEBUGLOG(iscsi, "UseDigest Auto\n");
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "UseDigest %s %s\n",
|
||||
SPDK_DEBUGLOG(iscsi, "UseDigest %s %s\n",
|
||||
header_digest ? "Header" : "",
|
||||
data_digest ? "Data" : "");
|
||||
}
|
||||
@ -1324,7 +1324,7 @@ iscsi_parse_tgt_node(struct spdk_conf_section *sp)
|
||||
struct spdk_scsi_lun *lun = spdk_scsi_dev_get_lun(target->dev, i);
|
||||
|
||||
if (lun) {
|
||||
SPDK_INFOLOG(SPDK_LOG_ISCSI, "device %d: LUN%d %s\n",
|
||||
SPDK_INFOLOG(iscsi, "device %d: LUN%d %s\n",
|
||||
spdk_scsi_dev_get_id(target->dev),
|
||||
spdk_scsi_lun_get_id(lun),
|
||||
spdk_scsi_lun_get_bdev_name(lun));
|
||||
@ -1339,7 +1339,7 @@ int iscsi_parse_tgt_nodes(void)
|
||||
struct spdk_conf_section *sp;
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "iscsi_parse_tgt_nodes\n");
|
||||
SPDK_DEBUGLOG(iscsi, "iscsi_parse_tgt_nodes\n");
|
||||
|
||||
sp = spdk_conf_first_section(NULL);
|
||||
while (sp != NULL) {
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "spdk_internal/utf.h"
|
||||
#include "spdk_internal/log.h"
|
||||
|
||||
#define SPDK_JSON_DEBUG(...) SPDK_DEBUGLOG(SPDK_LOG_JSON_UTIL, __VA_ARGS__)
|
||||
#define SPDK_JSON_DEBUG(...) SPDK_DEBUGLOG(json_util, __VA_ARGS__)
|
||||
|
||||
size_t
|
||||
spdk_json_val_len(const struct spdk_json_val *val)
|
||||
@ -664,4 +664,4 @@ spdk_json_next(struct spdk_json_val *it)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("json_util", SPDK_LOG_JSON_UTIL)
|
||||
SPDK_LOG_REGISTER_COMPONENT(json_util)
|
||||
|
@ -92,7 +92,7 @@ jsonrpc_parse_response(struct spdk_jsonrpc_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RPC_CLIENT, "JSON string is :\n%s\n", client->recv_buf);
|
||||
SPDK_DEBUGLOG(rpc_client, "JSON string is :\n%s\n", client->recv_buf);
|
||||
if (rc < 0 || rc > SPDK_JSONRPC_CLIENT_MAX_VALUES) {
|
||||
SPDK_ERRLOG("JSON parse error (rc: %zd)\n", rc);
|
||||
/*
|
||||
@ -224,4 +224,4 @@ spdk_jsonrpc_end_request(struct spdk_jsonrpc_client_request *request, struct spd
|
||||
jsonrpc_client_write_cb(request, "\n", 1);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("rpc_client", SPDK_LOG_RPC_CLIENT)
|
||||
SPDK_LOG_REGISTER_COMPONENT(rpc_client)
|
||||
|
@ -160,7 +160,7 @@ jsonrpc_parse_request(struct spdk_jsonrpc_server_conn *conn, const void *json, s
|
||||
|
||||
request = calloc(1, sizeof(*request));
|
||||
if (request == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RPC, "Out of memory allocating request\n");
|
||||
SPDK_DEBUGLOG(rpc, "Out of memory allocating request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ jsonrpc_parse_request(struct spdk_jsonrpc_server_conn *conn, const void *json, s
|
||||
}
|
||||
|
||||
if (rc <= 0 || rc > SPDK_JSONRPC_MAX_VALUES) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RPC, "JSON parse error\n");
|
||||
SPDK_DEBUGLOG(rpc, "JSON parse error\n");
|
||||
jsonrpc_server_handle_error(request, SPDK_JSONRPC_ERROR_PARSE_ERROR);
|
||||
|
||||
/*
|
||||
@ -222,7 +222,7 @@ jsonrpc_parse_request(struct spdk_jsonrpc_server_conn *conn, const void *json, s
|
||||
rc = spdk_json_parse(request->recv_buffer, size, request->values, request->values_cnt, &end,
|
||||
SPDK_JSON_PARSE_FLAG_DECODE_IN_PLACE);
|
||||
if (rc < 0 || rc > SPDK_JSONRPC_MAX_VALUES) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RPC, "JSON parse error on second pass\n");
|
||||
SPDK_DEBUGLOG(rpc, "JSON parse error on second pass\n");
|
||||
jsonrpc_server_handle_error(request, SPDK_JSONRPC_ERROR_PARSE_ERROR);
|
||||
return -1;
|
||||
}
|
||||
@ -232,10 +232,10 @@ jsonrpc_parse_request(struct spdk_jsonrpc_server_conn *conn, const void *json, s
|
||||
if (request->values[0].type == SPDK_JSON_VAL_OBJECT_BEGIN) {
|
||||
parse_single_request(request, request->values);
|
||||
} else if (request->values[0].type == SPDK_JSON_VAL_ARRAY_BEGIN) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RPC, "Got batch array (not currently supported)\n");
|
||||
SPDK_DEBUGLOG(rpc, "Got batch array (not currently supported)\n");
|
||||
jsonrpc_server_handle_error(request, SPDK_JSONRPC_ERROR_INVALID_REQUEST);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RPC, "top-level JSON value was not array or object\n");
|
||||
SPDK_DEBUGLOG(rpc, "top-level JSON value was not array or object\n");
|
||||
jsonrpc_server_handle_error(request, SPDK_JSONRPC_ERROR_INVALID_REQUEST);
|
||||
}
|
||||
|
||||
@ -358,4 +358,4 @@ spdk_jsonrpc_send_error_response_fmt(struct spdk_jsonrpc_request *request,
|
||||
end_response(request);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("rpc", SPDK_LOG_RPC)
|
||||
SPDK_LOG_REGISTER_COMPONENT(rpc)
|
||||
|
@ -298,12 +298,12 @@ jsonrpc_server_conn_recv(struct spdk_jsonrpc_server_conn *conn)
|
||||
if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) {
|
||||
return 0;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RPC, "recv() failed: %s\n", spdk_strerror(errno));
|
||||
SPDK_DEBUGLOG(rpc, "recv() failed: %s\n", spdk_strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (rc == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RPC, "remote closed connection\n");
|
||||
SPDK_DEBUGLOG(rpc, "remote closed connection\n");
|
||||
conn->closed = true;
|
||||
return 0;
|
||||
}
|
||||
@ -375,7 +375,7 @@ more:
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RPC, "send() failed: %s\n", spdk_strerror(errno));
|
||||
SPDK_DEBUGLOG(rpc, "send() failed: %s\n", spdk_strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ static TAILQ_HEAD(, spdk_log_flag) g_log_flags = TAILQ_HEAD_INITIALIZER(g_log_fl
|
||||
enum spdk_log_level g_spdk_log_level = SPDK_LOG_NOTICE;
|
||||
enum spdk_log_level g_spdk_log_print_level = SPDK_LOG_NOTICE;
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("log", SPDK_LOG_LOG)
|
||||
SPDK_LOG_REGISTER_COMPONENT(log)
|
||||
|
||||
#define MAX_TMPBUF 1024
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#define LVOL_NAME "name"
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("lvol", SPDK_LOG_LVOL)
|
||||
SPDK_LOG_REGISTER_COMPONENT(lvol)
|
||||
|
||||
static TAILQ_HEAD(, spdk_lvol_store) g_lvol_stores = TAILQ_HEAD_INITIALIZER(g_lvol_stores);
|
||||
static pthread_mutex_t g_lvol_stores_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
@ -95,7 +95,7 @@ lvol_open_cb(void *cb_arg, struct spdk_blob *blob, int lvolerrno)
|
||||
struct spdk_lvol *lvol = req->lvol;
|
||||
|
||||
if (lvolerrno != 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Failed to open lvol %s\n", lvol->unique_id);
|
||||
SPDK_INFOLOG(lvol, "Failed to open lvol %s\n", lvol->unique_id);
|
||||
goto end;
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ load_next_lvol(void *cb_arg, struct spdk_blob *blob, int lvolerrno)
|
||||
blob_id = spdk_blob_get_id(blob);
|
||||
|
||||
if (blob_id == lvs->super_blob_id) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "found superblob %"PRIu64"\n", (uint64_t)blob_id);
|
||||
SPDK_INFOLOG(lvol, "found superblob %"PRIu64"\n", (uint64_t)blob_id);
|
||||
spdk_bs_iter_next(bs, blob, load_next_lvol, req);
|
||||
return;
|
||||
}
|
||||
@ -204,7 +204,7 @@ load_next_lvol(void *cb_arg, struct spdk_blob *blob, int lvolerrno)
|
||||
rc = spdk_blob_get_xattr_value(blob, "uuid", (const void **)&attr, &value_len);
|
||||
if (rc != 0 || value_len != SPDK_UUID_STRING_LEN || attr[SPDK_UUID_STRING_LEN - 1] != '\0' ||
|
||||
spdk_uuid_parse(&lvol->uuid, attr) != 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Missing or corrupt lvol uuid\n");
|
||||
SPDK_INFOLOG(lvol, "Missing or corrupt lvol uuid\n");
|
||||
memset(&lvol->uuid, 0, sizeof(lvol->uuid));
|
||||
}
|
||||
spdk_uuid_fmt_lower(lvol->uuid_str, sizeof(lvol->uuid_str), &lvol->uuid);
|
||||
@ -232,7 +232,7 @@ load_next_lvol(void *cb_arg, struct spdk_blob *blob, int lvolerrno)
|
||||
|
||||
lvs->lvol_count++;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "added lvol %s (%s)\n", lvol->unique_id, lvol->uuid_str);
|
||||
SPDK_INFOLOG(lvol, "added lvol %s (%s)\n", lvol->unique_id, lvol->uuid_str);
|
||||
|
||||
spdk_bs_iter_next(bs, blob, load_next_lvol, req);
|
||||
|
||||
@ -256,7 +256,7 @@ close_super_cb(void *cb_arg, int lvolerrno)
|
||||
struct spdk_blob_store *bs = lvs->blobstore;
|
||||
|
||||
if (lvolerrno != 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Could not close super blob\n");
|
||||
SPDK_INFOLOG(lvol, "Could not close super blob\n");
|
||||
lvs_free(lvs);
|
||||
req->lvserrno = -ENODEV;
|
||||
spdk_bs_unload(bs, bs_unload_with_error_cb, req);
|
||||
@ -290,7 +290,7 @@ lvs_read_uuid(void *cb_arg, struct spdk_blob *blob, int lvolerrno)
|
||||
int rc;
|
||||
|
||||
if (lvolerrno != 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Could not open super blob\n");
|
||||
SPDK_INFOLOG(lvol, "Could not open super blob\n");
|
||||
lvs_free(lvs);
|
||||
req->lvserrno = -ENODEV;
|
||||
spdk_bs_unload(bs, bs_unload_with_error_cb, req);
|
||||
@ -299,14 +299,14 @@ lvs_read_uuid(void *cb_arg, struct spdk_blob *blob, int lvolerrno)
|
||||
|
||||
rc = spdk_blob_get_xattr_value(blob, "uuid", (const void **)&attr, &value_len);
|
||||
if (rc != 0 || value_len != SPDK_UUID_STRING_LEN || attr[SPDK_UUID_STRING_LEN - 1] != '\0') {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "missing or incorrect UUID\n");
|
||||
SPDK_INFOLOG(lvol, "missing or incorrect UUID\n");
|
||||
req->lvserrno = -EINVAL;
|
||||
spdk_blob_close(blob, close_super_blob_with_error_cb, req);
|
||||
return;
|
||||
}
|
||||
|
||||
if (spdk_uuid_parse(&lvs->uuid, attr)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "incorrect UUID '%s'\n", attr);
|
||||
SPDK_INFOLOG(lvol, "incorrect UUID '%s'\n", attr);
|
||||
req->lvserrno = -EINVAL;
|
||||
spdk_blob_close(blob, close_super_blob_with_error_cb, req);
|
||||
return;
|
||||
@ -314,7 +314,7 @@ lvs_read_uuid(void *cb_arg, struct spdk_blob *blob, int lvolerrno)
|
||||
|
||||
rc = spdk_blob_get_xattr_value(blob, "name", (const void **)&attr, &value_len);
|
||||
if (rc != 0 || value_len > SPDK_LVS_NAME_MAX) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "missing or invalid name\n");
|
||||
SPDK_INFOLOG(lvol, "missing or invalid name\n");
|
||||
req->lvserrno = -EINVAL;
|
||||
spdk_blob_close(blob, close_super_blob_with_error_cb, req);
|
||||
return;
|
||||
@ -324,7 +324,7 @@ lvs_read_uuid(void *cb_arg, struct spdk_blob *blob, int lvolerrno)
|
||||
|
||||
rc = add_lvs_to_list(lvs);
|
||||
if (rc) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "lvolstore with name %s already exists\n", lvs->name);
|
||||
SPDK_INFOLOG(lvol, "lvolstore with name %s already exists\n", lvs->name);
|
||||
req->lvserrno = -EEXIST;
|
||||
spdk_blob_close(blob, close_super_blob_with_error_cb, req);
|
||||
return;
|
||||
@ -343,7 +343,7 @@ lvs_open_super(void *cb_arg, spdk_blob_id blobid, int lvolerrno)
|
||||
struct spdk_blob_store *bs = lvs->blobstore;
|
||||
|
||||
if (lvolerrno != 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Super blob not found\n");
|
||||
SPDK_INFOLOG(lvol, "Super blob not found\n");
|
||||
lvs_free(lvs);
|
||||
req->lvserrno = -ENODEV;
|
||||
spdk_bs_unload(bs, bs_unload_with_error_cb, req);
|
||||
@ -549,7 +549,7 @@ lvs_init_cb(void *cb_arg, struct spdk_blob_store *bs, int lvserrno)
|
||||
TAILQ_INIT(&lvs->lvols);
|
||||
TAILQ_INIT(&lvs->pending_lvols);
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Lvol store initialized\n");
|
||||
SPDK_INFOLOG(lvol, "Lvol store initialized\n");
|
||||
|
||||
/* create super blob */
|
||||
spdk_bs_create_blob(lvs->blobstore, super_blob_create_cb, lvs_req);
|
||||
@ -635,7 +635,7 @@ spdk_lvs_init(struct spdk_bs_dev *bs_dev, struct spdk_lvs_opts *o,
|
||||
|
||||
snprintf(opts.bstype.bstype, sizeof(opts.bstype.bstype), "LVOLSTORE");
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Initializing lvol store\n");
|
||||
SPDK_INFOLOG(lvol, "Initializing lvol store\n");
|
||||
spdk_bs_init(bs_dev, &opts, lvs_init_cb, lvs_req);
|
||||
|
||||
return 0;
|
||||
@ -749,7 +749,7 @@ _lvs_unload_cb(void *cb_arg, int lvserrno)
|
||||
{
|
||||
struct spdk_lvs_req *lvs_req = cb_arg;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Lvol store unloaded\n");
|
||||
SPDK_INFOLOG(lvol, "Lvol store unloaded\n");
|
||||
assert(lvs_req->cb_fn != NULL);
|
||||
lvs_req->cb_fn(lvs_req->cb_arg, lvserrno);
|
||||
free(lvs_req);
|
||||
@ -793,7 +793,7 @@ spdk_lvs_unload(struct spdk_lvol_store *lvs, spdk_lvs_op_complete cb_fn,
|
||||
lvs_req->cb_fn = cb_fn;
|
||||
lvs_req->cb_arg = cb_arg;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Unloading lvol store\n");
|
||||
SPDK_INFOLOG(lvol, "Unloading lvol store\n");
|
||||
spdk_bs_unload(lvs->blobstore, _lvs_unload_cb, lvs_req);
|
||||
lvs_free(lvs);
|
||||
|
||||
@ -805,7 +805,7 @@ _lvs_destroy_cb(void *cb_arg, int lvserrno)
|
||||
{
|
||||
struct spdk_lvs_destroy_req *lvs_req = cb_arg;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Lvol store destroyed\n");
|
||||
SPDK_INFOLOG(lvol, "Lvol store destroyed\n");
|
||||
assert(lvs_req->cb_fn != NULL);
|
||||
lvs_req->cb_fn(lvs_req->cb_arg, lvserrno);
|
||||
free(lvs_req);
|
||||
@ -819,7 +819,7 @@ _lvs_destroy_super_cb(void *cb_arg, int bserrno)
|
||||
|
||||
assert(lvs != NULL);
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Destroying lvol store\n");
|
||||
SPDK_INFOLOG(lvol, "Destroying lvol store\n");
|
||||
spdk_bs_destroy(lvs->blobstore, _lvs_destroy_cb, lvs_req);
|
||||
lvs_free(lvs);
|
||||
}
|
||||
@ -862,7 +862,7 @@ spdk_lvs_destroy(struct spdk_lvol_store *lvs, spdk_lvs_op_complete cb_fn,
|
||||
lvs_req->cb_arg = cb_arg;
|
||||
lvs_req->lvs = lvs;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Deleting super blob\n");
|
||||
SPDK_INFOLOG(lvol, "Deleting super blob\n");
|
||||
spdk_bs_delete_blob(lvs->blobstore, lvs->super_blob_id, _lvs_destroy_super_cb, lvs_req);
|
||||
|
||||
return 0;
|
||||
@ -882,7 +882,7 @@ lvol_close_blob_cb(void *cb_arg, int lvolerrno)
|
||||
|
||||
lvol->ref_count--;
|
||||
lvol->action_in_progress = false;
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Lvol %s closed\n", lvol->unique_id);
|
||||
SPDK_INFOLOG(lvol, "Lvol %s closed\n", lvol->unique_id);
|
||||
|
||||
end:
|
||||
req->cb_fn(req->cb_arg, lvolerrno);
|
||||
@ -907,7 +907,7 @@ lvol_delete_blob_cb(void *cb_arg, int lvolerrno)
|
||||
if (lvolerrno < 0) {
|
||||
SPDK_ERRLOG("Could not remove blob on lvol gracefully - forced removal\n");
|
||||
} else {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Lvol %s deleted\n", lvol->unique_id);
|
||||
SPDK_INFOLOG(lvol, "Lvol %s deleted\n", lvol->unique_id);
|
||||
}
|
||||
|
||||
TAILQ_REMOVE(&lvol->lvol_store->lvols, lvol, link);
|
||||
@ -988,7 +988,7 @@ lvs_verify_lvol_name(struct spdk_lvol_store *lvs, const char *name)
|
||||
struct spdk_lvol *tmp;
|
||||
|
||||
if (name == NULL || strnlen(name, SPDK_LVOL_NAME_MAX) == 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "lvol name not provided.\n");
|
||||
SPDK_INFOLOG(lvol, "lvol name not provided.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -1090,7 +1090,7 @@ spdk_lvol_create_snapshot(struct spdk_lvol *origlvol, const char *snapshot_name,
|
||||
int rc;
|
||||
|
||||
if (origlvol == NULL) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Lvol not provided.\n");
|
||||
SPDK_INFOLOG(lvol, "Lvol not provided.\n");
|
||||
cb_fn(cb_arg, NULL, -EINVAL);
|
||||
return;
|
||||
}
|
||||
@ -1154,7 +1154,7 @@ spdk_lvol_create_clone(struct spdk_lvol *origlvol, const char *clone_name,
|
||||
int rc;
|
||||
|
||||
if (origlvol == NULL) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL, "Lvol not provided.\n");
|
||||
SPDK_INFOLOG(lvol, "Lvol not provided.\n");
|
||||
cb_fn(cb_arg, NULL, -EINVAL);
|
||||
return;
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ nbd_resubmit_io(void *arg)
|
||||
|
||||
rc = nbd_submit_bdev_io(nbd, io);
|
||||
if (rc) {
|
||||
SPDK_INFOLOG(SPDK_LOG_NBD, "nbd: io resubmit for dev %s , io_type %d, returned %d.\n",
|
||||
SPDK_INFOLOG(nbd, "nbd: io resubmit for dev %s , io_type %d, returned %d.\n",
|
||||
nbd_disk_get_bdev_name(nbd), from_be32(&io->req.type), rc);
|
||||
}
|
||||
}
|
||||
@ -531,7 +531,7 @@ nbd_submit_bdev_io(struct spdk_nbd_disk *nbd, struct nbd_io *io)
|
||||
|
||||
if (rc < 0) {
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_INFOLOG(SPDK_LOG_NBD, "No memory, start to queue io.\n");
|
||||
SPDK_INFOLOG(nbd, "No memory, start to queue io.\n");
|
||||
nbd_queue_io(io);
|
||||
} else {
|
||||
SPDK_ERRLOG("nbd io failed in nbd_queue_io, rc=%d.\n", rc);
|
||||
@ -829,7 +829,7 @@ nbd_poll(void *arg)
|
||||
|
||||
rc = _nbd_poll(nbd);
|
||||
if (rc < 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_NBD, "nbd_poll() returned %s (%d); closing connection\n",
|
||||
SPDK_INFOLOG(nbd, "nbd_poll() returned %s (%d); closing connection\n",
|
||||
spdk_strerror(-rc), rc);
|
||||
spdk_nbd_stop(nbd);
|
||||
}
|
||||
@ -1067,7 +1067,7 @@ spdk_nbd_start(const char *bdev_name, const char *nbd_path,
|
||||
goto err;
|
||||
}
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_NBD, "Enabling kernel access to bdev %s via %s\n",
|
||||
SPDK_INFOLOG(nbd, "Enabling kernel access to bdev %s via %s\n",
|
||||
spdk_bdev_get_name(bdev), nbd_path);
|
||||
|
||||
nbd_enable_kernel(ctx);
|
||||
@ -1090,4 +1090,4 @@ spdk_nbd_get_path(struct spdk_nbd_disk *nbd)
|
||||
return nbd->nbd_path;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("nbd", SPDK_LOG_NBD)
|
||||
SPDK_LOG_REGISTER_COMPONENT(nbd)
|
||||
|
@ -153,7 +153,7 @@ rpc_start_nbd_done(void *cb_arg, struct spdk_nbd_disk *nbd, int rc)
|
||||
return;
|
||||
}
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_NBD, "There is no available nbd device.\n");
|
||||
SPDK_INFOLOG(nbd, "There is no available nbd device.\n");
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
@ -199,13 +199,13 @@ rpc_nbd_start_disk(struct spdk_jsonrpc_request *request,
|
||||
req->nbd_idx_specified = true;
|
||||
rc = check_available_nbd_disk(req->nbd_device);
|
||||
if (rc == -EBUSY) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NBD, "NBD device %s is in using.\n", req->nbd_device);
|
||||
SPDK_DEBUGLOG(nbd, "NBD device %s is in using.\n", req->nbd_device);
|
||||
spdk_jsonrpc_send_error_response(request, -EBUSY, spdk_strerror(-rc));
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
if (rc != 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NBD, "Illegal nbd_device %s.\n", req->nbd_device);
|
||||
SPDK_DEBUGLOG(nbd, "Illegal nbd_device %s.\n", req->nbd_device);
|
||||
spdk_jsonrpc_send_error_response_fmt(request, -ENODEV,
|
||||
"illegal nbd device %s", req->nbd_device);
|
||||
goto invalid;
|
||||
@ -214,7 +214,7 @@ rpc_nbd_start_disk(struct spdk_jsonrpc_request *request,
|
||||
req->nbd_idx = 0;
|
||||
req->nbd_device = find_available_nbd_disk(req->nbd_idx, &req->nbd_idx);
|
||||
if (req->nbd_device == NULL) {
|
||||
SPDK_INFOLOG(SPDK_LOG_NBD, "There is no available nbd device.\n");
|
||||
SPDK_INFOLOG(nbd, "There is no available nbd device.\n");
|
||||
spdk_jsonrpc_send_error_response(request, -ENODEV,
|
||||
"nbd device not found");
|
||||
goto invalid;
|
||||
|
@ -68,7 +68,7 @@ rpc_net_interface_add_ip_address(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_ip_address_decoders,
|
||||
SPDK_COUNTOF(rpc_ip_address_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NET, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(net, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto invalid;
|
||||
@ -115,7 +115,7 @@ rpc_net_interface_delete_ip_address(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_ip_address_decoders,
|
||||
SPDK_COUNTOF(rpc_ip_address_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NET, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(net, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto invalid;
|
||||
@ -195,4 +195,4 @@ rpc_net_get_interfaces(struct spdk_jsonrpc_request *request,
|
||||
SPDK_RPC_REGISTER("net_get_interfaces", rpc_net_get_interfaces, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(net_get_interfaces, get_interfaces)
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("net", SPDK_LOG_NET)
|
||||
SPDK_LOG_REGISTER_COMPONENT(net)
|
||||
|
@ -104,7 +104,7 @@ rpc_notify_get_notifications(struct spdk_jsonrpc_request *request,
|
||||
if (params &&
|
||||
spdk_json_decode_object(params, rpc_notify_get_notifications_decoders,
|
||||
SPDK_COUNTOF(rpc_notify_get_notifications_decoders), &req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NOTIFY_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(notify_rpc, "spdk_json_decode_object failed\n");
|
||||
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
||||
spdk_strerror(EINVAL));
|
||||
@ -123,4 +123,4 @@ rpc_notify_get_notifications(struct spdk_jsonrpc_request *request,
|
||||
SPDK_RPC_REGISTER("notify_get_notifications", rpc_notify_get_notifications, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(notify_get_notifications, get_notifications)
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("notify_rpc", SPDK_LOG_NOTIFY_RPC)
|
||||
SPDK_LOG_REGISTER_COMPONENT(notify_rpc)
|
||||
|
@ -464,7 +464,7 @@ nvme_driver_init(void)
|
||||
g_spdk_nvme_driver->initialized = false;
|
||||
g_spdk_nvme_driver->hotplug_fd = nvme_uevent_connect();
|
||||
if (g_spdk_nvme_driver->hotplug_fd < 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Failed to open uevent netlink socket\n");
|
||||
SPDK_DEBUGLOG(nvme, "Failed to open uevent netlink socket\n");
|
||||
}
|
||||
|
||||
TAILQ_INIT(&g_spdk_nvme_driver->shared_attached_ctrlrs);
|
||||
@ -1453,4 +1453,4 @@ spdk_nvme_connect_async(const struct spdk_nvme_transport_id *trid,
|
||||
return probe_ctx;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("nvme", SPDK_LOG_NVME)
|
||||
SPDK_LOG_REGISTER_COMPONENT(nvme)
|
||||
|
@ -969,10 +969,10 @@ nvme_ctrlr_shutdown(struct spdk_nvme_ctrlr *ctrlr)
|
||||
* 10 seconds as a reasonable amount of time to
|
||||
* wait before proceeding.
|
||||
*/
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "RTD3E = %" PRIu32 " us\n", ctrlr->cdata.rtd3e);
|
||||
SPDK_DEBUGLOG(nvme, "RTD3E = %" PRIu32 " us\n", ctrlr->cdata.rtd3e);
|
||||
shutdown_timeout_ms = (ctrlr->cdata.rtd3e + 999) / 1000;
|
||||
shutdown_timeout_ms = spdk_max(shutdown_timeout_ms, 10000);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "shutdown timeout = %" PRIu32 " ms\n", shutdown_timeout_ms);
|
||||
SPDK_DEBUGLOG(nvme, "shutdown timeout = %" PRIu32 " ms\n", shutdown_timeout_ms);
|
||||
|
||||
do {
|
||||
if (nvme_ctrlr_get_csts(ctrlr, &csts)) {
|
||||
@ -981,7 +981,7 @@ nvme_ctrlr_shutdown(struct spdk_nvme_ctrlr *ctrlr)
|
||||
}
|
||||
|
||||
if (csts.bits.shst == SPDK_NVME_SHST_COMPLETE) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "ctrlr %s shutdown complete in %u milliseconds\n",
|
||||
SPDK_DEBUGLOG(nvme, "ctrlr %s shutdown complete in %u milliseconds\n",
|
||||
ctrlr->trid.traddr, ms_waited);
|
||||
return;
|
||||
}
|
||||
@ -1029,15 +1029,15 @@ nvme_ctrlr_enable(struct spdk_nvme_ctrlr *ctrlr)
|
||||
cc.bits.mps = spdk_u32log2(ctrlr->page_size) - 12;
|
||||
|
||||
if (ctrlr->cap.bits.css == 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_NVME,
|
||||
SPDK_INFOLOG(nvme,
|
||||
"Drive reports no command sets supported. Assuming NVM is supported.\n");
|
||||
ctrlr->cap.bits.css = SPDK_NVME_CAP_CSS_NVM;
|
||||
}
|
||||
|
||||
if (!(ctrlr->cap.bits.css & (1u << ctrlr->opts.command_set))) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Requested I/O command set %u but supported mask is 0x%x\n",
|
||||
SPDK_DEBUGLOG(nvme, "Requested I/O command set %u but supported mask is 0x%x\n",
|
||||
ctrlr->opts.command_set, ctrlr->cap.bits.css);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Falling back to NVM. Assuming NVM is supported.\n");
|
||||
SPDK_DEBUGLOG(nvme, "Falling back to NVM. Assuming NVM is supported.\n");
|
||||
ctrlr->opts.command_set = SPDK_NVME_CC_CSS_NVM;
|
||||
}
|
||||
|
||||
@ -1197,11 +1197,11 @@ nvme_ctrlr_set_state(struct spdk_nvme_ctrlr *ctrlr, enum nvme_ctrlr_state state,
|
||||
}
|
||||
|
||||
ctrlr->state_timeout_tsc = timeout_in_ticks + now_ticks;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "setting state to %s (timeout %" PRIu64 " ms)\n",
|
||||
SPDK_DEBUGLOG(nvme, "setting state to %s (timeout %" PRIu64 " ms)\n",
|
||||
nvme_ctrlr_state_string(ctrlr->state), timeout_in_ms);
|
||||
return;
|
||||
inf:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "setting state to %s (no timeout)\n",
|
||||
SPDK_DEBUGLOG(nvme, "setting state to %s (no timeout)\n",
|
||||
nvme_ctrlr_state_string(ctrlr->state));
|
||||
ctrlr->state_timeout_tsc = NVME_TIMEOUT_INFINITE;
|
||||
}
|
||||
@ -1241,7 +1241,7 @@ nvme_ctrlr_set_doorbell_buffer_config_done(void *arg, const struct spdk_nvme_cpl
|
||||
if (spdk_nvme_cpl_is_error(cpl)) {
|
||||
SPDK_WARNLOG("Doorbell buffer config failed\n");
|
||||
} else {
|
||||
SPDK_INFOLOG(SPDK_LOG_NVME, "NVMe controller: %s doorbell buffer config enabled\n",
|
||||
SPDK_INFOLOG(nvme, "NVMe controller: %s doorbell buffer config enabled\n",
|
||||
ctrlr->trid.traddr);
|
||||
}
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_SET_KEEP_ALIVE_TIMEOUT,
|
||||
@ -1474,14 +1474,14 @@ nvme_ctrlr_identify_done(void *arg, const struct spdk_nvme_cpl *cpl)
|
||||
* controller supports.
|
||||
*/
|
||||
ctrlr->max_xfer_size = nvme_transport_ctrlr_get_max_xfer_size(ctrlr);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "transport max_xfer_size %u\n", ctrlr->max_xfer_size);
|
||||
SPDK_DEBUGLOG(nvme, "transport max_xfer_size %u\n", ctrlr->max_xfer_size);
|
||||
if (ctrlr->cdata.mdts > 0) {
|
||||
ctrlr->max_xfer_size = spdk_min(ctrlr->max_xfer_size,
|
||||
ctrlr->min_page_size * (1 << (ctrlr->cdata.mdts)));
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "MDTS max_xfer_size %u\n", ctrlr->max_xfer_size);
|
||||
SPDK_DEBUGLOG(nvme, "MDTS max_xfer_size %u\n", ctrlr->max_xfer_size);
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "CNTLID 0x%04" PRIx16 "\n", ctrlr->cdata.cntlid);
|
||||
SPDK_DEBUGLOG(nvme, "CNTLID 0x%04" PRIx16 "\n", ctrlr->cdata.cntlid);
|
||||
if (ctrlr->trid.trtype == SPDK_NVME_TRANSPORT_PCIE) {
|
||||
ctrlr->cntlid = ctrlr->cdata.cntlid;
|
||||
} else {
|
||||
@ -1492,7 +1492,7 @@ nvme_ctrlr_identify_done(void *arg, const struct spdk_nvme_cpl *cpl)
|
||||
* trust the one from Connect.
|
||||
*/
|
||||
if (ctrlr->cntlid != ctrlr->cdata.cntlid) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME,
|
||||
SPDK_DEBUGLOG(nvme,
|
||||
"Identify CNTLID 0x%04" PRIx16 " != Connect CNTLID 0x%04" PRIx16 "\n",
|
||||
ctrlr->cdata.cntlid, ctrlr->cntlid);
|
||||
}
|
||||
@ -1514,14 +1514,14 @@ nvme_ctrlr_identify_done(void *arg, const struct spdk_nvme_cpl *cpl)
|
||||
} else {
|
||||
/* A value 0 indicates no limit. */
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "transport max_sges %u\n", ctrlr->max_sges);
|
||||
SPDK_DEBUGLOG(nvme, "transport max_sges %u\n", ctrlr->max_sges);
|
||||
}
|
||||
|
||||
if (ctrlr->cdata.oacs.security && !(ctrlr->quirks & NVME_QUIRK_OACS_SECURITY)) {
|
||||
ctrlr->flags |= SPDK_NVME_CTRLR_SECURITY_SEND_RECV_SUPPORTED;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "fuses compare and write: %d\n", ctrlr->cdata.fuses.compare_and_write);
|
||||
SPDK_DEBUGLOG(nvme, "fuses compare and write: %d\n", ctrlr->cdata.fuses.compare_and_write);
|
||||
if (ctrlr->cdata.fuses.compare_and_write) {
|
||||
ctrlr->flags |= SPDK_NVME_CTRLR_COMPARE_AND_WRITE_SUPPORTED;
|
||||
}
|
||||
@ -2056,7 +2056,7 @@ nvme_ctrlr_identify_id_desc_namespaces(struct spdk_nvme_ctrlr *ctrlr)
|
||||
if ((ctrlr->vs.raw < SPDK_NVME_VERSION(1, 3, 0) &&
|
||||
!(ctrlr->cap.bits.css & SPDK_NVME_CAP_CSS_IOCS)) ||
|
||||
(ctrlr->quirks & NVME_QUIRK_IDENTIFY_CNS)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Version < 1.3; not attempting to retrieve NS ID Descriptor List\n");
|
||||
SPDK_DEBUGLOG(nvme, "Version < 1.3; not attempting to retrieve NS ID Descriptor List\n");
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_CONFIGURE_AER,
|
||||
ctrlr->opts.admin_timeout_ms);
|
||||
return 0;
|
||||
@ -2175,7 +2175,7 @@ nvme_ctrlr_set_keep_alive_timeout_done(void *arg, const struct spdk_nvme_cpl *cp
|
||||
if (spdk_nvme_cpl_is_error(cpl)) {
|
||||
if ((cpl->status.sct == SPDK_NVME_SCT_GENERIC) &&
|
||||
(cpl->status.sc == SPDK_NVME_SC_INVALID_FIELD)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Keep alive timeout Get Feature is not supported\n");
|
||||
SPDK_DEBUGLOG(nvme, "Keep alive timeout Get Feature is not supported\n");
|
||||
} else {
|
||||
SPDK_ERRLOG("Keep alive timeout Get Feature failed: SC %x SCT %x\n",
|
||||
cpl->status.sc, cpl->status.sct);
|
||||
@ -2185,7 +2185,7 @@ nvme_ctrlr_set_keep_alive_timeout_done(void *arg, const struct spdk_nvme_cpl *cp
|
||||
}
|
||||
} else {
|
||||
if (ctrlr->opts.keep_alive_timeout_ms != cpl->cdw0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Controller adjusted keep alive timeout to %u ms\n",
|
||||
SPDK_DEBUGLOG(nvme, "Controller adjusted keep alive timeout to %u ms\n",
|
||||
cpl->cdw0);
|
||||
}
|
||||
|
||||
@ -2197,7 +2197,7 @@ nvme_ctrlr_set_keep_alive_timeout_done(void *arg, const struct spdk_nvme_cpl *cp
|
||||
} else {
|
||||
keep_alive_interval_us = ctrlr->opts.keep_alive_timeout_ms * 1000 / 2;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Sending keep alive every %u us\n", keep_alive_interval_us);
|
||||
SPDK_DEBUGLOG(nvme, "Sending keep alive every %u us\n", keep_alive_interval_us);
|
||||
|
||||
ctrlr->keep_alive_interval_ticks = (keep_alive_interval_us * spdk_get_ticks_hz()) /
|
||||
UINT64_C(1000000);
|
||||
@ -2222,7 +2222,7 @@ nvme_ctrlr_set_keep_alive_timeout(struct spdk_nvme_ctrlr *ctrlr)
|
||||
}
|
||||
|
||||
if (ctrlr->cdata.kas == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Controller KAS is 0 - not enabling Keep Alive\n");
|
||||
SPDK_DEBUGLOG(nvme, "Controller KAS is 0 - not enabling Keep Alive\n");
|
||||
ctrlr->opts.keep_alive_timeout_ms = 0;
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_SET_HOST_ID,
|
||||
ctrlr->opts.admin_timeout_ms);
|
||||
@ -2258,7 +2258,7 @@ nvme_ctrlr_set_host_id_done(void *arg, const struct spdk_nvme_cpl *cpl)
|
||||
SPDK_WARNLOG("Set Features - Host ID failed: SC 0x%x SCT 0x%x\n",
|
||||
cpl->status.sc, cpl->status.sct);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Set Features - Host ID was successful\n");
|
||||
SPDK_DEBUGLOG(nvme, "Set Features - Host ID was successful\n");
|
||||
}
|
||||
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_READY, NVME_TIMEOUT_INFINITE);
|
||||
@ -2276,30 +2276,30 @@ nvme_ctrlr_set_host_id(struct spdk_nvme_ctrlr *ctrlr)
|
||||
* NVMe-oF sends the host ID during Connect and doesn't allow
|
||||
* Set Features - Host Identifier after Connect, so we don't need to do anything here.
|
||||
*/
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "NVMe-oF transport - not sending Set Features - Host ID\n");
|
||||
SPDK_DEBUGLOG(nvme, "NVMe-oF transport - not sending Set Features - Host ID\n");
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_READY, NVME_TIMEOUT_INFINITE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ctrlr->cdata.ctratt.host_id_exhid_supported) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Using 128-bit extended host identifier\n");
|
||||
SPDK_DEBUGLOG(nvme, "Using 128-bit extended host identifier\n");
|
||||
host_id = ctrlr->opts.extended_host_id;
|
||||
host_id_size = sizeof(ctrlr->opts.extended_host_id);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Using 64-bit host identifier\n");
|
||||
SPDK_DEBUGLOG(nvme, "Using 64-bit host identifier\n");
|
||||
host_id = ctrlr->opts.host_id;
|
||||
host_id_size = sizeof(ctrlr->opts.host_id);
|
||||
}
|
||||
|
||||
/* If the user specified an all-zeroes host identifier, don't send the command. */
|
||||
if (spdk_mem_all_zero(host_id, host_id_size)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME,
|
||||
SPDK_DEBUGLOG(nvme,
|
||||
"User did not specify host ID - not sending Set Features - Host ID\n");
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_READY, NVME_TIMEOUT_INFINITE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPDK_LOGDUMP(SPDK_LOG_NVME, "host_id", host_id, host_id_size);
|
||||
SPDK_LOGDUMP(nvme, "host_id", host_id, host_id_size);
|
||||
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_WAIT_FOR_HOST_ID,
|
||||
ctrlr->opts.admin_timeout_ms);
|
||||
@ -2876,7 +2876,7 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr)
|
||||
/* While a device is resetting, it may be unable to service MMIO reads
|
||||
* temporarily. Allow for this case.
|
||||
*/
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Get registers failed while waiting for CSTS.RDY == 0\n");
|
||||
SPDK_DEBUGLOG(nvme, "Get registers failed while waiting for CSTS.RDY == 0\n");
|
||||
goto init_timeout;
|
||||
}
|
||||
SPDK_ERRLOG("Failed to read CC and CSTS in state %d\n", ctrlr->state);
|
||||
@ -2900,7 +2900,7 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr)
|
||||
* enabling itself, because this is required only for the very first enabling
|
||||
* - directly after a VFIO reset.
|
||||
*/
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Adding 2 second delay before initializing the controller\n");
|
||||
SPDK_DEBUGLOG(nvme, "Adding 2 second delay before initializing the controller\n");
|
||||
ctrlr->sleep_timeout_tsc = spdk_get_ticks() + (2000 * spdk_get_ticks_hz() / 1000);
|
||||
}
|
||||
break;
|
||||
@ -2908,7 +2908,7 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr)
|
||||
case NVME_CTRLR_STATE_INIT:
|
||||
/* Begin the hardware initialization by making sure the controller is disabled. */
|
||||
if (cc.bits.en) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "CC.EN = 1\n");
|
||||
SPDK_DEBUGLOG(nvme, "CC.EN = 1\n");
|
||||
/*
|
||||
* Controller is currently enabled. We need to disable it to cause a reset.
|
||||
*
|
||||
@ -2916,13 +2916,13 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr)
|
||||
* Wait for the ready bit to be 1 before disabling the controller.
|
||||
*/
|
||||
if (csts.bits.rdy == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "CC.EN = 1 && CSTS.RDY = 0 - waiting for reset to complete\n");
|
||||
SPDK_DEBUGLOG(nvme, "CC.EN = 1 && CSTS.RDY = 0 - waiting for reset to complete\n");
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_DISABLE_WAIT_FOR_READY_1, ready_timeout_in_ms);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* CC.EN = 1 && CSTS.RDY == 1, so we can immediately disable the controller. */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Setting CC.EN = 0\n");
|
||||
SPDK_DEBUGLOG(nvme, "Setting CC.EN = 0\n");
|
||||
cc.bits.en = 0;
|
||||
if (nvme_ctrlr_set_cc(ctrlr, &cc)) {
|
||||
SPDK_ERRLOG("set_cc() failed\n");
|
||||
@ -2935,13 +2935,13 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr)
|
||||
* Not using sleep() to avoid blocking other controller's initialization.
|
||||
*/
|
||||
if (ctrlr->quirks & NVME_QUIRK_DELAY_BEFORE_CHK_RDY) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Applying quirk: delay 2.5 seconds before reading registers\n");
|
||||
SPDK_DEBUGLOG(nvme, "Applying quirk: delay 2.5 seconds before reading registers\n");
|
||||
ctrlr->sleep_timeout_tsc = spdk_get_ticks() + (2500 * spdk_get_ticks_hz() / 1000);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
if (csts.bits.rdy == 1) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "CC.EN = 0 && CSTS.RDY = 1 - waiting for shutdown to complete\n");
|
||||
SPDK_DEBUGLOG(nvme, "CC.EN = 0 && CSTS.RDY = 1 - waiting for shutdown to complete\n");
|
||||
}
|
||||
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_DISABLE_WAIT_FOR_READY_0, ready_timeout_in_ms);
|
||||
@ -2951,9 +2951,9 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr)
|
||||
|
||||
case NVME_CTRLR_STATE_DISABLE_WAIT_FOR_READY_1:
|
||||
if (csts.bits.rdy == 1) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "CC.EN = 1 && CSTS.RDY = 1 - disabling controller\n");
|
||||
SPDK_DEBUGLOG(nvme, "CC.EN = 1 && CSTS.RDY = 1 - disabling controller\n");
|
||||
/* CC.EN = 1 && CSTS.RDY = 1, so we can set CC.EN = 0 now. */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Setting CC.EN = 0\n");
|
||||
SPDK_DEBUGLOG(nvme, "Setting CC.EN = 0\n");
|
||||
cc.bits.en = 0;
|
||||
if (nvme_ctrlr_set_cc(ctrlr, &cc)) {
|
||||
SPDK_ERRLOG("set_cc() failed\n");
|
||||
@ -2966,7 +2966,7 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr)
|
||||
|
||||
case NVME_CTRLR_STATE_DISABLE_WAIT_FOR_READY_0:
|
||||
if (csts.bits.rdy == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "CC.EN = 0 && CSTS.RDY = 0\n");
|
||||
SPDK_DEBUGLOG(nvme, "CC.EN = 0 && CSTS.RDY = 0\n");
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_ENABLE, ready_timeout_in_ms);
|
||||
/*
|
||||
* Delay 100us before setting CC.EN = 1. Some NVMe SSDs miss CC.EN getting
|
||||
@ -2978,14 +2978,14 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr)
|
||||
break;
|
||||
|
||||
case NVME_CTRLR_STATE_ENABLE:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Setting CC.EN = 1\n");
|
||||
SPDK_DEBUGLOG(nvme, "Setting CC.EN = 1\n");
|
||||
rc = nvme_ctrlr_enable(ctrlr);
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_ENABLE_WAIT_FOR_READY_1, ready_timeout_in_ms);
|
||||
return rc;
|
||||
|
||||
case NVME_CTRLR_STATE_ENABLE_WAIT_FOR_READY_1:
|
||||
if (csts.bits.rdy == 1) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "CC.EN = 1 && CSTS.RDY = 1 - controller is ready\n");
|
||||
SPDK_DEBUGLOG(nvme, "CC.EN = 1 && CSTS.RDY = 1 - controller is ready\n");
|
||||
/*
|
||||
* The controller has been enabled.
|
||||
* Perform the rest of initialization serially.
|
||||
@ -3110,7 +3110,7 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr)
|
||||
break;
|
||||
|
||||
case NVME_CTRLR_STATE_READY:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Ctrlr already in ready state\n");
|
||||
SPDK_DEBUGLOG(nvme, "Ctrlr already in ready state\n");
|
||||
return 0;
|
||||
|
||||
case NVME_CTRLR_STATE_ERROR:
|
||||
@ -3234,7 +3234,7 @@ nvme_ctrlr_destruct(struct spdk_nvme_ctrlr *ctrlr)
|
||||
{
|
||||
struct spdk_nvme_qpair *qpair, *tmp;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Prepare to destruct SSD: %s\n", ctrlr->trid.traddr);
|
||||
SPDK_DEBUGLOG(nvme, "Prepare to destruct SSD: %s\n", ctrlr->trid.traddr);
|
||||
|
||||
ctrlr->is_destructed = true;
|
||||
|
||||
@ -3251,7 +3251,7 @@ nvme_ctrlr_destruct(struct spdk_nvme_ctrlr *ctrlr)
|
||||
nvme_ctrlr_free_iocs_specific_data(ctrlr);
|
||||
|
||||
if (ctrlr->opts.no_shn_notification) {
|
||||
SPDK_INFOLOG(SPDK_LOG_NVME, "Disable SSD: %s without shutdown notification\n",
|
||||
SPDK_INFOLOG(nvme, "Disable SSD: %s without shutdown notification\n",
|
||||
ctrlr->trid.traddr);
|
||||
nvme_ctrlr_disable(ctrlr);
|
||||
} else {
|
||||
|
@ -208,17 +208,17 @@ nvme_fabric_discover_probe(struct spdk_nvmf_discovery_log_page_entry *entry,
|
||||
len = spdk_strlen_pad(entry->traddr, sizeof(entry->traddr), ' ');
|
||||
memcpy(trid.traddr, entry->traddr, len);
|
||||
if (spdk_str_chomp(trid.traddr) != 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Trailing newlines removed from discovery TRADDR\n");
|
||||
SPDK_DEBUGLOG(nvme, "Trailing newlines removed from discovery TRADDR\n");
|
||||
}
|
||||
|
||||
/* Convert trsvcid to a null terminated string. */
|
||||
len = spdk_strlen_pad(entry->trsvcid, sizeof(entry->trsvcid), ' ');
|
||||
memcpy(trid.trsvcid, entry->trsvcid, len);
|
||||
if (spdk_str_chomp(trid.trsvcid) != 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Trailing newlines removed from discovery TRSVCID\n");
|
||||
SPDK_DEBUGLOG(nvme, "Trailing newlines removed from discovery TRSVCID\n");
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "subnqn=%s, trtype=%u, traddr=%s, trsvcid=%s\n",
|
||||
SPDK_DEBUGLOG(nvme, "subnqn=%s, trtype=%u, traddr=%s, trsvcid=%s\n",
|
||||
trid.subnqn, trid.trtype,
|
||||
trid.traddr, trid.trsvcid);
|
||||
|
||||
@ -361,7 +361,7 @@ nvme_fabric_ctrlr_discover(struct spdk_nvme_ctrlr *ctrlr,
|
||||
do {
|
||||
rc = nvme_fabric_get_discovery_log_page(ctrlr, buffer, sizeof(buffer), log_page_offset);
|
||||
if (rc < 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Get Log Page - Discovery error\n");
|
||||
SPDK_DEBUGLOG(nvme, "Get Log Page - Discovery error\n");
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -467,7 +467,7 @@ nvme_fabric_qpair_connect(struct spdk_nvme_qpair *qpair, uint32_t num_entries)
|
||||
if (nvme_qpair_is_admin_queue(qpair)) {
|
||||
rsp = (struct spdk_nvmf_fabric_connect_rsp *)&status->cpl;
|
||||
ctrlr->cntlid = rsp->status_code_specific.success.cntlid;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "CNTLID 0x%04" PRIx16 "\n", ctrlr->cntlid);
|
||||
SPDK_DEBUGLOG(nvme, "CNTLID 0x%04" PRIx16 "\n", ctrlr->cntlid);
|
||||
}
|
||||
|
||||
spdk_free(nvmf_data);
|
||||
|
@ -67,13 +67,13 @@ nvme_ns_set_identify_data(struct spdk_nvme_ns *ns)
|
||||
|
||||
if (nsdata->noiob) {
|
||||
ns->sectors_per_stripe = nsdata->noiob;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "ns %u optimal IO boundary %" PRIu32 " blocks\n",
|
||||
SPDK_DEBUGLOG(nvme, "ns %u optimal IO boundary %" PRIu32 " blocks\n",
|
||||
ns->id, ns->sectors_per_stripe);
|
||||
} else if (ns->ctrlr->quirks & NVME_INTEL_QUIRK_STRIPING &&
|
||||
ns->ctrlr->cdata.vs[3] != 0) {
|
||||
ns->sectors_per_stripe = (1ULL << ns->ctrlr->cdata.vs[3]) * ns->ctrlr->min_page_size /
|
||||
ns->sector_size;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "ns %u stripe size quirk %" PRIu32 " blocks\n",
|
||||
SPDK_DEBUGLOG(nvme, "ns %u stripe size quirk %" PRIu32 " blocks\n",
|
||||
ns->id, ns->sectors_per_stripe);
|
||||
} else {
|
||||
ns->sectors_per_stripe = 0;
|
||||
@ -218,7 +218,7 @@ nvme_ctrlr_identify_id_desc(struct spdk_nvme_ns *ns)
|
||||
if ((ns->ctrlr->vs.raw < SPDK_NVME_VERSION(1, 3, 0) &&
|
||||
!(ns->ctrlr->cap.bits.css & SPDK_NVME_CAP_CSS_IOCS)) ||
|
||||
(ns->ctrlr->quirks & NVME_QUIRK_IDENTIFY_CNS)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Version < 1.3; not attempting to retrieve NS ID Descriptor List\n");
|
||||
SPDK_DEBUGLOG(nvme, "Version < 1.3; not attempting to retrieve NS ID Descriptor List\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -228,7 +228,7 @@ nvme_ctrlr_identify_id_desc(struct spdk_nvme_ns *ns)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Attempting to retrieve NS ID Descriptor List\n");
|
||||
SPDK_DEBUGLOG(nvme, "Attempting to retrieve NS ID Descriptor List\n");
|
||||
rc = nvme_ctrlr_cmd_identify(ns->ctrlr, SPDK_NVME_IDENTIFY_NS_ID_DESCRIPTOR_LIST, 0, ns->id,
|
||||
0, ns->id_desc_list, sizeof(ns->id_desc_list),
|
||||
nvme_completion_poll_cb, status);
|
||||
|
@ -57,7 +57,7 @@ nvme_ns_check_request_length(uint32_t lba_count, uint32_t sectors_per_max_io,
|
||||
child_per_io = (lba_count + sectors_per_max_io - 1) / sectors_per_max_io;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "checking maximum i/o length %d\n", child_per_io);
|
||||
SPDK_DEBUGLOG(nvme, "checking maximum i/o length %d\n", child_per_io);
|
||||
|
||||
return child_per_io >= qdepth;
|
||||
}
|
||||
|
@ -421,7 +421,7 @@ opal_response_parse(const uint8_t *buf, size_t length,
|
||||
clen = from_be32(&hdr->com_packet.length);
|
||||
plen = from_be32(&hdr->packet.length);
|
||||
slen = from_be32(&hdr->sub_packet.length);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_OPAL, "Response size: cp: %u, pkt: %u, subpkt: %u\n",
|
||||
SPDK_DEBUGLOG(opal, "Response size: cp: %u, pkt: %u, subpkt: %u\n",
|
||||
clen, plen, slen);
|
||||
|
||||
if (clen == 0 || plen == 0 || slen == 0 ||
|
||||
@ -819,7 +819,7 @@ opal_discovery0_end(struct spdk_opal_dev *dev, void *payload, uint32_t payload_s
|
||||
supported = true;
|
||||
break;
|
||||
default:
|
||||
SPDK_INFOLOG(SPDK_LOG_OPAL, "Unknow feature code: %d\n", feat_code);
|
||||
SPDK_INFOLOG(opal, "Unknow feature code: %d\n", feat_code);
|
||||
}
|
||||
cpos += feat_hdr->length + sizeof(*feat_hdr);
|
||||
}
|
||||
@ -830,7 +830,7 @@ opal_discovery0_end(struct spdk_opal_dev *dev, void *payload, uint32_t payload_s
|
||||
}
|
||||
|
||||
if (single_user == false) {
|
||||
SPDK_INFOLOG(SPDK_LOG_OPAL, "Single User Mode Not Supported\n");
|
||||
SPDK_INFOLOG(opal, "Single User Mode Not Supported\n");
|
||||
}
|
||||
|
||||
dev->comid = comid;
|
||||
@ -1006,7 +1006,7 @@ opal_get_msid_cpin_pin_done(struct opal_session *sess,
|
||||
opal_key->key_len = strlen;
|
||||
memcpy(opal_key->key, msid_pin, opal_key->key_len);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_OPAL, "MSID = %p\n", opal_key->key);
|
||||
SPDK_DEBUGLOG(opal, "MSID = %p\n", opal_key->key);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1839,7 +1839,7 @@ struct spdk_opal_dev *
|
||||
}
|
||||
|
||||
if (opal_discovery0(dev, payload, IO_BUFFER_LENGTH)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_OPAL, "Opal is not supported on this device\n");
|
||||
SPDK_INFOLOG(opal, "Opal is not supported on this device\n");
|
||||
free(dev);
|
||||
free(payload);
|
||||
return NULL;
|
||||
@ -1938,7 +1938,7 @@ opal_get_active_key_done(struct opal_session *sess, struct spdk_opal_key *active
|
||||
active_key->key_len = str_len;
|
||||
memcpy(active_key->key, key, active_key->key_len);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_OPAL, "active key = %p\n", active_key->key);
|
||||
SPDK_DEBUGLOG(opal, "active key = %p\n", active_key->key);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2563,4 +2563,4 @@ spdk_opal_free_locking_range_info(struct spdk_opal_dev *dev, enum spdk_opal_lock
|
||||
}
|
||||
|
||||
/* Log component for opal submodule */
|
||||
SPDK_LOG_REGISTER_COMPONENT("opal", SPDK_LOG_OPAL)
|
||||
SPDK_LOG_REGISTER_COMPONENT(opal)
|
||||
|
@ -223,7 +223,7 @@ nvme_sigbus_fault_sighandler(int signum, siginfo_t *info, void *ctx)
|
||||
|
||||
if (!__atomic_compare_exchange_n(&g_signal_lock, &flag, 1, false, __ATOMIC_ACQUIRE,
|
||||
__ATOMIC_RELAXED)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "request g_signal_lock failed\n");
|
||||
SPDK_DEBUGLOG(nvme, "request g_signal_lock failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -278,7 +278,7 @@ _nvme_pcie_hotplug_monitor(struct spdk_nvme_probe_ctx *probe_ctx)
|
||||
if (event.subsystem == SPDK_NVME_UEVENT_SUBSYSTEM_UIO ||
|
||||
event.subsystem == SPDK_NVME_UEVENT_SUBSYSTEM_VFIO) {
|
||||
if (event.action == SPDK_NVME_UEVENT_ADD) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "add nvme address: %s\n",
|
||||
SPDK_DEBUGLOG(nvme, "add nvme address: %s\n",
|
||||
event.traddr);
|
||||
if (spdk_process_is_primary()) {
|
||||
if (!spdk_pci_addr_parse(&pci_addr, event.traddr)) {
|
||||
@ -296,7 +296,7 @@ _nvme_pcie_hotplug_monitor(struct spdk_nvme_probe_ctx *probe_ctx)
|
||||
if (ctrlr == NULL) {
|
||||
return 0;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "remove nvme address: %s\n",
|
||||
SPDK_DEBUGLOG(nvme, "remove nvme address: %s\n",
|
||||
event.traddr);
|
||||
|
||||
nvme_ctrlr_fail(ctrlr, true);
|
||||
@ -555,7 +555,7 @@ nvme_pcie_ctrlr_reserve_cmb(struct spdk_nvme_ctrlr *ctrlr)
|
||||
struct nvme_pcie_ctrlr *pctrlr = nvme_pcie_ctrlr(ctrlr);
|
||||
|
||||
if (pctrlr->cmb.bar_va == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "CMB not available\n");
|
||||
SPDK_DEBUGLOG(nvme, "CMB not available\n");
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
@ -584,7 +584,7 @@ nvme_pcie_ctrlr_map_io_cmb(struct spdk_nvme_ctrlr *ctrlr, size_t *size)
|
||||
*size = 0;
|
||||
|
||||
if (pctrlr->cmb.bar_va == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "CMB not available\n");
|
||||
SPDK_DEBUGLOG(nvme, "CMB not available\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1044,7 +1044,7 @@ nvme_pcie_qpair_construct(struct spdk_nvme_qpair *qpair,
|
||||
pqpair->max_completions_cap = spdk_min(pqpair->max_completions_cap, NVME_MAX_COMPLETIONS);
|
||||
num_trackers = pqpair->num_entries - pqpair->max_completions_cap;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_NVME, "max_completions_cap = %" PRIu16 " num_trackers = %" PRIu16 "\n",
|
||||
SPDK_INFOLOG(nvme, "max_completions_cap = %" PRIu16 " num_trackers = %" PRIu16 "\n",
|
||||
pqpair->max_completions_cap, num_trackers);
|
||||
|
||||
assert(num_trackers != 0);
|
||||
@ -1852,7 +1852,7 @@ nvme_pcie_prp_list_append(struct nvme_tracker *tr, uint32_t *prp_index, void *vi
|
||||
uint64_t phys_addr;
|
||||
uint32_t i;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "prp_index:%u virt_addr:%p len:%u\n",
|
||||
SPDK_DEBUGLOG(nvme, "prp_index:%u virt_addr:%p len:%u\n",
|
||||
*prp_index, virt_addr, (uint32_t)len);
|
||||
|
||||
if (spdk_unlikely(((uintptr_t)virt_addr & 3) != 0)) {
|
||||
@ -1880,7 +1880,7 @@ nvme_pcie_prp_list_append(struct nvme_tracker *tr, uint32_t *prp_index, void *vi
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "prp1 = %p\n", (void *)phys_addr);
|
||||
SPDK_DEBUGLOG(nvme, "prp1 = %p\n", (void *)phys_addr);
|
||||
cmd->dptr.prp.prp1 = phys_addr;
|
||||
seg_len = page_size - ((uintptr_t)virt_addr & page_mask);
|
||||
} else {
|
||||
@ -1889,7 +1889,7 @@ nvme_pcie_prp_list_append(struct nvme_tracker *tr, uint32_t *prp_index, void *vi
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "prp[%u] = %p\n", i - 1, (void *)phys_addr);
|
||||
SPDK_DEBUGLOG(nvme, "prp[%u] = %p\n", i - 1, (void *)phys_addr);
|
||||
tr->u.prp[i - 1] = phys_addr;
|
||||
seg_len = page_size;
|
||||
}
|
||||
@ -1905,10 +1905,10 @@ nvme_pcie_prp_list_append(struct nvme_tracker *tr, uint32_t *prp_index, void *vi
|
||||
cmd->dptr.prp.prp2 = 0;
|
||||
} else if (i == 2) {
|
||||
cmd->dptr.prp.prp2 = tr->u.prp[0];
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "prp2 = %p\n", (void *)cmd->dptr.prp.prp2);
|
||||
SPDK_DEBUGLOG(nvme, "prp2 = %p\n", (void *)cmd->dptr.prp.prp2);
|
||||
} else {
|
||||
cmd->dptr.prp.prp2 = tr->prp_sgl_bus_addr;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "prp2 = %p (PRP list)\n", (void *)cmd->dptr.prp.prp2);
|
||||
SPDK_DEBUGLOG(nvme, "prp2 = %p (PRP list)\n", (void *)cmd->dptr.prp.prp2);
|
||||
}
|
||||
|
||||
*prp_index = i;
|
||||
|
@ -118,20 +118,20 @@ nvme_get_quirks(const struct spdk_pci_id *id)
|
||||
{
|
||||
const struct nvme_quirk *quirk = nvme_quirks;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Searching for %04x:%04x [%04x:%04x]...\n",
|
||||
SPDK_DEBUGLOG(nvme, "Searching for %04x:%04x [%04x:%04x]...\n",
|
||||
id->vendor_id, id->device_id,
|
||||
id->subvendor_id, id->subdevice_id);
|
||||
|
||||
while (quirk->id.vendor_id) {
|
||||
if (pci_id_match(&quirk->id, id)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Matched quirk %04x:%04x [%04x:%04x]:\n",
|
||||
SPDK_DEBUGLOG(nvme, "Matched quirk %04x:%04x [%04x:%04x]:\n",
|
||||
quirk->id.vendor_id, quirk->id.device_id,
|
||||
quirk->id.subvendor_id, quirk->id.subdevice_id);
|
||||
|
||||
#define PRINT_QUIRK(quirk_flag) \
|
||||
do { \
|
||||
if (quirk->flags & (quirk_flag)) { \
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Quirk enabled: %s\n", #quirk_flag); \
|
||||
SPDK_DEBUGLOG(nvme, "Quirk enabled: %s\n", #quirk_flag); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
@ -149,7 +149,7 @@ nvme_get_quirks(const struct spdk_pci_id *id)
|
||||
quirk++;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "No quirks found.\n");
|
||||
SPDK_DEBUGLOG(nvme, "No quirks found.\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ nvme_rdma_qpair_process_cm_event(struct nvme_rdma_qpair *rqpair)
|
||||
if (accept_data == NULL) {
|
||||
rc = -1;
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Requested queue depth %d. Actually got queue depth %d.\n",
|
||||
SPDK_DEBUGLOG(nvme, "Requested queue depth %d. Actually got queue depth %d.\n",
|
||||
rqpair->num_entries, accept_data->crqsize);
|
||||
rqpair->num_entries = spdk_min(rqpair->num_entries, accept_data->crqsize);
|
||||
}
|
||||
@ -736,7 +736,7 @@ nvme_rdma_qpair_queue_recv_wr(struct nvme_rdma_qpair *rqpair, struct ibv_recv_wr
|
||||
|
||||
#define nvme_rdma_trace_ibv_sge(sg_list) \
|
||||
if (sg_list) { \
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "local addr %p length 0x%x lkey 0x%x\n", \
|
||||
SPDK_DEBUGLOG(nvme, "local addr %p length 0x%x lkey 0x%x\n", \
|
||||
(void *)(sg_list)->addr, (sg_list)->length, (sg_list)->lkey); \
|
||||
}
|
||||
|
||||
@ -1023,7 +1023,7 @@ nvme_rdma_resolve_addr(struct nvme_rdma_qpair *rqpair,
|
||||
SPDK_NOTICELOG("Can't apply RDMA_OPTION_ID_ACK_TIMEOUT %d, ret %d\n", timeout, ret);
|
||||
}
|
||||
#else
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "transport_ack_timeout is not supported\n");
|
||||
SPDK_DEBUGLOG(nvme, "transport_ack_timeout is not supported\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1280,11 +1280,11 @@ _nvme_rdma_ctrlr_connect_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_q
|
||||
return -1;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "adrfam %d ai_family %d\n", ctrlr->trid.adrfam, family);
|
||||
SPDK_DEBUGLOG(nvme, "adrfam %d ai_family %d\n", ctrlr->trid.adrfam, family);
|
||||
|
||||
memset(&dst_addr, 0, sizeof(dst_addr));
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "trsvcid is %s\n", ctrlr->trid.trsvcid);
|
||||
SPDK_DEBUGLOG(nvme, "trsvcid is %s\n", ctrlr->trid.trsvcid);
|
||||
rc = nvme_rdma_parse_addr(&dst_addr, family, ctrlr->trid.traddr, ctrlr->trid.trsvcid);
|
||||
if (rc != 0) {
|
||||
SPDK_ERRLOG("dst_addr nvme_rdma_parse_addr() failed\n");
|
||||
@ -1330,20 +1330,20 @@ _nvme_rdma_ctrlr_connect_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_q
|
||||
}
|
||||
|
||||
rc = nvme_rdma_register_reqs(rqpair);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "rc =%d\n", rc);
|
||||
SPDK_DEBUGLOG(nvme, "rc =%d\n", rc);
|
||||
if (rc) {
|
||||
SPDK_ERRLOG("Unable to register rqpair RDMA requests\n");
|
||||
return -1;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "RDMA requests registered\n");
|
||||
SPDK_DEBUGLOG(nvme, "RDMA requests registered\n");
|
||||
|
||||
rc = nvme_rdma_register_rsps(rqpair);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "rc =%d\n", rc);
|
||||
SPDK_DEBUGLOG(nvme, "rc =%d\n", rc);
|
||||
if (rc < 0) {
|
||||
SPDK_ERRLOG("Unable to register rqpair RDMA responses\n");
|
||||
return -1;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "RDMA responses registered\n");
|
||||
SPDK_DEBUGLOG(nvme, "RDMA responses registered\n");
|
||||
|
||||
rc = nvme_rdma_register_mem(rqpair);
|
||||
if (rc < 0) {
|
||||
@ -1677,7 +1677,7 @@ nvme_rdma_build_sgl_inline_request(struct nvme_rdma_qpair *rqpair,
|
||||
}
|
||||
|
||||
if (length < req->payload_size) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Inline SGL request split so sending separately.\n");
|
||||
SPDK_DEBUGLOG(nvme, "Inline SGL request split so sending separately.\n");
|
||||
return nvme_rdma_build_sgl_request(rqpair, rdma_req);
|
||||
}
|
||||
|
||||
@ -1788,23 +1788,23 @@ nvme_rdma_ctrlr_create_qpair(struct spdk_nvme_ctrlr *ctrlr,
|
||||
}
|
||||
|
||||
rc = nvme_rdma_alloc_reqs(rqpair);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "rc =%d\n", rc);
|
||||
SPDK_DEBUGLOG(nvme, "rc =%d\n", rc);
|
||||
if (rc) {
|
||||
SPDK_ERRLOG("Unable to allocate rqpair RDMA requests\n");
|
||||
nvme_rdma_free(rqpair);
|
||||
return NULL;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "RDMA requests allocated\n");
|
||||
SPDK_DEBUGLOG(nvme, "RDMA requests allocated\n");
|
||||
|
||||
rc = nvme_rdma_alloc_rsps(rqpair);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "rc =%d\n", rc);
|
||||
SPDK_DEBUGLOG(nvme, "rc =%d\n", rc);
|
||||
if (rc < 0) {
|
||||
SPDK_ERRLOG("Unable to allocate rqpair RDMA responses\n");
|
||||
nvme_rdma_free_reqs(rqpair);
|
||||
nvme_rdma_free(rqpair);
|
||||
return NULL;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "RDMA responses allocated\n");
|
||||
SPDK_DEBUGLOG(nvme, "RDMA responses allocated\n");
|
||||
|
||||
return qpair;
|
||||
}
|
||||
@ -1845,7 +1845,7 @@ nvme_rdma_ctrlr_disconnect_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme
|
||||
spdk_rdma_qp_disconnect(rqpair->rdma_qp);
|
||||
if (rctrlr != NULL) {
|
||||
if (nvme_rdma_process_event(rqpair, rctrlr->cm_channel, RDMA_CM_EVENT_DISCONNECTED)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Target did not respond to qpair disconnect.\n");
|
||||
SPDK_DEBUGLOG(nvme, "Target did not respond to qpair disconnect.\n");
|
||||
}
|
||||
}
|
||||
spdk_rdma_qp_destroy(rqpair->rdma_qp);
|
||||
@ -2021,7 +2021,7 @@ static struct spdk_nvme_ctrlr *nvme_rdma_ctrlr_construct(const struct spdk_nvme_
|
||||
|
||||
nvme_ctrlr_init_cap(&rctrlr->ctrlr, &cap, &vs);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "successfully initialized the nvmf ctrlr\n");
|
||||
SPDK_DEBUGLOG(nvme, "successfully initialized the nvmf ctrlr\n");
|
||||
return &rctrlr->ctrlr;
|
||||
|
||||
destruct_ctrlr:
|
||||
@ -2241,7 +2241,7 @@ nvme_rdma_cq_process_completions(struct ibv_cq *cq, uint32_t batch_size,
|
||||
continue;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "CQ recv completion\n");
|
||||
SPDK_DEBUGLOG(nvme, "CQ recv completion\n");
|
||||
|
||||
if (wc[i].byte_len < sizeof(struct spdk_nvme_cpl)) {
|
||||
SPDK_ERRLOG("recv length %u less than expected response size\n", wc[i].byte_len);
|
||||
@ -2573,7 +2573,7 @@ nvme_rdma_resize_cq(struct nvme_rdma_qpair *rqpair, struct nvme_rdma_poller *pol
|
||||
}
|
||||
|
||||
if (poller->current_num_wc != current_num_wc) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Resize RDMA CQ from %d to %d\n", poller->current_num_wc,
|
||||
SPDK_DEBUGLOG(nvme, "Resize RDMA CQ from %d to %d\n", poller->current_num_wc,
|
||||
current_num_wc);
|
||||
if (ibv_resize_cq(poller->cq, current_num_wc)) {
|
||||
SPDK_ERRLOG("RDMA CQ resize failed: errno %d: %s\n", errno, spdk_strerror(errno));
|
||||
|
@ -426,7 +426,7 @@ nvme_tcp_build_contig_request(struct nvme_tcp_qpair *tqpair, struct nvme_tcp_req
|
||||
tcp_req->iov[0].iov_len = req->payload_size;
|
||||
tcp_req->iovcnt = 1;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "enter\n");
|
||||
SPDK_DEBUGLOG(nvme, "enter\n");
|
||||
|
||||
assert(nvme_payload_type(&req->payload) == NVME_PAYLOAD_TYPE_CONTIG);
|
||||
|
||||
@ -443,7 +443,7 @@ nvme_tcp_build_sgl_request(struct nvme_tcp_qpair *tqpair, struct nvme_tcp_req *t
|
||||
uint32_t length, remaining_size, iovcnt = 0, max_num_sgl;
|
||||
struct nvme_request *req = tcp_req->req;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "enter\n");
|
||||
SPDK_DEBUGLOG(nvme, "enter\n");
|
||||
|
||||
assert(req->payload_size != 0);
|
||||
assert(nvme_payload_type(&req->payload) == NVME_PAYLOAD_TYPE_SGL);
|
||||
@ -549,7 +549,7 @@ nvme_tcp_req_complete_safe(struct nvme_tcp_req *tcp_req)
|
||||
assert(tcp_req->tqpair != NULL);
|
||||
assert(tcp_req->req != NULL);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "complete tcp_req(%p) on tqpair=%p\n", tcp_req, tcp_req->tqpair);
|
||||
SPDK_DEBUGLOG(nvme, "complete tcp_req(%p) on tqpair=%p\n", tcp_req, tcp_req->tqpair);
|
||||
|
||||
if (!tcp_req->tqpair->qpair.in_completion_context) {
|
||||
tcp_req->tqpair->async_complete++;
|
||||
@ -575,12 +575,12 @@ nvme_tcp_qpair_cmd_send_complete(void *cb_arg)
|
||||
{
|
||||
struct nvme_tcp_req *tcp_req = cb_arg;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "tcp req %p, cid %u, qid %u\n", tcp_req, tcp_req->cid,
|
||||
SPDK_DEBUGLOG(nvme, "tcp req %p, cid %u, qid %u\n", tcp_req, tcp_req->cid,
|
||||
tcp_req->tqpair->qpair.id);
|
||||
tcp_req->ordering.bits.send_ack = 1;
|
||||
/* Handle the r2t case */
|
||||
if (spdk_unlikely(tcp_req->ordering.bits.h2c_send_waiting_ack)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "tcp req %p, send H2C data\n", tcp_req);
|
||||
SPDK_DEBUGLOG(nvme, "tcp req %p, send H2C data\n", tcp_req);
|
||||
nvme_tcp_send_h2c_data(tcp_req);
|
||||
} else {
|
||||
nvme_tcp_req_complete_safe(tcp_req);
|
||||
@ -596,7 +596,7 @@ nvme_tcp_qpair_capsule_cmd_send(struct nvme_tcp_qpair *tqpair,
|
||||
uint32_t plen = 0, alignment;
|
||||
uint8_t pdo;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "enter\n");
|
||||
SPDK_DEBUGLOG(nvme, "enter\n");
|
||||
pdu = tcp_req->send_pdu;
|
||||
|
||||
capsule_cmd = &pdu->hdr.capsule_cmd;
|
||||
@ -604,10 +604,10 @@ nvme_tcp_qpair_capsule_cmd_send(struct nvme_tcp_qpair *tqpair,
|
||||
plen = capsule_cmd->common.hlen = sizeof(*capsule_cmd);
|
||||
capsule_cmd->ccsqe = tcp_req->req->cmd;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "capsule_cmd cid=%u on tqpair(%p)\n", tcp_req->req->cmd.cid, tqpair);
|
||||
SPDK_DEBUGLOG(nvme, "capsule_cmd cid=%u on tqpair(%p)\n", tcp_req->req->cmd.cid, tqpair);
|
||||
|
||||
if (tqpair->flags.host_hdgst_enable) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Header digest is enabled for capsule command on tcp_req=%p\n",
|
||||
SPDK_DEBUGLOG(nvme, "Header digest is enabled for capsule command on tcp_req=%p\n",
|
||||
tcp_req);
|
||||
capsule_cmd->common.flags |= SPDK_NVME_TCP_CH_FLAGS_HDGSTF;
|
||||
plen += SPDK_NVME_TCP_DIGEST_LEN;
|
||||
@ -787,7 +787,7 @@ nvme_tcp_pdu_ch_handle(struct nvme_tcp_qpair *tqpair)
|
||||
|
||||
pdu = &tqpair->recv_pdu;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "pdu type = %d\n", pdu->hdr.common.pdu_type);
|
||||
SPDK_DEBUGLOG(nvme, "pdu type = %d\n", pdu->hdr.common.pdu_type);
|
||||
if (pdu->hdr.common.pdu_type == SPDK_NVME_TCP_PDU_TYPE_IC_RESP) {
|
||||
if (tqpair->state != NVME_TCP_QPAIR_STATE_INVALID) {
|
||||
SPDK_ERRLOG("Already received IC_RESP PDU, and we should reject this pdu=%p\n", pdu);
|
||||
@ -890,7 +890,7 @@ nvme_tcp_c2h_data_payload_handle(struct nvme_tcp_qpair *tqpair,
|
||||
tcp_req = pdu->req;
|
||||
assert(tcp_req != NULL);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "enter\n");
|
||||
SPDK_DEBUGLOG(nvme, "enter\n");
|
||||
c2h_data = &pdu->hdr.c2h_data;
|
||||
tcp_req->datao += pdu->data_len;
|
||||
flags = c2h_data->common.flags;
|
||||
@ -929,7 +929,7 @@ nvme_tcp_c2h_term_req_dump(struct spdk_nvme_tcp_term_req_hdr *c2h_term_req)
|
||||
spdk_nvme_tcp_term_req_fes_str[c2h_term_req->fes]);
|
||||
if ((c2h_term_req->fes == SPDK_NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD) ||
|
||||
(c2h_term_req->fes == SPDK_NVME_TCP_TERM_REQ_FES_INVALID_DATA_UNSUPPORTED_PARAMETER)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "The offset from the start of the PDU header is %u\n",
|
||||
SPDK_DEBUGLOG(nvme, "The offset from the start of the PDU header is %u\n",
|
||||
DGET32(c2h_term_req->fei));
|
||||
}
|
||||
/* we may also need to dump some other info here */
|
||||
@ -955,7 +955,7 @@ nvme_tcp_pdu_payload_handle(struct nvme_tcp_qpair *tqpair,
|
||||
assert(tqpair->recv_state == NVME_TCP_PDU_RECV_STATE_AWAIT_PDU_PAYLOAD);
|
||||
pdu = &tqpair->recv_pdu;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "enter\n");
|
||||
SPDK_DEBUGLOG(nvme, "enter\n");
|
||||
|
||||
/* check data digest if need */
|
||||
if (pdu->ddgst_enable) {
|
||||
@ -990,12 +990,12 @@ nvme_tcp_send_icreq_complete(void *cb_arg)
|
||||
{
|
||||
struct nvme_tcp_qpair *tqpair = cb_arg;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Complete the icreq send for tqpair=%p\n", tqpair);
|
||||
SPDK_DEBUGLOG(nvme, "Complete the icreq send for tqpair=%p\n", tqpair);
|
||||
|
||||
tqpair->flags.icreq_send_ack = true;
|
||||
|
||||
if (tqpair->state == NVME_TCP_QPAIR_STATE_INITIALIZING) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "qpair %u, finilize icresp\n", tqpair->qpair.id);
|
||||
SPDK_DEBUGLOG(nvme, "qpair %u, finilize icresp\n", tqpair->qpair.id);
|
||||
nvme_tcp_icresp_handle(tqpair, &tqpair->recv_pdu);
|
||||
}
|
||||
}
|
||||
@ -1011,7 +1011,7 @@ nvme_tcp_icresp_handle(struct nvme_tcp_qpair *tqpair,
|
||||
|
||||
if (!tqpair->flags.icreq_send_ack) {
|
||||
tqpair->state = NVME_TCP_QPAIR_STATE_INITIALIZING;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "qpair %u, waiting icreq ack\n", tqpair->qpair.id);
|
||||
SPDK_DEBUGLOG(nvme, "qpair %u, waiting icreq ack\n", tqpair->qpair.id);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1042,8 +1042,8 @@ nvme_tcp_icresp_handle(struct nvme_tcp_qpair *tqpair,
|
||||
|
||||
tqpair->flags.host_hdgst_enable = ic_resp->dgst.bits.hdgst_enable ? true : false;
|
||||
tqpair->flags.host_ddgst_enable = ic_resp->dgst.bits.ddgst_enable ? true : false;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "host_hdgst_enable: %u\n", tqpair->flags.host_hdgst_enable);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "host_ddgst_enable: %u\n", tqpair->flags.host_ddgst_enable);
|
||||
SPDK_DEBUGLOG(nvme, "host_hdgst_enable: %u\n", tqpair->flags.host_hdgst_enable);
|
||||
SPDK_DEBUGLOG(nvme, "host_ddgst_enable: %u\n", tqpair->flags.host_ddgst_enable);
|
||||
|
||||
/* Now that we know whether digests are enabled, properly size the receive buffer to
|
||||
* handle several incoming 4K read commands according to SPDK_NVMF_TCP_RECV_BUF_SIZE_FACTOR
|
||||
@ -1082,7 +1082,7 @@ nvme_tcp_capsule_resp_hdr_handle(struct nvme_tcp_qpair *tqpair, struct nvme_tcp_
|
||||
uint32_t cid, error_offset = 0;
|
||||
enum spdk_nvme_tcp_term_req_fes fes;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "enter\n");
|
||||
SPDK_DEBUGLOG(nvme, "enter\n");
|
||||
cid = capsule_resp->rccqe.cid;
|
||||
tcp_req = get_nvme_active_req_by_cid(tqpair, cid);
|
||||
|
||||
@ -1145,8 +1145,8 @@ nvme_tcp_c2h_data_hdr_handle(struct nvme_tcp_qpair *tqpair, struct nvme_tcp_pdu
|
||||
uint32_t error_offset = 0;
|
||||
enum spdk_nvme_tcp_term_req_fes fes;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "enter\n");
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "c2h_data info on tqpair(%p): datao=%u, datal=%u, cccid=%d\n",
|
||||
SPDK_DEBUGLOG(nvme, "enter\n");
|
||||
SPDK_DEBUGLOG(nvme, "c2h_data info on tqpair(%p): datao=%u, datal=%u, cccid=%d\n",
|
||||
tqpair, c2h_data->datao, c2h_data->datal, c2h_data->cccid);
|
||||
tcp_req = get_nvme_active_req_by_cid(tqpair, c2h_data->cccid);
|
||||
if (!tcp_req) {
|
||||
@ -1157,7 +1157,7 @@ nvme_tcp_c2h_data_hdr_handle(struct nvme_tcp_qpair *tqpair, struct nvme_tcp_pdu
|
||||
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "tcp_req(%p) on tqpair(%p): datao=%u, payload_size=%u\n",
|
||||
SPDK_DEBUGLOG(nvme, "tcp_req(%p) on tqpair(%p): datao=%u, payload_size=%u\n",
|
||||
tcp_req, tqpair, tcp_req->datao, tcp_req->req->payload_size);
|
||||
|
||||
if (c2h_data->datal > tcp_req->req->payload_size) {
|
||||
@ -1213,7 +1213,7 @@ nvme_tcp_qpair_h2c_data_send_complete(void *cb_arg)
|
||||
|
||||
if (tcp_req->ordering.bits.r2t_waiting_h2c_complete) {
|
||||
tcp_req->ordering.bits.r2t_waiting_h2c_complete = 0;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "tcp_req %p: continue r2t\n", tcp_req);
|
||||
SPDK_DEBUGLOG(nvme, "tcp_req %p: continue r2t\n", tcp_req);
|
||||
assert(tcp_req->active_r2ts > 0);
|
||||
tcp_req->ttag = tcp_req->ttag_r2t_next;
|
||||
tcp_req->r2tl_remain = tcp_req->r2tl_remain_next;
|
||||
@ -1281,7 +1281,7 @@ nvme_tcp_send_h2c_data(struct nvme_tcp_req *tcp_req)
|
||||
h2c_data->common.flags |= SPDK_NVME_TCP_H2C_DATA_FLAGS_LAST_PDU;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "h2c_data info: datao=%u, datal=%u, pdu_len=%u for tqpair=%p\n",
|
||||
SPDK_DEBUGLOG(nvme, "h2c_data info: datao=%u, datal=%u, pdu_len=%u for tqpair=%p\n",
|
||||
h2c_data->datao, h2c_data->datal, h2c_data->common.plen, tqpair);
|
||||
|
||||
nvme_tcp_qpair_write_pdu(tqpair, rsp_pdu, nvme_tcp_qpair_h2c_data_send_complete, tcp_req);
|
||||
@ -1295,7 +1295,7 @@ nvme_tcp_r2t_hdr_handle(struct nvme_tcp_qpair *tqpair, struct nvme_tcp_pdu *pdu)
|
||||
uint32_t cid, error_offset = 0;
|
||||
enum spdk_nvme_tcp_term_req_fes fes;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "enter\n");
|
||||
SPDK_DEBUGLOG(nvme, "enter\n");
|
||||
cid = r2t->cccid;
|
||||
tcp_req = get_nvme_active_req_by_cid(tqpair, cid);
|
||||
if (!tcp_req) {
|
||||
@ -1305,7 +1305,7 @@ nvme_tcp_r2t_hdr_handle(struct nvme_tcp_qpair *tqpair, struct nvme_tcp_pdu *pdu)
|
||||
goto end;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "r2t info: r2to=%u, r2tl=%u for tqpair=%p\n", r2t->r2to, r2t->r2tl,
|
||||
SPDK_DEBUGLOG(nvme, "r2t info: r2to=%u, r2tl=%u for tqpair=%p\n", r2t->r2to, r2t->r2tl,
|
||||
tqpair);
|
||||
|
||||
if (tcp_req->state == NVME_TCP_REQ_ACTIVE) {
|
||||
@ -1332,7 +1332,7 @@ nvme_tcp_r2t_hdr_handle(struct nvme_tcp_qpair *tqpair, struct nvme_tcp_pdu *pdu)
|
||||
if (spdk_unlikely(tcp_req->active_r2ts > tqpair->maxr2t)) {
|
||||
if (tcp_req->state == NVME_TCP_REQ_ACTIVE_R2T && !tcp_req->ordering.bits.send_ack) {
|
||||
/* We receive a subsequent R2T while we are waiting for H2C transfer to complete */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "received a subsequent R2T\n");
|
||||
SPDK_DEBUGLOG(nvme, "received a subsequent R2T\n");
|
||||
assert(tcp_req->active_r2ts == tqpair->maxr2t + 1);
|
||||
tcp_req->ttag_r2t_next = r2t->ttag;
|
||||
tcp_req->r2tl_remain_next = r2t->r2tl;
|
||||
@ -1376,7 +1376,7 @@ nvme_tcp_pdu_psh_handle(struct nvme_tcp_qpair *tqpair, uint32_t *reaped)
|
||||
assert(tqpair->recv_state == NVME_TCP_PDU_RECV_STATE_AWAIT_PDU_PSH);
|
||||
pdu = &tqpair->recv_pdu;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "enter: pdu type =%u\n", pdu->hdr.common.pdu_type);
|
||||
SPDK_DEBUGLOG(nvme, "enter: pdu type =%u\n", pdu->hdr.common.pdu_type);
|
||||
/* check header digest if needed */
|
||||
if (pdu->has_hdgst) {
|
||||
crc32c = nvme_tcp_pdu_calc_header_digest(pdu);
|
||||
@ -1583,7 +1583,7 @@ nvme_tcp_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_c
|
||||
do {
|
||||
rc = nvme_tcp_read_pdu(tqpair, &reaped);
|
||||
if (rc < 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Error polling CQ! (%d): %s\n",
|
||||
SPDK_DEBUGLOG(nvme, "Error polling CQ! (%d): %s\n",
|
||||
errno, spdk_strerror(errno));
|
||||
goto fail;
|
||||
} else if (rc == 0) {
|
||||
@ -1675,7 +1675,7 @@ nvme_tcp_qpair_icreq_send(struct nvme_tcp_qpair *tqpair)
|
||||
return -1;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Succesfully construct the tqpair=%p via correct icresp\n", tqpair);
|
||||
SPDK_DEBUGLOG(nvme, "Succesfully construct the tqpair=%p via correct icresp\n", tqpair);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1706,11 +1706,11 @@ nvme_tcp_ctrlr_connect_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_qpa
|
||||
return rc;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "adrfam %d ai_family %d\n", ctrlr->trid.adrfam, family);
|
||||
SPDK_DEBUGLOG(nvme, "adrfam %d ai_family %d\n", ctrlr->trid.adrfam, family);
|
||||
|
||||
memset(&dst_addr, 0, sizeof(dst_addr));
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "trsvcid is %s\n", ctrlr->trid.trsvcid);
|
||||
SPDK_DEBUGLOG(nvme, "trsvcid is %s\n", ctrlr->trid.trsvcid);
|
||||
rc = nvme_tcp_parse_addr(&dst_addr, family, ctrlr->trid.traddr, ctrlr->trid.trsvcid);
|
||||
if (rc != 0) {
|
||||
SPDK_ERRLOG("dst_addr nvme_tcp_parse_addr() failed\n");
|
||||
|
@ -520,7 +520,7 @@ nvme_transport_poll_group_process_completions(struct spdk_nvme_transport_poll_gr
|
||||
}
|
||||
}
|
||||
/* Just in case. */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Mismatch between qpairs to delete and poll group number.\n");
|
||||
SPDK_DEBUGLOG(nvme, "Mismatch between qpairs to delete and poll group number.\n");
|
||||
tgroup->num_qpairs_to_delete = 0;
|
||||
}
|
||||
|
||||
|
136
lib/nvmf/ctrlr.c
136
lib/nvmf/ctrlr.c
@ -100,7 +100,7 @@ nvmf_ctrlr_stop_keep_alive_timer(struct spdk_nvmf_ctrlr *ctrlr)
|
||||
return;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Stop keep alive poller\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Stop keep alive poller\n");
|
||||
spdk_poller_unregister(&ctrlr->keep_alive_poller);
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ nvmf_ctrlr_stop_association_timer(struct spdk_nvmf_ctrlr *ctrlr)
|
||||
return;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Stop association timer\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Stop association timer\n");
|
||||
spdk_poller_unregister(&ctrlr->association_timer);
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ static void
|
||||
nvmf_ctrlr_disconnect_qpairs_done(struct spdk_io_channel_iter *i, int status)
|
||||
{
|
||||
if (status == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "ctrlr disconnect qpairs complete successfully\n");
|
||||
SPDK_DEBUGLOG(nvmf, "ctrlr disconnect qpairs complete successfully\n");
|
||||
} else {
|
||||
SPDK_ERRLOG("Fail to disconnect ctrlr qpairs\n");
|
||||
}
|
||||
@ -176,7 +176,7 @@ nvmf_ctrlr_keep_alive_poll(void *ctx)
|
||||
uint64_t now = spdk_get_ticks();
|
||||
struct spdk_nvmf_ctrlr *ctrlr = ctx;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Polling ctrlr keep alive timeout\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Polling ctrlr keep alive timeout\n");
|
||||
|
||||
/* If the Keep alive feature is in use and the timer expires */
|
||||
keep_alive_timeout_tick = ctrlr->last_keep_alive_tick +
|
||||
@ -216,7 +216,7 @@ nvmf_ctrlr_start_keep_alive_timer(struct spdk_nvmf_ctrlr *ctrlr)
|
||||
|
||||
ctrlr->last_keep_alive_tick = spdk_get_ticks();
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Ctrlr add keep alive poller\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Ctrlr add keep alive poller\n");
|
||||
ctrlr->keep_alive_poller = SPDK_POLLER_REGISTER(nvmf_ctrlr_keep_alive_poll, ctrlr,
|
||||
ctrlr->feat.keep_alive_timer.bits.kato * 1000);
|
||||
}
|
||||
@ -250,7 +250,7 @@ ctrlr_add_qpair_and_update_rsp(struct spdk_nvmf_qpair *qpair,
|
||||
|
||||
rsp->status.sc = SPDK_NVME_SC_SUCCESS;
|
||||
rsp->status_code_specific.success.cntlid = ctrlr->cntlid;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "connect capsule response: cntlid = 0x%04x\n",
|
||||
SPDK_DEBUGLOG(nvmf, "connect capsule response: cntlid = 0x%04x\n",
|
||||
rsp->status_code_specific.success.cntlid);
|
||||
}
|
||||
|
||||
@ -405,10 +405,10 @@ nvmf_ctrlr_create(struct spdk_nvmf_subsystem *subsystem,
|
||||
ctrlr->vcprop.csts.raw = 0;
|
||||
ctrlr->vcprop.csts.bits.rdy = 0; /* Init controller as not ready */
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "cap 0x%" PRIx64 "\n", ctrlr->vcprop.cap.raw);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "vs 0x%x\n", ctrlr->vcprop.vs.raw);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "cc 0x%x\n", ctrlr->vcprop.cc.raw);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "csts 0x%x\n", ctrlr->vcprop.csts.raw);
|
||||
SPDK_DEBUGLOG(nvmf, "cap 0x%" PRIx64 "\n", ctrlr->vcprop.cap.raw);
|
||||
SPDK_DEBUGLOG(nvmf, "vs 0x%x\n", ctrlr->vcprop.vs.raw);
|
||||
SPDK_DEBUGLOG(nvmf, "cc 0x%x\n", ctrlr->vcprop.cc.raw);
|
||||
SPDK_DEBUGLOG(nvmf, "csts 0x%x\n", ctrlr->vcprop.csts.raw);
|
||||
|
||||
ctrlr->dif_insert_or_strip = transport->opts.dif_insert_or_strip;
|
||||
|
||||
@ -517,7 +517,7 @@ _nvmf_ctrlr_add_io_qpair(void *ctx)
|
||||
struct spdk_nvmf_subsystem *subsystem;
|
||||
const struct spdk_nvmf_subsystem_listener *listener;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Connect I/O Queue for controller id 0x%x\n", data->cntlid);
|
||||
SPDK_DEBUGLOG(nvmf, "Connect I/O Queue for controller id 0x%x\n", data->cntlid);
|
||||
|
||||
subsystem = spdk_nvmf_tgt_find_subsystem(tgt, data->subnqn);
|
||||
/* We already checked this in spdk_nvmf_ctrlr_connect */
|
||||
@ -592,12 +592,12 @@ _nvmf_ctrlr_connect(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvmf_ctrlr *ctrlr;
|
||||
struct spdk_nvmf_subsystem *subsystem;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "recfmt 0x%x qid %u sqsize %u\n",
|
||||
SPDK_DEBUGLOG(nvmf, "recfmt 0x%x qid %u sqsize %u\n",
|
||||
cmd->recfmt, cmd->qid, cmd->sqsize);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Connect data:\n");
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, " cntlid: 0x%04x\n", data->cntlid);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, " hostid: %08x-%04x-%04x-%02x%02x-%04x%08x ***\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Connect data:\n");
|
||||
SPDK_DEBUGLOG(nvmf, " cntlid: 0x%04x\n", data->cntlid);
|
||||
SPDK_DEBUGLOG(nvmf, " hostid: %08x-%04x-%04x-%02x%02x-%04x%08x ***\n",
|
||||
ntohl(*(uint32_t *)&data->hostid[0]),
|
||||
ntohs(*(uint16_t *)&data->hostid[4]),
|
||||
ntohs(*(uint16_t *)&data->hostid[6]),
|
||||
@ -605,8 +605,8 @@ _nvmf_ctrlr_connect(struct spdk_nvmf_request *req)
|
||||
data->hostid[9],
|
||||
ntohs(*(uint16_t *)&data->hostid[10]),
|
||||
ntohl(*(uint32_t *)&data->hostid[12]));
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, " subnqn: \"%s\"\n", data->subnqn);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, " hostnqn: \"%s\"\n", data->hostnqn);
|
||||
SPDK_DEBUGLOG(nvmf, " subnqn: \"%s\"\n", data->subnqn);
|
||||
SPDK_DEBUGLOG(nvmf, " hostnqn: \"%s\"\n", data->hostnqn);
|
||||
|
||||
subsystem = spdk_nvmf_tgt_find_subsystem(transport->tgt, data->subnqn);
|
||||
if (!subsystem) {
|
||||
@ -655,7 +655,7 @@ _nvmf_ctrlr_connect(struct spdk_nvmf_request *req)
|
||||
}
|
||||
|
||||
if (cmd->qid == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Connect Admin Queue for controller ID 0x%x\n", data->cntlid);
|
||||
SPDK_DEBUGLOG(nvmf, "Connect Admin Queue for controller ID 0x%x\n", data->cntlid);
|
||||
|
||||
if (data->cntlid != 0xFFFF) {
|
||||
/* This NVMf target only supports dynamic mode. */
|
||||
@ -787,7 +787,7 @@ nvmf_ctrlr_association_remove(void *ctx)
|
||||
struct spdk_nvmf_ctrlr *ctrlr = ctx;
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Disconnecting host from subsystem %s due to association timeout.\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Disconnecting host from subsystem %s due to association timeout.\n",
|
||||
ctrlr->subsys->subnqn);
|
||||
|
||||
rc = spdk_nvmf_qpair_disconnect(ctrlr->admin_qpair, NULL, NULL);
|
||||
@ -869,8 +869,8 @@ nvmf_prop_set_cc(struct spdk_nvmf_ctrlr *ctrlr, uint32_t value)
|
||||
|
||||
cc.raw = value;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "cur CC: 0x%08x\n", ctrlr->vcprop.cc.raw);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "new CC: 0x%08x\n", cc.raw);
|
||||
SPDK_DEBUGLOG(nvmf, "cur CC: 0x%08x\n", ctrlr->vcprop.cc.raw);
|
||||
SPDK_DEBUGLOG(nvmf, "new CC: 0x%08x\n", cc.raw);
|
||||
|
||||
/*
|
||||
* Calculate which bits changed between the current and new CC.
|
||||
@ -880,13 +880,13 @@ nvmf_prop_set_cc(struct spdk_nvmf_ctrlr *ctrlr, uint32_t value)
|
||||
|
||||
if (diff.bits.en) {
|
||||
if (cc.bits.en) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Property Set CC Enable!\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Property Set CC Enable!\n");
|
||||
nvmf_ctrlr_stop_association_timer(ctrlr);
|
||||
|
||||
ctrlr->vcprop.cc.bits.en = 1;
|
||||
ctrlr->vcprop.csts.bits.rdy = 1;
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Property Set CC Disable!\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Property Set CC Disable!\n");
|
||||
ctrlr->vcprop.cc.bits.en = 0;
|
||||
spdk_for_each_channel(ctrlr->subsys->tgt,
|
||||
nvmf_ctrlr_disconnect_io_qpairs_on_pg,
|
||||
@ -899,7 +899,7 @@ nvmf_prop_set_cc(struct spdk_nvmf_ctrlr *ctrlr, uint32_t value)
|
||||
if (diff.bits.shn) {
|
||||
if (cc.bits.shn == SPDK_NVME_SHN_NORMAL ||
|
||||
cc.bits.shn == SPDK_NVME_SHN_ABRUPT) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Property Set CC Shutdown %u%ub!\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Property Set CC Shutdown %u%ub!\n",
|
||||
cc.bits.shn >> 1, cc.bits.shn & 1);
|
||||
ctrlr->vcprop.cc.bits.shn = cc.bits.shn;
|
||||
spdk_for_each_channel(ctrlr->subsys->tgt,
|
||||
@ -921,14 +921,14 @@ nvmf_prop_set_cc(struct spdk_nvmf_ctrlr *ctrlr, uint32_t value)
|
||||
}
|
||||
|
||||
if (diff.bits.iosqes) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Prop Set IOSQES = %u (%u bytes)\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Prop Set IOSQES = %u (%u bytes)\n",
|
||||
cc.bits.iosqes, 1u << cc.bits.iosqes);
|
||||
ctrlr->vcprop.cc.bits.iosqes = cc.bits.iosqes;
|
||||
diff.bits.iosqes = 0;
|
||||
}
|
||||
|
||||
if (diff.bits.iocqes) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Prop Set IOCQES = %u (%u bytes)\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Prop Set IOCQES = %u (%u bytes)\n",
|
||||
cc.bits.iocqes, 1u << cc.bits.iocqes);
|
||||
ctrlr->vcprop.cc.bits.iocqes = cc.bits.iocqes;
|
||||
diff.bits.iocqes = 0;
|
||||
@ -1086,7 +1086,7 @@ nvmf_property_get(struct spdk_nvmf_request *req)
|
||||
response->status.sc = 0;
|
||||
response->value.u64 = 0;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "size %d, offset 0x%x\n",
|
||||
SPDK_DEBUGLOG(nvmf, "size %d, offset 0x%x\n",
|
||||
cmd->attrib.size, cmd->ofst);
|
||||
|
||||
switch (cmd->attrib.size) {
|
||||
@ -1110,11 +1110,11 @@ nvmf_property_get(struct spdk_nvmf_request *req)
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "name: %s\n", prop->name);
|
||||
SPDK_DEBUGLOG(nvmf, "name: %s\n", prop->name);
|
||||
|
||||
response->value.u64 = prop->get_cb(ctrlr);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "response value: 0x%" PRIx64 "\n", response->value.u64);
|
||||
SPDK_DEBUGLOG(nvmf, "response value: 0x%" PRIx64 "\n", response->value.u64);
|
||||
|
||||
if (size != prop->size) {
|
||||
/* The size must be 4 and the prop->size is 8. Figure out which part of the property to read. */
|
||||
@ -1144,7 +1144,7 @@ nvmf_property_set(struct spdk_nvmf_request *req)
|
||||
uint8_t size;
|
||||
bool ret;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "size %d, offset 0x%x, value 0x%" PRIx64 "\n",
|
||||
SPDK_DEBUGLOG(nvmf, "size %d, offset 0x%x, value 0x%" PRIx64 "\n",
|
||||
cmd->attrib.size, cmd->ofst, cmd->value.u64);
|
||||
|
||||
switch (cmd->attrib.size) {
|
||||
@ -1169,7 +1169,7 @@ nvmf_property_set(struct spdk_nvmf_request *req)
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "name: %s\n", prop->name);
|
||||
SPDK_DEBUGLOG(nvmf, "name: %s\n", prop->name);
|
||||
|
||||
value = cmd->value.u64;
|
||||
|
||||
@ -1208,7 +1208,7 @@ nvmf_ctrlr_set_features_arbitration(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvmf_ctrlr *ctrlr = req->qpair->ctrlr;
|
||||
struct spdk_nvme_cmd *cmd = &req->cmd->nvme_cmd;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Arbitration (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
SPDK_DEBUGLOG(nvmf, "Set Features - Arbitration (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
|
||||
ctrlr->feat.arbitration.raw = cmd->cdw11;
|
||||
ctrlr->feat.arbitration.bits.reserved = 0;
|
||||
@ -1223,7 +1223,7 @@ nvmf_ctrlr_set_features_power_management(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvme_cmd *cmd = &req->cmd->nvme_cmd;
|
||||
struct spdk_nvme_cpl *rsp = &req->rsp->nvme_cpl;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Power Management (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
SPDK_DEBUGLOG(nvmf, "Set Features - Power Management (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
|
||||
/* Only PS = 0 is allowed, since we report NPSS = 0 */
|
||||
if (cmd->cdw11_bits.feat_power_management.bits.ps != 0) {
|
||||
@ -1273,7 +1273,7 @@ nvmf_ctrlr_set_features_temperature_threshold(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvme_cmd *cmd = &req->cmd->nvme_cmd;
|
||||
struct spdk_nvme_cpl *rsp = &req->rsp->nvme_cpl;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Temperature Threshold (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
SPDK_DEBUGLOG(nvmf, "Set Features - Temperature Threshold (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
|
||||
if (!temp_threshold_opts_valid(&cmd->cdw11_bits.feat_temp_threshold)) {
|
||||
rsp->status.sct = SPDK_NVME_SCT_GENERIC;
|
||||
@ -1291,7 +1291,7 @@ nvmf_ctrlr_get_features_temperature_threshold(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvme_cmd *cmd = &req->cmd->nvme_cmd;
|
||||
struct spdk_nvme_cpl *rsp = &req->rsp->nvme_cpl;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Get Features - Temperature Threshold (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
SPDK_DEBUGLOG(nvmf, "Get Features - Temperature Threshold (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
|
||||
if (!temp_threshold_opts_valid(&cmd->cdw11_bits.feat_temp_threshold)) {
|
||||
rsp->status.sct = SPDK_NVME_SCT_GENERIC;
|
||||
@ -1312,7 +1312,7 @@ nvmf_ctrlr_set_features_error_recovery(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvme_cmd *cmd = &req->cmd->nvme_cmd;
|
||||
struct spdk_nvme_cpl *rsp = &req->rsp->nvme_cpl;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Error Recovery (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
SPDK_DEBUGLOG(nvmf, "Set Features - Error Recovery (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
|
||||
if (cmd->cdw11_bits.feat_error_recovery.bits.dulbe) {
|
||||
/*
|
||||
@ -1337,12 +1337,12 @@ nvmf_ctrlr_set_features_volatile_write_cache(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvmf_ctrlr *ctrlr = req->qpair->ctrlr;
|
||||
struct spdk_nvme_cmd *cmd = &req->cmd->nvme_cmd;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Volatile Write Cache (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
SPDK_DEBUGLOG(nvmf, "Set Features - Volatile Write Cache (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
|
||||
ctrlr->feat.volatile_write_cache.raw = cmd->cdw11;
|
||||
ctrlr->feat.volatile_write_cache.bits.reserved = 0;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Volatile Write Cache %s\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Set Features - Volatile Write Cache %s\n",
|
||||
ctrlr->feat.volatile_write_cache.bits.wce ? "Enabled" : "Disabled");
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE;
|
||||
}
|
||||
@ -1353,7 +1353,7 @@ nvmf_ctrlr_set_features_write_atomicity(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvmf_ctrlr *ctrlr = req->qpair->ctrlr;
|
||||
struct spdk_nvme_cmd *cmd = &req->cmd->nvme_cmd;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Write Atomicity (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
SPDK_DEBUGLOG(nvmf, "Set Features - Write Atomicity (cdw11 = 0x%0x)\n", cmd->cdw11);
|
||||
|
||||
ctrlr->feat.write_atomicity.raw = cmd->cdw11;
|
||||
ctrlr->feat.write_atomicity.bits.reserved = 0;
|
||||
@ -1378,7 +1378,7 @@ nvmf_ctrlr_get_features_host_identifier(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvme_cmd *cmd = &req->cmd->nvme_cmd;
|
||||
struct spdk_nvme_cpl *response = &req->rsp->nvme_cpl;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Get Features - Host Identifier\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Get Features - Host Identifier\n");
|
||||
|
||||
if (!cmd->cdw11_bits.feat_host_identifier.bits.exhid) {
|
||||
/* NVMe over Fabrics requires EXHID=1 (128-bit/16-byte host ID) */
|
||||
@ -1405,7 +1405,7 @@ nvmf_ctrlr_get_features_reservation_notification_mask(struct spdk_nvmf_request *
|
||||
struct spdk_nvme_cpl *rsp = &req->rsp->nvme_cpl;
|
||||
struct spdk_nvmf_ns *ns;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "get Features - Reservation Notificaton Mask\n");
|
||||
SPDK_DEBUGLOG(nvmf, "get Features - Reservation Notificaton Mask\n");
|
||||
|
||||
if (cmd->nsid == SPDK_NVME_GLOBAL_NS_TAG) {
|
||||
SPDK_ERRLOG("get Features - Invalid Namespace ID\n");
|
||||
@ -1433,7 +1433,7 @@ nvmf_ctrlr_set_features_reservation_notification_mask(struct spdk_nvmf_request *
|
||||
struct spdk_nvme_cpl *rsp = &req->rsp->nvme_cpl;
|
||||
struct spdk_nvmf_ns *ns;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Reservation Notificaton Mask\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Set Features - Reservation Notificaton Mask\n");
|
||||
|
||||
if (cmd->nsid == SPDK_NVME_GLOBAL_NS_TAG) {
|
||||
for (ns = spdk_nvmf_subsystem_get_first_ns(subsystem); ns != NULL;
|
||||
@ -1462,7 +1462,7 @@ nvmf_ctrlr_get_features_reservation_persistence(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvme_cpl *response = &req->rsp->nvme_cpl;
|
||||
struct spdk_nvmf_ns *ns;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Get Features - Reservation Persistence\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Get Features - Reservation Persistence\n");
|
||||
|
||||
ns = _nvmf_subsystem_get_ns(ctrlr->subsys, cmd->nsid);
|
||||
/* NSID with SPDK_NVME_GLOBAL_NS_TAG (=0xffffffff) also included */
|
||||
@ -1489,7 +1489,7 @@ nvmf_ctrlr_set_features_reservation_persistence(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvmf_ns *ns;
|
||||
bool ptpl;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Reservation Persistence\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Set Features - Reservation Persistence\n");
|
||||
|
||||
ns = _nvmf_subsystem_get_ns(ctrlr->subsys, cmd->nsid);
|
||||
ptpl = cmd->cdw11_bits.feat_rsv_persistence.bits.ptpl;
|
||||
@ -1521,7 +1521,7 @@ nvmf_ctrlr_set_features_keep_alive_timer(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvme_cmd *cmd = &req->cmd->nvme_cmd;
|
||||
struct spdk_nvme_cpl *rsp = &req->rsp->nvme_cpl;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Keep Alive Timer (%u ms)\n", cmd->cdw11);
|
||||
SPDK_DEBUGLOG(nvmf, "Set Features - Keep Alive Timer (%u ms)\n", cmd->cdw11);
|
||||
|
||||
/*
|
||||
* if attempts to disable keep alive by setting kato to 0h
|
||||
@ -1551,7 +1551,7 @@ nvmf_ctrlr_set_features_keep_alive_timer(struct spdk_nvmf_request *req)
|
||||
ctrlr->feat.keep_alive_timer.bits.kato * 1000);
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Keep Alive Timer set to %u ms\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Set Features - Keep Alive Timer set to %u ms\n",
|
||||
ctrlr->feat.keep_alive_timer.bits.kato);
|
||||
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE;
|
||||
@ -1564,13 +1564,13 @@ nvmf_ctrlr_set_features_number_of_queues(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvme_cpl *rsp = &req->rsp->nvme_cpl;
|
||||
uint32_t count;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Number of Queues, cdw11 0x%x\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Set Features - Number of Queues, cdw11 0x%x\n",
|
||||
req->cmd->nvme_cmd.cdw11);
|
||||
|
||||
count = spdk_bit_array_count_set(ctrlr->qpair_mask);
|
||||
/* verify that the controller is ready to process commands */
|
||||
if (count > 1) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Queue pairs already active!\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Queue pairs already active!\n");
|
||||
rsp->status.sc = SPDK_NVME_SC_COMMAND_SEQUENCE_ERROR;
|
||||
} else {
|
||||
/*
|
||||
@ -1589,7 +1589,7 @@ nvmf_ctrlr_set_features_async_event_configuration(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvmf_ctrlr *ctrlr = req->qpair->ctrlr;
|
||||
struct spdk_nvme_cmd *cmd = &req->cmd->nvme_cmd;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Async Event Configuration, cdw11 0x%08x\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Set Features - Async Event Configuration, cdw11 0x%08x\n",
|
||||
cmd->cdw11);
|
||||
ctrlr->feat.async_event_configuration.raw = cmd->cdw11;
|
||||
ctrlr->feat.async_event_configuration.bits.reserved = 0;
|
||||
@ -1603,7 +1603,7 @@ nvmf_ctrlr_async_event_request(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvme_cpl *rsp = &req->rsp->nvme_cpl;
|
||||
struct spdk_nvmf_subsystem_poll_group *sgroup;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Async Event Request\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Async Event Request\n");
|
||||
|
||||
/* AER cmd is an exception */
|
||||
sgroup = &req->qpair->group->sgroups[ctrlr->subsys->id];
|
||||
@ -1612,7 +1612,7 @@ nvmf_ctrlr_async_event_request(struct spdk_nvmf_request *req)
|
||||
|
||||
/* Four asynchronous events are supported for now */
|
||||
if (ctrlr->nr_aer_reqs >= NVMF_MAX_ASYNC_EVENTS) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "AERL exceeded\n");
|
||||
SPDK_DEBUGLOG(nvmf, "AERL exceeded\n");
|
||||
rsp->status.sct = SPDK_NVME_SCT_COMMAND_SPECIFIC;
|
||||
rsp->status.sc = SPDK_NVME_SC_ASYNC_EVENT_REQUEST_LIMIT_EXCEEDED;
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE;
|
||||
@ -1908,7 +1908,7 @@ nvmf_ctrlr_get_log_page(struct spdk_nvmf_request *req)
|
||||
}
|
||||
|
||||
lid = cmd->cdw10_bits.get_log_page.lid;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Get log page: LID=0x%02X offset=0x%" PRIx64 " len=0x%" PRIx64 "\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Get log page: LID=0x%02X offset=0x%" PRIx64 " len=0x%" PRIx64 "\n",
|
||||
lid, offset, len);
|
||||
|
||||
if (subsystem->subtype == SPDK_NVMF_SUBTYPE_DISCOVERY) {
|
||||
@ -1981,7 +1981,7 @@ spdk_nvmf_ctrlr_identify_ns(struct spdk_nvmf_ctrlr *ctrlr,
|
||||
* The data buffer is already zeroed by nvmf_ctrlr_process_admin_cmd(),
|
||||
* so we can just return early here.
|
||||
*/
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Identify Namespace for inactive NSID %u\n", cmd->nsid);
|
||||
SPDK_DEBUGLOG(nvmf, "Identify Namespace for inactive NSID %u\n", cmd->nsid);
|
||||
rsp->status.sct = SPDK_NVME_SCT_GENERIC;
|
||||
rsp->status.sc = SPDK_NVME_SC_SUCCESS;
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE;
|
||||
@ -2060,8 +2060,8 @@ spdk_nvmf_ctrlr_identify_ctrlr(struct spdk_nvmf_ctrlr *ctrlr, struct spdk_nvme_c
|
||||
}
|
||||
spdk_strcpy_pad(cdata->subnqn, subsystem->subnqn, sizeof(cdata->subnqn), '\0');
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "ctrlr data: maxcmd 0x%x\n", cdata->maxcmd);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "sgls data: 0x%x\n", from_le32(&cdata->sgls));
|
||||
SPDK_DEBUGLOG(nvmf, "ctrlr data: maxcmd 0x%x\n", cdata->maxcmd);
|
||||
SPDK_DEBUGLOG(nvmf, "sgls data: 0x%x\n", from_le32(&cdata->sgls));
|
||||
|
||||
/*
|
||||
* NVM subsystem fields (reserved for discovery subsystems)
|
||||
@ -2120,15 +2120,15 @@ spdk_nvmf_ctrlr_identify_ctrlr(struct spdk_nvmf_ctrlr *ctrlr, struct spdk_nvme_c
|
||||
|
||||
nvmf_ctrlr_populate_oacs(ctrlr, cdata);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "ext ctrlr data: ioccsz 0x%x\n",
|
||||
SPDK_DEBUGLOG(nvmf, "ext ctrlr data: ioccsz 0x%x\n",
|
||||
cdata->nvmf_specific.ioccsz);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "ext ctrlr data: iorcsz 0x%x\n",
|
||||
SPDK_DEBUGLOG(nvmf, "ext ctrlr data: iorcsz 0x%x\n",
|
||||
cdata->nvmf_specific.iorcsz);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "ext ctrlr data: icdoff 0x%x\n",
|
||||
SPDK_DEBUGLOG(nvmf, "ext ctrlr data: icdoff 0x%x\n",
|
||||
cdata->nvmf_specific.icdoff);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "ext ctrlr data: ctrattr 0x%x\n",
|
||||
SPDK_DEBUGLOG(nvmf, "ext ctrlr data: ctrattr 0x%x\n",
|
||||
*(uint8_t *)&cdata->nvmf_specific.ctrattr);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "ext ctrlr data: msdbd 0x%x\n",
|
||||
SPDK_DEBUGLOG(nvmf, "ext ctrlr data: msdbd 0x%x\n",
|
||||
cdata->nvmf_specific.msdbd);
|
||||
}
|
||||
|
||||
@ -2289,7 +2289,7 @@ nvmf_qpair_abort_aer(struct spdk_nvmf_qpair *qpair, uint16_t cid)
|
||||
|
||||
for (i = 0; i < ctrlr->nr_aer_reqs; i++) {
|
||||
if (ctrlr->aer_req[i]->cmd->nvme_cmd.cid == cid) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Aborting AER request\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Aborting AER request\n");
|
||||
req = ctrlr->aer_req[i];
|
||||
ctrlr->aer_req[i] = NULL;
|
||||
ctrlr->nr_aer_reqs--;
|
||||
@ -2318,7 +2318,7 @@ nvmf_qpair_abort_request(struct spdk_nvmf_qpair *qpair, struct spdk_nvmf_request
|
||||
uint16_t cid = req->cmd->nvme_cmd.cdw10_bits.abort.cid;
|
||||
|
||||
if (nvmf_qpair_abort_aer(qpair, cid)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "abort ctrlr=%p sqid=%u cid=%u successful\n",
|
||||
SPDK_DEBUGLOG(nvmf, "abort ctrlr=%p sqid=%u cid=%u successful\n",
|
||||
qpair->ctrlr, qpair->qid, cid);
|
||||
req->rsp->nvme_cpl.cdw0 &= ~1U; /* Command successfully aborted */
|
||||
|
||||
@ -2589,7 +2589,7 @@ nvmf_ctrlr_keep_alive(struct spdk_nvmf_request *req)
|
||||
{
|
||||
struct spdk_nvmf_ctrlr *ctrlr = req->qpair->ctrlr;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Keep Alive\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Keep Alive\n");
|
||||
/*
|
||||
* To handle keep alive just clear or reset the
|
||||
* ctrlr based keep alive duration counter.
|
||||
@ -2697,7 +2697,7 @@ nvmf_ctrlr_process_fabrics_cmd(struct spdk_nvmf_request *req)
|
||||
if (cap_hdr->fctype == SPDK_NVMF_FABRIC_COMMAND_CONNECT) {
|
||||
return nvmf_ctrlr_cmd_connect(req);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Got fctype 0x%x, expected Connect\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Got fctype 0x%x, expected Connect\n",
|
||||
cap_hdr->fctype);
|
||||
req->rsp->nvme_cpl.status.sct = SPDK_NVME_SCT_GENERIC;
|
||||
req->rsp->nvme_cpl.status.sc = SPDK_NVME_SC_COMMAND_SEQUENCE_ERROR;
|
||||
@ -2714,7 +2714,7 @@ nvmf_ctrlr_process_fabrics_cmd(struct spdk_nvmf_request *req)
|
||||
case SPDK_NVMF_FABRIC_COMMAND_PROPERTY_GET:
|
||||
return nvmf_property_get(req);
|
||||
default:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "unknown fctype 0x%02x\n",
|
||||
SPDK_DEBUGLOG(nvmf, "unknown fctype 0x%02x\n",
|
||||
cap_hdr->fctype);
|
||||
req->rsp->nvme_cpl.status.sct = SPDK_NVME_SCT_GENERIC;
|
||||
req->rsp->nvme_cpl.status.sc = SPDK_NVME_SC_INVALID_OPCODE;
|
||||
@ -2723,7 +2723,7 @@ nvmf_ctrlr_process_fabrics_cmd(struct spdk_nvmf_request *req)
|
||||
} else {
|
||||
/* Controller session is established, and this is an I/O queue */
|
||||
/* For now, no I/O-specific Fabrics commands are implemented (other than Connect) */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Unexpected I/O fctype 0x%x\n", cap_hdr->fctype);
|
||||
SPDK_DEBUGLOG(nvmf, "Unexpected I/O fctype 0x%x\n", cap_hdr->fctype);
|
||||
req->rsp->nvme_cpl.status.sct = SPDK_NVME_SCT_GENERIC;
|
||||
req->rsp->nvme_cpl.status.sc = SPDK_NVME_SC_INVALID_OPCODE;
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE;
|
||||
@ -3162,7 +3162,7 @@ nvmf_ctrlr_process_io_cmd(struct spdk_nvmf_request *req)
|
||||
ana_state = ctrlr->listener->ana_state;
|
||||
if (spdk_unlikely(ana_state != SPDK_NVME_ANA_OPTIMIZED_STATE &&
|
||||
ana_state != SPDK_NVME_ANA_NON_OPTIMIZED_STATE)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Fail I/O command due to ANA state %d\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Fail I/O command due to ANA state %d\n",
|
||||
ana_state);
|
||||
response->status.sct = SPDK_NVME_SCT_PATH;
|
||||
response->status.sc = _nvme_ana_state_to_path_status(ana_state);
|
||||
@ -3181,7 +3181,7 @@ nvmf_ctrlr_process_io_cmd(struct spdk_nvmf_request *req)
|
||||
assert(group != NULL && group->sgroups != NULL);
|
||||
ns_info = &group->sgroups[ctrlr->subsys->id].ns_info[nsid - 1];
|
||||
if (nvmf_ns_reservation_request_check(ns_info, ctrlr, req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Reservation Conflict for nsid %u, opcode %u\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Reservation Conflict for nsid %u, opcode %u\n",
|
||||
cmd->nsid, cmd->opc);
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ nvmf_subsystem_bdev_io_type_supported(struct spdk_nvmf_subsystem *subsystem,
|
||||
}
|
||||
|
||||
if (!spdk_bdev_io_type_supported(ns->bdev, io_type)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF,
|
||||
SPDK_DEBUGLOG(nvmf,
|
||||
"Subsystem %s namespace %u (%s) does not support io_type %d\n",
|
||||
spdk_nvmf_subsystem_get_nqn(subsystem),
|
||||
ns->opts.nsid, spdk_bdev_get_name(ns->bdev), (int)io_type);
|
||||
@ -70,7 +70,7 @@ nvmf_subsystem_bdev_io_type_supported(struct spdk_nvmf_subsystem *subsystem,
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "All devices in Subsystem %s support io_type %d\n",
|
||||
SPDK_DEBUGLOG(nvmf, "All devices in Subsystem %s support io_type %d\n",
|
||||
spdk_nvmf_subsystem_get_nqn(subsystem), (int)io_type);
|
||||
return true;
|
||||
}
|
||||
@ -172,7 +172,7 @@ nvmf_bdev_ctrlr_identify_ns(struct spdk_nvmf_ns *ns, struct spdk_nvme_ns_data *n
|
||||
nsdata->dps.pit = SPDK_NVME_FMT_NVM_PROTECTION_TYPE3;
|
||||
break;
|
||||
default:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Protection Disabled\n");
|
||||
SPDK_DEBUGLOG(nvmf, "Protection Disabled\n");
|
||||
nsdata->dps.pit = SPDK_NVME_FMT_NVM_PROTECTION_DISABLE;
|
||||
break;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ nvmf_generate_discovery_log(struct spdk_nvmf_tgt *tgt, const char *hostnqn, size
|
||||
size_t cur_size;
|
||||
uint32_t sid;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Generating log page for genctr %" PRIu64 "\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Generating log page for genctr %" PRIu64 "\n",
|
||||
tgt->discovery_genctr);
|
||||
|
||||
cur_size = sizeof(struct spdk_nvmf_discovery_log_page);
|
||||
|
@ -520,7 +520,7 @@ nvmf_fc_poll_group_remove_hwqp(struct spdk_nvmf_fc_hwqp *hwqp)
|
||||
{
|
||||
assert(hwqp);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC,
|
||||
SPDK_DEBUGLOG(nvmf_fc,
|
||||
"Remove hwqp from poller: for port: %d, hwqp: %d\n",
|
||||
hwqp->fc_port->port_hdl, hwqp->hwqp_id);
|
||||
|
||||
@ -566,7 +566,7 @@ nvmf_fc_queue_synced_cb(void *cb_data, enum spdk_nvmf_fc_poller_api_ret ret)
|
||||
ctx->hwqps_responded = 0;
|
||||
ctx->handled = false;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC,
|
||||
SPDK_DEBUGLOG(nvmf_fc,
|
||||
"QueueSync(0x%lx) completed for nport: %d, rpi: 0x%x, oxid: 0x%x, rxid: 0x%x\n",
|
||||
ctx->u_id, ctx->nport->nport_hdl, ctx->rpi, ctx->oxid, ctx->rxid);
|
||||
|
||||
@ -625,7 +625,7 @@ nvmf_fc_handle_abts_notfound(struct spdk_nvmf_fc_abts_ctx *ctx)
|
||||
poller_arg);
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC,
|
||||
SPDK_DEBUGLOG(nvmf_fc,
|
||||
"QueueSync(0x%lx) Sent for nport: %d, rpi: 0x%x, oxid: 0x%x, rxid: 0x%x\n",
|
||||
ctx->u_id, ctx->nport->nport_hdl, ctx->rpi, ctx->oxid, ctx->rxid);
|
||||
|
||||
@ -664,7 +664,7 @@ nvmf_fc_abts_handled_cb(void *cb_data, enum spdk_nvmf_fc_poller_api_ret ret)
|
||||
if (!ctx->handled) {
|
||||
/* Try syncing the queues and try one more time */
|
||||
if (!ctx->queue_synced && (nvmf_fc_handle_abts_notfound(ctx) == 0)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC,
|
||||
SPDK_DEBUGLOG(nvmf_fc,
|
||||
"QueueSync(0x%lx) for nport: %d, rpi: 0x%x, oxid: 0x%x, rxid: 0x%x\n",
|
||||
ctx->u_id, ctx->nport->nport_hdl, ctx->rpi, ctx->oxid, ctx->rxid);
|
||||
return;
|
||||
@ -1106,7 +1106,7 @@ nvmf_ctrlr_is_on_nport(uint8_t port_hdl, uint16_t nport_hdl,
|
||||
|
||||
assoc = nvmf_ctrlr_get_fc_assoc(ctrlr);
|
||||
if (assoc && assoc->tgtport == fc_nport) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC,
|
||||
SPDK_DEBUGLOG(nvmf_fc,
|
||||
"Controller: %d corresponding to association: %p(%lu:%d) is on port: %d nport: %d\n",
|
||||
ctrlr->cntlid, assoc, assoc->assoc_id, assoc->assoc_state, port_hdl,
|
||||
nport_hdl);
|
||||
@ -1254,7 +1254,7 @@ nvmf_fc_request_abort(struct spdk_nvmf_fc_request *fc_req, bool send_abts,
|
||||
nvmf_fc_issue_abort(fc_req->hwqp, fc_req->xchg, NULL, NULL);
|
||||
} else if (nvmf_fc_req_in_get_buff(fc_req)) {
|
||||
/* Will be completed by request_complete callback. */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC, "Abort req when getting buffers.\n");
|
||||
SPDK_DEBUGLOG(nvmf_fc, "Abort req when getting buffers.\n");
|
||||
} else if (nvmf_fc_req_in_pending(fc_req)) {
|
||||
/* Remove from pending */
|
||||
STAILQ_REMOVE(&fc_req->hwqp->fgroup->group.pending_buf_queue, &fc_req->req,
|
||||
@ -1310,7 +1310,7 @@ nvmf_fc_request_execute(struct spdk_nvmf_fc_request *fc_req)
|
||||
}
|
||||
|
||||
if (fc_req->req.xfer == SPDK_NVME_DATA_HOST_TO_CONTROLLER) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC, "WRITE CMD.\n");
|
||||
SPDK_DEBUGLOG(nvmf_fc, "WRITE CMD.\n");
|
||||
|
||||
nvmf_fc_request_set_state(fc_req, SPDK_NVMF_FC_REQ_WRITE_XFER);
|
||||
|
||||
@ -1320,7 +1320,7 @@ nvmf_fc_request_execute(struct spdk_nvmf_fc_request *fc_req)
|
||||
_nvmf_fc_request_free(fc_req);
|
||||
}
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC, "READ/NONE CMD\n");
|
||||
SPDK_DEBUGLOG(nvmf_fc, "READ/NONE CMD\n");
|
||||
|
||||
if (fc_req->req.xfer == SPDK_NVME_DATA_CONTROLLER_TO_HOST) {
|
||||
nvmf_fc_request_set_state(fc_req, SPDK_NVMF_FC_REQ_READ_BDEV);
|
||||
@ -1475,7 +1475,7 @@ nvmf_fc_request_set_state(struct spdk_nvmf_fc_request *fc_req,
|
||||
{
|
||||
assert(fc_req->magic != 0xDEADBEEF);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC,
|
||||
SPDK_DEBUGLOG(nvmf_fc,
|
||||
"FC Request(%p):\n\tState Old:%s New:%s\n", fc_req,
|
||||
nvmf_fc_request_get_state_str(fc_req->state),
|
||||
nvmf_fc_request_get_state_str(state));
|
||||
@ -1513,7 +1513,7 @@ nvmf_fc_hwqp_process_frame(struct spdk_nvmf_fc_hwqp *hwqp,
|
||||
* ox_id Since these are fields, we can't pass address to from_be16().
|
||||
* Since ox_id and rx_id are only needed for tracelog, assigning to local
|
||||
* vars. and doing conversion is a waste of time in non-debug builds. */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC,
|
||||
SPDK_DEBUGLOG(nvmf_fc,
|
||||
"Process NVME frame s_id:0x%x d_id:0x%x oxid:0x%x rxid:0x%x.\n",
|
||||
s_id, d_id,
|
||||
((frame->ox_id << 8) & 0xff00) | ((frame->ox_id >> 8) & 0xff),
|
||||
@ -1546,7 +1546,7 @@ nvmf_fc_hwqp_process_frame(struct spdk_nvmf_fc_hwqp *hwqp,
|
||||
struct spdk_nvmf_fc_rq_buf_ls_request *req_buf = buffer->virt;
|
||||
struct spdk_nvmf_fc_ls_rqst *ls_rqst;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC, "Process LS NVME frame\n");
|
||||
SPDK_DEBUGLOG(nvmf_fc, "Process LS NVME frame\n");
|
||||
|
||||
/* Use the RQ buffer for holding LS request. */
|
||||
ls_rqst = (struct spdk_nvmf_fc_ls_rqst *)&req_buf->ls_rqst;
|
||||
@ -1585,7 +1585,7 @@ nvmf_fc_hwqp_process_frame(struct spdk_nvmf_fc_hwqp *hwqp,
|
||||
} else if ((frame->r_ctl == FCNVME_R_CTL_CMD_REQ) &&
|
||||
(frame->type == FCNVME_TYPE_FC_EXCHANGE)) {
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC, "Process IO NVME frame\n");
|
||||
SPDK_DEBUGLOG(nvmf_fc, "Process IO NVME frame\n");
|
||||
rc = nvmf_fc_hwqp_handle_request(hwqp, frame, buff_idx, buffer, plen);
|
||||
} else {
|
||||
|
||||
@ -1706,11 +1706,11 @@ nvmf_fc_handle_rsp(struct spdk_nvmf_fc_request *fc_req)
|
||||
/* Fill transfer length */
|
||||
to_be32(&fc_req->ersp.transferred_data_len, fc_req->transfered_len);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC, "Posting ERSP.\n");
|
||||
SPDK_DEBUGLOG(nvmf_fc, "Posting ERSP.\n");
|
||||
rc = nvmf_fc_xmt_rsp(fc_req, (uint8_t *)&fc_req->ersp,
|
||||
sizeof(struct spdk_nvmf_fc_ersp_iu));
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC, "Posting RSP.\n");
|
||||
SPDK_DEBUGLOG(nvmf_fc, "Posting RSP.\n");
|
||||
rc = nvmf_fc_xmt_rsp(fc_req, NULL, 0);
|
||||
}
|
||||
|
||||
@ -1822,7 +1822,7 @@ nvmf_fc_create(struct spdk_nvmf_transport_opts *opts)
|
||||
{
|
||||
uint32_t sge_count;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_NVMF_FC, "*** FC Transport Init ***\n"
|
||||
SPDK_INFOLOG(nvmf_fc, "*** FC Transport Init ***\n"
|
||||
" Transport opts: max_ioq_depth=%d, max_io_size=%d,\n"
|
||||
" max_io_qpairs_per_ctrlr=%d, io_unit_size=%d,\n"
|
||||
" max_aq_depth=%d\n",
|
||||
@ -2380,7 +2380,7 @@ out:
|
||||
if (err != 0) {
|
||||
SPDK_ERRLOG("%s", log_str);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "%s", log_str);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "%s", log_str);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -2442,7 +2442,7 @@ out:
|
||||
if (err != 0) {
|
||||
SPDK_ERRLOG("%s", log_str);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "%s", log_str);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "%s", log_str);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2504,7 +2504,7 @@ nvmf_fc_adm_i_t_delete_assoc_cb(void *args, uint32_t err)
|
||||
if (err != 0) {
|
||||
SPDK_ERRLOG("%s", log_str);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "%s", log_str);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "%s", log_str);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2529,7 +2529,7 @@ nvmf_fc_adm_i_t_delete_assoc(struct spdk_nvmf_fc_nport *nport,
|
||||
uint32_t assoc_count = rport->assoc_count;
|
||||
char log_str[256];
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "IT delete associations on nport:%d begin.\n",
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "IT delete associations on nport:%d begin.\n",
|
||||
nport->nport_hdl);
|
||||
|
||||
/*
|
||||
@ -2588,7 +2588,7 @@ out:
|
||||
nport->nport_hdl, s_id, rpi, assoc_count, num_assoc, num_assoc_del_scheduled, err);
|
||||
|
||||
if (err == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "%s", log_str);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "%s", log_str);
|
||||
} else {
|
||||
SPDK_ERRLOG("%s", log_str);
|
||||
}
|
||||
@ -2614,7 +2614,7 @@ nvmf_fc_adm_queue_quiesce_cb(void *cb_data, enum spdk_nvmf_fc_poller_api_ret ret
|
||||
* Decrement the callback/quiesced queue count.
|
||||
*/
|
||||
port_quiesce_ctx->quiesce_count--;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "Queue%d Quiesced\n", quiesce_api_data->hwqp->hwqp_id);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "Queue%d Quiesced\n", quiesce_api_data->hwqp->hwqp_id);
|
||||
|
||||
free(quiesce_api_data);
|
||||
/*
|
||||
@ -2627,7 +2627,7 @@ nvmf_fc_adm_queue_quiesce_cb(void *cb_data, enum spdk_nvmf_fc_poller_api_ret ret
|
||||
if (fc_port->hw_port_status == SPDK_FC_PORT_QUIESCED) {
|
||||
SPDK_ERRLOG("Port %d already in quiesced state.\n", fc_port->port_hdl);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "HW port %d quiesced.\n", fc_port->port_hdl);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "HW port %d quiesced.\n", fc_port->port_hdl);
|
||||
fc_port->hw_port_status = SPDK_FC_PORT_QUIESCED;
|
||||
}
|
||||
|
||||
@ -2643,7 +2643,7 @@ nvmf_fc_adm_queue_quiesce_cb(void *cb_data, enum spdk_nvmf_fc_poller_api_ret ret
|
||||
*/
|
||||
free(port_quiesce_ctx);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "HW port %d quiesce done, rc = %d.\n", fc_port->port_hdl,
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "HW port %d quiesce done, rc = %d.\n", fc_port->port_hdl,
|
||||
err);
|
||||
}
|
||||
|
||||
@ -2668,7 +2668,7 @@ nvmf_fc_adm_hw_queue_quiesce(struct spdk_nvmf_fc_hwqp *fc_hwqp, void *ctx,
|
||||
args->cb_info.cb_data = args;
|
||||
args->cb_info.cb_thread = spdk_get_thread();
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "Quiesce queue %d\n", fc_hwqp->hwqp_id);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "Quiesce queue %d\n", fc_hwqp->hwqp_id);
|
||||
rc = nvmf_fc_poller_api_func(fc_hwqp, SPDK_NVMF_FC_POLLER_API_QUIESCE_QUEUE, args);
|
||||
if (rc) {
|
||||
free(args);
|
||||
@ -2690,7 +2690,7 @@ nvmf_fc_adm_hw_port_quiesce(struct spdk_nvmf_fc_port *fc_port, void *ctx,
|
||||
uint32_t i = 0;
|
||||
int err = 0;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "HW port:%d is being quiesced.\n", fc_port->port_hdl);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "HW port:%d is being quiesced.\n", fc_port->port_hdl);
|
||||
|
||||
/*
|
||||
* If the port is in an OFFLINE state, set the state to QUIESCED
|
||||
@ -2701,7 +2701,7 @@ nvmf_fc_adm_hw_port_quiesce(struct spdk_nvmf_fc_port *fc_port, void *ctx,
|
||||
}
|
||||
|
||||
if (fc_port->hw_port_status == SPDK_FC_PORT_QUIESCED) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "Port %d already in quiesced state.\n",
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "Port %d already in quiesced state.\n",
|
||||
fc_port->port_hdl);
|
||||
/*
|
||||
* Execute the callback function directly.
|
||||
@ -2833,7 +2833,7 @@ abort_port_init:
|
||||
|
||||
free(arg);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "HW port %d initialize done, rc = %d.\n",
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "HW port %d initialize done, rc = %d.\n",
|
||||
args->port_handle, err);
|
||||
}
|
||||
|
||||
@ -2885,7 +2885,7 @@ out:
|
||||
|
||||
free(arg);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "HW port %d online done, rc = %d.\n", args->port_handle,
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "HW port %d online done, rc = %d.\n", args->port_handle,
|
||||
err);
|
||||
}
|
||||
|
||||
@ -2940,7 +2940,7 @@ out:
|
||||
|
||||
free(arg);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "HW port %d offline done, rc = %d.\n", args->port_handle,
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "HW port %d offline done, rc = %d.\n", args->port_handle,
|
||||
err);
|
||||
}
|
||||
|
||||
@ -3169,7 +3169,7 @@ out:
|
||||
if (err != 0) {
|
||||
SPDK_ERRLOG("%s", log_str);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "%s", log_str);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "%s", log_str);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3299,7 +3299,7 @@ out:
|
||||
}
|
||||
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API,
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api,
|
||||
"NPort %d delete done succesfully, fc port:%d. "
|
||||
"rport_cnt:%d\n",
|
||||
args->nport_handle, args->port_handle, rport_cnt);
|
||||
@ -3392,7 +3392,7 @@ out:
|
||||
|
||||
free(arg);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API,
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api,
|
||||
"IT add on nport %d done, rc = %d.\n",
|
||||
args->nport_handle, err);
|
||||
}
|
||||
@ -3415,7 +3415,7 @@ nvmf_fc_adm_evnt_i_t_delete(void *arg)
|
||||
uint32_t num_rport = 0;
|
||||
char log_str[256];
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "IT delete on nport:%d begin.\n", args->nport_handle);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "IT delete on nport:%d begin.\n", args->nport_handle);
|
||||
|
||||
/*
|
||||
* Make sure the nport port exists. If it does not, error out.
|
||||
@ -3521,7 +3521,7 @@ out:
|
||||
if (rc != 0) {
|
||||
SPDK_ERRLOG("%s", log_str);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "%s", log_str);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "%s", log_str);
|
||||
}
|
||||
|
||||
free(arg);
|
||||
@ -3539,7 +3539,7 @@ nvmf_fc_adm_evnt_abts_recv(void *arg)
|
||||
struct spdk_nvmf_fc_nport *nport = NULL;
|
||||
int err = 0;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "FC ABTS received. RPI:%d, oxid:%d, rxid:%d\n", args->rpi,
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "FC ABTS received. RPI:%d, oxid:%d, rxid:%d\n", args->rpi,
|
||||
args->oxid, args->rxid);
|
||||
|
||||
/*
|
||||
@ -3556,7 +3556,7 @@ nvmf_fc_adm_evnt_abts_recv(void *arg)
|
||||
* 2. If the nport is in the process of being deleted, drop the ABTS.
|
||||
*/
|
||||
if (nport->nport_state == SPDK_NVMF_FC_OBJECT_TO_BE_DELETED) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API,
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api,
|
||||
"FC ABTS dropped because the nport is being deleted; RPI:%d, oxid:%d, rxid:%d\n",
|
||||
args->rpi, args->oxid, args->rxid);
|
||||
err = 0;
|
||||
@ -3655,7 +3655,7 @@ nvmf_fc_adm_hw_port_quiesce_reset_cb(void *ctx, int err)
|
||||
fc_port->num_io_queues, &dump_info);
|
||||
|
||||
out:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "HW port %d reset done, queues_dumped = %d, rc = %d.\n",
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "HW port %d reset done, queues_dumped = %d, rc = %d.\n",
|
||||
args->port_handle, args->dump_queues, err);
|
||||
|
||||
if (cb_func != NULL) {
|
||||
@ -3678,7 +3678,7 @@ nvmf_fc_adm_evnt_hw_port_reset(void *arg)
|
||||
struct spdk_nvmf_fc_adm_hw_port_reset_ctx *ctx = NULL;
|
||||
int err = 0;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "HW port %d dump\n", args->port_handle);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "HW port %d dump\n", args->port_handle);
|
||||
|
||||
/*
|
||||
* Make sure the physical port exists.
|
||||
@ -3721,7 +3721,7 @@ fail:
|
||||
free(ctx);
|
||||
|
||||
out:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "HW port %d dump done, rc = %d.\n", args->port_handle,
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "HW port %d dump done, rc = %d.\n", args->port_handle,
|
||||
err);
|
||||
|
||||
if (api_data->cb_func != NULL) {
|
||||
@ -3821,7 +3821,7 @@ out:
|
||||
if (err != 0) {
|
||||
SPDK_ERRLOG("%s", log_str);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "%s", log_str);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "%s", log_str);
|
||||
}
|
||||
|
||||
if ((api_data->cb_func != NULL) && (nport_deletes_sent == 0)) {
|
||||
@ -3856,7 +3856,7 @@ nvmf_fc_master_enqueue_event(enum spdk_fc_event event_type, void *args,
|
||||
struct spdk_nvmf_fc_adm_api_data *api_data = NULL;
|
||||
spdk_msg_fn event_fn = NULL;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "Enqueue event %d.\n", event_type);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "Enqueue event %d.\n", event_type);
|
||||
|
||||
if (event_type >= SPDK_FC_EVENT_MAX) {
|
||||
SPDK_ERRLOG("Invalid spdk_fc_event_t %d.\n", event_type);
|
||||
@ -3934,7 +3934,7 @@ done:
|
||||
if (err == 0) {
|
||||
assert(event_fn != NULL);
|
||||
nvmf_fc_adm_run_on_master_thread(event_fn, (void *)api_data);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_ADM_API, "Enqueue event %d done successfully\n", event_type);
|
||||
SPDK_DEBUGLOG(nvmf_fc_adm_api, "Enqueue event %d done successfully\n", event_type);
|
||||
} else {
|
||||
SPDK_ERRLOG("Enqueue event %d failed, err = %d\n", event_type, err);
|
||||
if (api_data) {
|
||||
@ -3946,5 +3946,5 @@ done:
|
||||
}
|
||||
|
||||
SPDK_NVMF_TRANSPORT_REGISTER(fc, &spdk_nvmf_transport_fc);
|
||||
SPDK_LOG_REGISTER_COMPONENT("nvmf_fc_adm_api", SPDK_LOG_NVMF_FC_ADM_API)
|
||||
SPDK_LOG_REGISTER_COMPONENT("nvmf_fc", SPDK_LOG_NVMF_FC)
|
||||
SPDK_LOG_REGISTER_COMPONENT(nvmf_fc_adm_api)
|
||||
SPDK_LOG_REGISTER_COMPONENT(nvmf_fc)
|
||||
|
@ -216,7 +216,7 @@ nvmf_fc_ls_alloc_connections(struct spdk_nvmf_fc_association *assoc,
|
||||
uint32_t i;
|
||||
struct spdk_nvmf_fc_conn *fc_conn;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS, "Pre-alloc %d qpairs for host NQN %s\n",
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls, "Pre-alloc %d qpairs for host NQN %s\n",
|
||||
nvmf_transport->opts.max_qpairs_per_ctrlr, assoc->host_nqn);
|
||||
|
||||
/* allocate memory for all connections at once */
|
||||
@ -251,7 +251,7 @@ nvmf_fc_ls_new_association(uint32_t s_id,
|
||||
struct spdk_nvmf_fc_association *assoc;
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS,
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls,
|
||||
"New Association request for port %d nport %d rpi 0x%x\n",
|
||||
tgtport->fc_port->port_hdl, tgtport->nport_hdl, rpi);
|
||||
|
||||
@ -417,7 +417,7 @@ nvmf_fc_ls_rsp_fail_del_conn_cb(void *cb_data, enum spdk_nvmf_fc_poller_api_ret
|
||||
struct spdk_nvmf_fc_association *assoc = dp->assoc;
|
||||
struct spdk_nvmf_fc_conn *fc_conn = dp->args.fc_conn;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS, "Delete Connection callback "
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls, "Delete Connection callback "
|
||||
"for assoc_id 0x%lx conn_id 0x%lx\n", assoc->assoc_id,
|
||||
fc_conn->conn_id);
|
||||
|
||||
@ -442,7 +442,7 @@ nvmf_fc_handle_xmt_ls_rsp_failure(struct spdk_nvmf_fc_association *assoc,
|
||||
struct spdk_nvmf_fc_ls_del_conn_api_data *api_data;
|
||||
struct nvmf_fc_ls_op_ctx *opd = NULL;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS, "Transmit LS response failure "
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls, "Transmit LS response failure "
|
||||
"for assoc_id 0x%lx conn_id 0x%lx\n", assoc->assoc_id,
|
||||
fc_conn->conn_id);
|
||||
|
||||
@ -482,7 +482,7 @@ nvmf_fc_ls_add_conn_cb(void *cb_data, enum spdk_nvmf_fc_poller_api_ret ret)
|
||||
struct spdk_nvmf_fc_conn *fc_conn = dp->args.fc_conn;
|
||||
struct spdk_nvmf_fc_ls_rqst *ls_rqst = dp->ls_rqst;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS,
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls,
|
||||
"add_conn_cb: assoc_id = 0x%lx, conn_id = 0x%lx\n",
|
||||
assoc->assoc_id, fc_conn->conn_id);
|
||||
|
||||
@ -514,7 +514,7 @@ nvmf_fc_ls_add_conn_cb(void *cb_data, enum spdk_nvmf_fc_poller_api_ret ret)
|
||||
nvmf_fc_handle_xmt_ls_rsp_failure(assoc, fc_conn,
|
||||
dp->aq_conn);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS,
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls,
|
||||
"LS response (conn_id 0x%lx) sent\n", fc_conn->conn_id);
|
||||
}
|
||||
|
||||
@ -566,7 +566,7 @@ nvmf_fc_ls_add_conn_to_poller(
|
||||
struct nvmf_fc_ls_op_ctx *opd;
|
||||
struct spdk_nvmf_fc_ls_add_conn_api_data *api_data;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS, "Add Connection to poller for "
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls, "Add Connection to poller for "
|
||||
"assoc_id 0x%lx conn_id 0x%lx\n", assoc->assoc_id,
|
||||
fc_conn->conn_id);
|
||||
|
||||
@ -589,7 +589,7 @@ nvmf_fc_ls_add_conn_to_poller(
|
||||
api_data->ls_rqst = ls_rqst;
|
||||
api_data->aq_conn = aq_conn;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS,
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls,
|
||||
"New QP callback called.\n");
|
||||
|
||||
/* Let the nvmf_tgt decide which pollgroup to use. */
|
||||
@ -608,7 +608,7 @@ nvmf_fc_do_del_assoc_cbs(struct nvmf_fc_ls_op_ctx *opd, int ret)
|
||||
while (opd) {
|
||||
dp = &opd->u.del_assoc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS, "performing delete assoc. callback\n");
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls, "performing delete assoc. callback\n");
|
||||
dp->del_assoc_cb(dp->del_assoc_cb_data, ret);
|
||||
|
||||
nxt = opd->next_op_ctx;
|
||||
@ -621,7 +621,7 @@ static void
|
||||
nvmf_fs_send_ls_disconnect_cb(void *hwqp, int32_t status, void *args)
|
||||
{
|
||||
if (args) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS, "free disconnect buffers\n");
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls, "free disconnect buffers\n");
|
||||
nvmf_fc_free_srsr_bufs((struct spdk_nvmf_fc_srsr_bufs *)args);
|
||||
}
|
||||
}
|
||||
@ -639,7 +639,7 @@ nvmf_fc_del_all_conns_cb(void *cb_data, enum spdk_nvmf_fc_poller_api_ret ret)
|
||||
* done anyway if there is an error because we need to complete
|
||||
* all connection deletes and callback to caller */
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS,
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls,
|
||||
"Delete all connections for assoc_id 0x%lx, conn_id = %lx\n",
|
||||
assoc->assoc_id, fc_conn->conn_id);
|
||||
|
||||
@ -651,7 +651,7 @@ nvmf_fc_del_all_conns_cb(void *cb_data, enum spdk_nvmf_fc_poller_api_ret ret)
|
||||
/* last connection - remove association from target port's association list */
|
||||
struct nvmf_fc_ls_op_ctx *cb_opd = (struct nvmf_fc_ls_op_ctx *)assoc->ls_del_op_ctx;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS,
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls,
|
||||
"remove assoc. %lx\n", assoc->assoc_id);
|
||||
nvmf_fc_del_assoc_from_tgt_port(assoc);
|
||||
|
||||
@ -688,7 +688,7 @@ nvmf_fc_del_all_conns_cb(void *cb_data, enum spdk_nvmf_fc_poller_api_ret ret)
|
||||
srsr_bufs = assoc->snd_disconn_bufs;
|
||||
assoc->snd_disconn_bufs = NULL;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS, "Send LS disconnect\n");
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls, "Send LS disconnect\n");
|
||||
if (nvmf_fc_xmt_srsr_req(&assoc->tgtport->fc_port->ls_queue,
|
||||
srsr_bufs, nvmf_fs_send_ls_disconnect_cb,
|
||||
(void *)srsr_bufs)) {
|
||||
@ -712,7 +712,7 @@ nvmf_fc_kill_io_del_all_conns_cb(void *cb_data, enum spdk_nvmf_fc_poller_api_ret
|
||||
{
|
||||
struct nvmf_fc_ls_op_ctx *opd = (struct nvmf_fc_ls_op_ctx *)cb_data;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS, "Callback after killing outstanding ABTS.");
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls, "Callback after killing outstanding ABTS.");
|
||||
/*
|
||||
* NOTE: We should not access any connection or association related data
|
||||
* structures here.
|
||||
@ -738,7 +738,7 @@ _nvmf_fc_delete_association(struct spdk_nvmf_fc_nport *tgtport,
|
||||
struct spdk_nvmf_fc_port *fc_port = tgtport->fc_port;
|
||||
enum spdk_nvmf_fc_object_state assoc_state;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS, "Delete association, "
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls, "Delete association, "
|
||||
"assoc_id 0x%lx\n", assoc_id);
|
||||
|
||||
if (!assoc) {
|
||||
@ -810,7 +810,7 @@ _nvmf_fc_delete_association(struct spdk_nvmf_fc_nport *tgtport,
|
||||
api_data->args.cb_info.cb_func = nvmf_fc_del_all_conns_cb;
|
||||
}
|
||||
api_data->args.cb_info.cb_data = opd;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS,
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls,
|
||||
"conn_id = %lx\n", fc_conn->conn_id);
|
||||
|
||||
if (!opd_head) {
|
||||
@ -842,7 +842,7 @@ nvmf_fc_ls_disconnect_assoc_cb(void *cb_data, uint32_t err)
|
||||
struct spdk_nvmf_fc_nport *tgtport = dp->tgtport;
|
||||
struct spdk_nvmf_fc_ls_rqst *ls_rqst = dp->ls_rqst;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS, "Disconnect association callback begin "
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls, "Disconnect association callback begin "
|
||||
"nport %d\n", tgtport->nport_hdl);
|
||||
if (err != 0) {
|
||||
/* send failure response */
|
||||
@ -861,7 +861,7 @@ nvmf_fc_ls_disconnect_assoc_cb(void *cb_data, uint32_t err)
|
||||
nvmf_fc_xmt_ls_rsp(tgtport, ls_rqst);
|
||||
|
||||
free(opd);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS, "Disconnect association callback complete "
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls, "Disconnect association callback complete "
|
||||
"nport %d err %d\n", tgtport->nport_hdl, err);
|
||||
}
|
||||
|
||||
@ -952,7 +952,7 @@ nvmf_fc_ls_process_cass(uint32_t s_id,
|
||||
struct spdk_nvmf_transport *transport = spdk_nvmf_tgt_get_transport(ls_rqst->nvmf_tgt,
|
||||
SPDK_NVME_TRANSPORT_NAME_FC);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS,
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls,
|
||||
"LS_CASS: ls_rqst_len=%d, desc_list_len=%d, cmd_len=%d, sq_size=%d, "
|
||||
"Subnqn: %s, Hostnqn: %s, Tgtport nn:%lx, pn:%lx\n",
|
||||
ls_rqst->rqst_len, from_be32(&rqst->desc_list_len),
|
||||
@ -1087,7 +1087,7 @@ nvmf_fc_ls_process_cioc(struct spdk_nvmf_fc_nport *tgtport,
|
||||
struct spdk_nvmf_transport *transport = spdk_nvmf_tgt_get_transport(ls_rqst->nvmf_tgt,
|
||||
SPDK_NVME_TRANSPORT_NAME_FC);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS,
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls,
|
||||
"LS_CIOC: ls_rqst_len=%d, desc_list_len=%d, cmd_len=%d, "
|
||||
"assoc_id=0x%lx, sq_size=%d, esrp=%d, Tgtport nn:%lx, pn:%lx\n",
|
||||
ls_rqst->rqst_len, from_be32(&rqst->desc_list_len),
|
||||
@ -1175,7 +1175,7 @@ nvmf_fc_ls_process_cioc(struct spdk_nvmf_fc_nport *tgtport,
|
||||
}
|
||||
|
||||
/* format accept response */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS, "Formatting LS accept response for "
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls, "Formatting LS accept response for "
|
||||
"assoc_id 0x%lx conn_id 0x%lx\n", assoc->assoc_id,
|
||||
fc_conn->conn_id);
|
||||
bzero(acc, sizeof(*acc));
|
||||
@ -1214,7 +1214,7 @@ nvmf_fc_ls_process_disc(struct spdk_nvmf_fc_nport *tgtport,
|
||||
uint8_t rc = FCNVME_RJT_RC_NONE;
|
||||
uint8_t ec = FCNVME_RJT_EXP_NONE;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS,
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls,
|
||||
"LS_DISC: ls_rqst_len=%d, desc_list_len=%d, cmd_len=%d,"
|
||||
"assoc_id=0x%lx\n",
|
||||
ls_rqst->rqst_len, from_be32(&rqst->desc_list_len),
|
||||
@ -1303,7 +1303,7 @@ nvmf_fc_handle_ls_rqst(struct spdk_nvmf_fc_ls_rqst *ls_rqst)
|
||||
uint32_t s_id = ls_rqst->s_id;
|
||||
struct spdk_nvmf_fc_nport *tgtport = ls_rqst->nport;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_LS, "LS cmd=%d\n", w0->ls_cmd);
|
||||
SPDK_DEBUGLOG(nvmf_fc_ls, "LS cmd=%d\n", w0->ls_cmd);
|
||||
|
||||
switch (w0->ls_cmd) {
|
||||
case FCNVME_LS_CREATE_ASSOCIATION:
|
||||
@ -1364,7 +1364,7 @@ nvmf_fc_poller_api_add_connection(void *arg)
|
||||
(struct spdk_nvmf_fc_poller_api_add_connection_args *)arg;
|
||||
struct spdk_nvmf_fc_conn *fc_conn;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_POLLER_API, "Poller add connection, conn_id 0x%lx\n",
|
||||
SPDK_DEBUGLOG(nvmf_fc_poller_api, "Poller add connection, conn_id 0x%lx\n",
|
||||
conn_args->fc_conn->conn_id);
|
||||
|
||||
/* make sure connection is not already in poller's list */
|
||||
@ -1374,7 +1374,7 @@ nvmf_fc_poller_api_add_connection(void *arg)
|
||||
SPDK_ERRLOG("duplicate connection found");
|
||||
ret = SPDK_NVMF_FC_POLLER_API_DUP_CONN_ID;
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_POLLER_API,
|
||||
SPDK_DEBUGLOG(nvmf_fc_poller_api,
|
||||
"conn_id=%lx", fc_conn->conn_id);
|
||||
TAILQ_INSERT_TAIL(&conn_args->fc_conn->hwqp->connection_list,
|
||||
conn_args->fc_conn, link);
|
||||
@ -1445,7 +1445,7 @@ nvmf_fc_poller_conn_abort_done(void *hwqp, int32_t status, void *cb_args)
|
||||
/* All the requests for this connection are aborted. */
|
||||
TAILQ_REMOVE(&conn_args->hwqp->connection_list, conn_args->fc_conn, link);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_POLLER_API, "Connection deleted, conn_id 0x%lx\n",
|
||||
SPDK_DEBUGLOG(nvmf_fc_poller_api, "Connection deleted, conn_id 0x%lx\n",
|
||||
conn_args->fc_conn->conn_id);
|
||||
|
||||
if (!conn_args->backend_initiated) {
|
||||
@ -1459,7 +1459,7 @@ nvmf_fc_poller_conn_abort_done(void *hwqp, int32_t status, void *cb_args)
|
||||
* coming in via an association disconnect and the other
|
||||
* is initiated by a port reset.
|
||||
*/
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_POLLER_API, "Duplicate conn delete.");
|
||||
SPDK_DEBUGLOG(nvmf_fc_poller_api, "Duplicate conn delete.");
|
||||
/* perform callback */
|
||||
nvmf_fc_poller_api_perform_cb(&conn_args->cb_info, SPDK_NVMF_FC_POLLER_API_SUCCESS);
|
||||
}
|
||||
@ -1475,7 +1475,7 @@ nvmf_fc_poller_api_del_connection(void *arg)
|
||||
struct spdk_nvmf_fc_request *fc_req = NULL, *tmp;
|
||||
struct spdk_nvmf_fc_hwqp *hwqp = conn_args->hwqp;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_POLLER_API, "Poller delete connection, conn_id 0x%lx\n",
|
||||
SPDK_DEBUGLOG(nvmf_fc_poller_api, "Poller delete connection, conn_id 0x%lx\n",
|
||||
conn_args->fc_conn->conn_id);
|
||||
|
||||
/* find the connection in poller's list */
|
||||
@ -1504,7 +1504,7 @@ nvmf_fc_poller_api_del_connection(void *arg)
|
||||
}
|
||||
|
||||
if (!conn_args->fc_request_cnt) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_POLLER_API, "Connection deleted.\n");
|
||||
SPDK_DEBUGLOG(nvmf_fc_poller_api, "Connection deleted.\n");
|
||||
TAILQ_REMOVE(&hwqp->connection_list, fc_conn, link);
|
||||
|
||||
if (!conn_args->backend_initiated) {
|
||||
@ -1520,7 +1520,7 @@ nvmf_fc_poller_abts_done(void *hwqp, int32_t status, void *cb_args)
|
||||
{
|
||||
struct spdk_nvmf_fc_poller_api_abts_recvd_args *args = cb_args;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_POLLER_API,
|
||||
SPDK_DEBUGLOG(nvmf_fc_poller_api,
|
||||
"ABTS poller done, rpi: 0x%x, oxid: 0x%x, rxid: 0x%x\n",
|
||||
args->ctx->rpi, args->ctx->oxid, args->ctx->rxid);
|
||||
|
||||
@ -1553,7 +1553,7 @@ nvmf_fc_poller_api_queue_sync(void *arg)
|
||||
{
|
||||
struct spdk_nvmf_fc_poller_api_queue_sync_args *args = arg;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_POLLER_API,
|
||||
SPDK_DEBUGLOG(nvmf_fc_poller_api,
|
||||
"HWQP sync requested for u_id = 0x%lx\n", args->u_id);
|
||||
|
||||
/* Add this args to hwqp sync_cb list */
|
||||
@ -1575,7 +1575,7 @@ nvmf_fc_poller_api_queue_sync_done(void *arg)
|
||||
/* Queue successfully synced. Remove from cb list */
|
||||
TAILQ_REMOVE(&hwqp->sync_cbs, sync_args, link);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_FC_POLLER_API,
|
||||
SPDK_DEBUGLOG(nvmf_fc_poller_api,
|
||||
"HWQP sync done for u_id = 0x%lx\n", sync_args->u_id);
|
||||
|
||||
/* Return the status to poller */
|
||||
@ -1675,5 +1675,5 @@ nvmf_fc_poller_api_func(struct spdk_nvmf_fc_hwqp *hwqp, enum spdk_nvmf_fc_poller
|
||||
return SPDK_NVMF_FC_POLLER_API_SUCCESS;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("nvmf_fc_poller_api", SPDK_LOG_NVMF_FC_POLLER_API)
|
||||
SPDK_LOG_REGISTER_COMPONENT("nvmf_fc_ls", SPDK_LOG_NVMF_FC_LS)
|
||||
SPDK_LOG_REGISTER_COMPONENT(nvmf_fc_poller_api)
|
||||
SPDK_LOG_REGISTER_COMPONENT(nvmf_fc_ls)
|
||||
|
@ -47,7 +47,7 @@
|
||||
#include "nvmf_internal.h"
|
||||
#include "transport.h"
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("nvmf", SPDK_LOG_NVMF)
|
||||
SPDK_LOG_REGISTER_COMPONENT(nvmf)
|
||||
|
||||
#define SPDK_NVMF_DEFAULT_MAX_SUBSYSTEMS 1024
|
||||
#define SPDK_NVMF_DEFAULT_ACCEPT_POLL_RATE_US 10000
|
||||
@ -1195,7 +1195,7 @@ poll_group_update_subsystem(struct spdk_nvmf_poll_group *group,
|
||||
ns_info->channel = ch;
|
||||
} else if (ns_info->num_blocks != spdk_bdev_get_num_blocks(ns->bdev)) {
|
||||
/* Namespace is still there but size has changed */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Namespace resized: subsystem_id %d,"
|
||||
SPDK_DEBUGLOG(nvmf, "Namespace resized: subsystem_id %d,"
|
||||
" nsid %u, pg %p, old %lu, new %lu\n",
|
||||
subsystem->id,
|
||||
ns->nsid,
|
||||
|
@ -702,14 +702,14 @@ nvmf_rdma_resources_create(struct spdk_nvmf_rdma_resource_opts *opts)
|
||||
!resources->bufs_mr)) {
|
||||
goto cleanup;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Command Array: %p Length: %lx LKey: %x\n",
|
||||
SPDK_DEBUGLOG(rdma, "Command Array: %p Length: %lx LKey: %x\n",
|
||||
resources->cmds, opts->max_queue_depth * sizeof(*resources->cmds),
|
||||
resources->cmds_mr->lkey);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Completion Array: %p Length: %lx LKey: %x\n",
|
||||
SPDK_DEBUGLOG(rdma, "Completion Array: %p Length: %lx LKey: %x\n",
|
||||
resources->cpls, opts->max_queue_depth * sizeof(*resources->cpls),
|
||||
resources->cpls_mr->lkey);
|
||||
if (resources->bufs && resources->bufs_mr) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "In Capsule Data Array: %p Length: %x LKey: %x\n",
|
||||
SPDK_DEBUGLOG(rdma, "In Capsule Data Array: %p Length: %x LKey: %x\n",
|
||||
resources->bufs, opts->max_queue_depth *
|
||||
opts->in_capsule_data_size, resources->bufs_mr->lkey);
|
||||
}
|
||||
@ -839,7 +839,7 @@ nvmf_rdma_qpair_destroy(struct spdk_nvmf_rdma_qpair *rqpair)
|
||||
max_req_count = rqpair->poller->max_srq_depth;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Release incomplete requests\n");
|
||||
SPDK_DEBUGLOG(rdma, "Release incomplete requests\n");
|
||||
for (i = 0; i < max_req_count; i++) {
|
||||
req = &rqpair->resources->reqs[i];
|
||||
if (req->req.qpair == qpair && req->state != RDMA_REQUEST_STATE_FREE) {
|
||||
@ -916,7 +916,7 @@ nvmf_rdma_resize_cq(struct spdk_nvmf_rdma_qpair *rqpair, struct spdk_nvmf_rdma_d
|
||||
return -1;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Resize RDMA CQ from %d to %d\n", rpoller->num_cqe, num_cqe);
|
||||
SPDK_DEBUGLOG(rdma, "Resize RDMA CQ from %d to %d\n", rpoller->num_cqe, num_cqe);
|
||||
rc = ibv_resize_cq(rpoller->cq, num_cqe);
|
||||
if (rc) {
|
||||
SPDK_ERRLOG("RDMA CQ resize failed: errno %d: %s\n", errno, spdk_strerror(errno));
|
||||
@ -974,7 +974,7 @@ nvmf_rdma_qpair_initialize(struct spdk_nvmf_qpair *qpair)
|
||||
rqpair->max_send_sge = spdk_min(NVMF_DEFAULT_TX_SGE, qp_init_attr.cap.max_send_sge);
|
||||
rqpair->max_recv_sge = spdk_min(NVMF_DEFAULT_RX_SGE, qp_init_attr.cap.max_recv_sge);
|
||||
spdk_trace_record(TRACE_RDMA_QP_CREATE, 0, 0, (uintptr_t)rqpair->cm_id, 0);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "New RDMA Connection: %p\n", qpair);
|
||||
SPDK_DEBUGLOG(rdma, "New RDMA Connection: %p\n", qpair);
|
||||
|
||||
if (rqpair->poller->srq == NULL) {
|
||||
rtransport = SPDK_CONTAINEROF(qpair->transport, struct spdk_nvmf_rdma_transport, transport);
|
||||
@ -1154,7 +1154,7 @@ nvmf_rdma_event_accept(struct rdma_cm_id *id, struct spdk_nvmf_rdma_qpair *rqpai
|
||||
if (rc) {
|
||||
SPDK_ERRLOG("Error %d on spdk_rdma_qp_accept\n", errno);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Sent back the accept\n");
|
||||
SPDK_DEBUGLOG(rdma, "Sent back the accept\n");
|
||||
}
|
||||
|
||||
return rc;
|
||||
@ -1202,34 +1202,34 @@ nvmf_rdma_connect(struct spdk_nvmf_transport *transport, struct rdma_cm_event *e
|
||||
return -1;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Connect Recv on fabric intf name %s, dev_name %s\n",
|
||||
SPDK_DEBUGLOG(rdma, "Connect Recv on fabric intf name %s, dev_name %s\n",
|
||||
event->id->verbs->device->name, event->id->verbs->device->dev_name);
|
||||
|
||||
port = event->listen_id->context;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Listen Id was %p with verbs %p. ListenAddr: %p\n",
|
||||
SPDK_DEBUGLOG(rdma, "Listen Id was %p with verbs %p. ListenAddr: %p\n",
|
||||
event->listen_id, event->listen_id->verbs, port);
|
||||
|
||||
/* Figure out the supported queue depth. This is a multi-step process
|
||||
* that takes into account hardware maximums, host provided values,
|
||||
* and our target's internal memory limits */
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Calculating Queue Depth\n");
|
||||
SPDK_DEBUGLOG(rdma, "Calculating Queue Depth\n");
|
||||
|
||||
/* Start with the maximum queue depth allowed by the target */
|
||||
max_queue_depth = rtransport->transport.opts.max_queue_depth;
|
||||
max_read_depth = rtransport->transport.opts.max_queue_depth;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Target Max Queue Depth: %d\n",
|
||||
SPDK_DEBUGLOG(rdma, "Target Max Queue Depth: %d\n",
|
||||
rtransport->transport.opts.max_queue_depth);
|
||||
|
||||
/* Next check the local NIC's hardware limitations */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA,
|
||||
SPDK_DEBUGLOG(rdma,
|
||||
"Local NIC Max Send/Recv Queue Depth: %d Max Read/Write Queue Depth: %d\n",
|
||||
port->device->attr.max_qp_wr, port->device->attr.max_qp_rd_atom);
|
||||
max_queue_depth = spdk_min(max_queue_depth, port->device->attr.max_qp_wr);
|
||||
max_read_depth = spdk_min(max_read_depth, port->device->attr.max_qp_init_rd_atom);
|
||||
|
||||
/* Next check the remote NIC's hardware limitations */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA,
|
||||
SPDK_DEBUGLOG(rdma,
|
||||
"Host (Initiator) NIC Max Incoming RDMA R/W operations: %d Max Outgoing RDMA R/W operations: %d\n",
|
||||
rdma_param->initiator_depth, rdma_param->responder_resources);
|
||||
if (rdma_param->initiator_depth > 0) {
|
||||
@ -1240,13 +1240,13 @@ nvmf_rdma_connect(struct spdk_nvmf_transport *transport, struct rdma_cm_event *e
|
||||
* optional. */
|
||||
if (rdma_param->private_data != NULL &&
|
||||
rdma_param->private_data_len >= sizeof(struct spdk_nvmf_rdma_request_private_data)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Host Receive Queue Size: %d\n", private_data->hrqsize);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Host Send Queue Size: %d\n", private_data->hsqsize);
|
||||
SPDK_DEBUGLOG(rdma, "Host Receive Queue Size: %d\n", private_data->hrqsize);
|
||||
SPDK_DEBUGLOG(rdma, "Host Send Queue Size: %d\n", private_data->hsqsize);
|
||||
max_queue_depth = spdk_min(max_queue_depth, private_data->hrqsize);
|
||||
max_queue_depth = spdk_min(max_queue_depth, private_data->hsqsize + 1);
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Final Negotiated Queue Depth: %d R/W Depth: %d\n",
|
||||
SPDK_DEBUGLOG(rdma, "Final Negotiated Queue Depth: %d R/W Depth: %d\n",
|
||||
max_queue_depth, max_read_depth);
|
||||
|
||||
rqpair = calloc(1, sizeof(struct spdk_nvmf_rdma_qpair));
|
||||
@ -1804,14 +1804,14 @@ nvmf_rdma_request_parse_sgl(struct spdk_nvmf_rdma_transport *rtransport,
|
||||
return -1;
|
||||
}
|
||||
/* No available buffers. Queue this request up. */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "No available large data buffers. Queueing request %p\n", rdma_req);
|
||||
SPDK_DEBUGLOG(rdma, "No available large data buffers. Queueing request %p\n", rdma_req);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* backward compatible */
|
||||
req->data = req->iov[0].iov_base;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Request %p took %d buffer/s from central pool\n", rdma_req,
|
||||
SPDK_DEBUGLOG(rdma, "Request %p took %d buffer/s from central pool\n", rdma_req,
|
||||
req->iovcnt);
|
||||
|
||||
return 0;
|
||||
@ -1820,7 +1820,7 @@ nvmf_rdma_request_parse_sgl(struct spdk_nvmf_rdma_transport *rtransport,
|
||||
uint64_t offset = sgl->address;
|
||||
uint32_t max_len = rtransport->transport.opts.in_capsule_data_size;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "In-capsule data: offset 0x%" PRIx64 ", length 0x%x\n",
|
||||
SPDK_DEBUGLOG(nvmf, "In-capsule data: offset 0x%" PRIx64 ", length 0x%x\n",
|
||||
offset, sgl->unkeyed.length);
|
||||
|
||||
if (offset > max_len) {
|
||||
@ -1853,7 +1853,7 @@ nvmf_rdma_request_parse_sgl(struct spdk_nvmf_rdma_transport *rtransport,
|
||||
|
||||
rc = nvmf_rdma_request_fill_iovs_multi_sgl(rtransport, device, rdma_req);
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "No available large data buffers. Queueing request %p\n", rdma_req);
|
||||
SPDK_DEBUGLOG(rdma, "No available large data buffers. Queueing request %p\n", rdma_req);
|
||||
return 0;
|
||||
} else if (rc == -EINVAL) {
|
||||
SPDK_ERRLOG("Multi SGL element request length exceeds the max I/O size\n");
|
||||
@ -1864,7 +1864,7 @@ nvmf_rdma_request_parse_sgl(struct spdk_nvmf_rdma_transport *rtransport,
|
||||
/* backward compatible */
|
||||
req->data = req->iov[0].iov_base;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Request %p took %d buffer/s from central pool\n", rdma_req,
|
||||
SPDK_DEBUGLOG(rdma, "Request %p took %d buffer/s from central pool\n", rdma_req,
|
||||
req->iovcnt);
|
||||
|
||||
return 0;
|
||||
@ -1940,7 +1940,7 @@ nvmf_rdma_request_process(struct spdk_nvmf_rdma_transport *rtransport,
|
||||
do {
|
||||
prev_state = rdma_req->state;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Request %p entering state %d\n", rdma_req, prev_state);
|
||||
SPDK_DEBUGLOG(rdma, "Request %p entering state %d\n", rdma_req, prev_state);
|
||||
|
||||
switch (rdma_req->state) {
|
||||
case RDMA_REQUEST_STATE_FREE:
|
||||
@ -1977,7 +1977,7 @@ nvmf_rdma_request_process(struct spdk_nvmf_rdma_transport *rtransport,
|
||||
rsp->status.sct = SPDK_NVME_SCT_GENERIC;
|
||||
rsp->status.sc = SPDK_NVME_SC_INVALID_OPCODE;
|
||||
rdma_req->state = RDMA_REQUEST_STATE_READY_TO_COMPLETE;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Request %p: invalid xfer type (BIDIRECTIONAL)\n", rdma_req);
|
||||
SPDK_DEBUGLOG(rdma, "Request %p: invalid xfer type (BIDIRECTIONAL)\n", rdma_req);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2286,7 +2286,7 @@ nvmf_rdma_create(struct spdk_nvmf_transport_opts *opts)
|
||||
|
||||
rtransport->transport.ops = &spdk_nvmf_transport_rdma;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_RDMA, "*** RDMA Transport Init ***\n"
|
||||
SPDK_INFOLOG(rdma, "*** RDMA Transport Init ***\n"
|
||||
" Transport opts: max_ioq_depth=%d, max_io_size=%d,\n"
|
||||
" max_io_qpairs_per_ctrlr=%d, io_unit_size=%d,\n"
|
||||
" in_capsule_data_size=%d, max_aq_depth=%d,\n"
|
||||
@ -2915,7 +2915,7 @@ nvmf_process_cm_event(struct spdk_nvmf_transport *transport)
|
||||
break;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Acceptor Event: %s\n", CM_EVENT_STR[event->event]);
|
||||
SPDK_DEBUGLOG(rdma, "Acceptor Event: %s\n", CM_EVENT_STR[event->event]);
|
||||
|
||||
spdk_trace_record(TRACE_RDMA_CM_ASYNC_EVENT, 0, 0, 0, event->event);
|
||||
|
||||
@ -3029,7 +3029,7 @@ nvmf_rdma_send_qpair_async_event(struct spdk_nvmf_rdma_qpair *rqpair,
|
||||
}
|
||||
|
||||
if (!thr) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "rqpair %p has no thread\n", rqpair);
|
||||
SPDK_DEBUGLOG(rdma, "rqpair %p has no thread\n", rqpair);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -3077,7 +3077,7 @@ nvmf_process_ib_event(struct spdk_nvmf_rdma_device *device)
|
||||
case IBV_EVENT_QP_LAST_WQE_REACHED:
|
||||
/* This event only occurs for shared receive queues. */
|
||||
rqpair = event.element.qp->qp_context;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Last WQE reached event received for rqpair %p\n", rqpair);
|
||||
SPDK_DEBUGLOG(rdma, "Last WQE reached event received for rqpair %p\n", rqpair);
|
||||
rc = nvmf_rdma_send_qpair_async_event(rqpair, nvmf_rdma_handle_last_wqe_reached);
|
||||
if (rc) {
|
||||
SPDK_WARNLOG("Failed to send LAST_WQE_REACHED event. rqpair %p, err %d\n", rqpair, rc);
|
||||
@ -3088,7 +3088,7 @@ nvmf_process_ib_event(struct spdk_nvmf_rdma_device *device)
|
||||
/* This event occurs frequently in both error and non-error states.
|
||||
* Check if the qpair is in an error state before sending a message. */
|
||||
rqpair = event.element.qp->qp_context;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Last sq drained event received for rqpair %p\n", rqpair);
|
||||
SPDK_DEBUGLOG(rdma, "Last sq drained event received for rqpair %p\n", rqpair);
|
||||
spdk_trace_record(TRACE_RDMA_IBV_ASYNC_EVENT, 0, 0,
|
||||
(uintptr_t)rqpair->cm_id, event.event_type);
|
||||
if (nvmf_rdma_update_ibv_state(rqpair) == IBV_QPS_ERR) {
|
||||
@ -3142,7 +3142,7 @@ nvmf_process_ib_events(struct spdk_nvmf_rdma_device *device, uint32_t max_events
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Device %s: %u events processed\n", device->context->device->name, i);
|
||||
SPDK_DEBUGLOG(rdma, "Device %s: %u events processed\n", device->context->device->name, i);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
@ -3387,7 +3387,7 @@ nvmf_rdma_poll_group_destroy(struct spdk_nvmf_transport_poll_group *group)
|
||||
nvmf_rdma_resources_destroy(poller->resources);
|
||||
}
|
||||
ibv_destroy_srq(poller->srq);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Destroyed RDMA shared queue %p\n", poller->srq);
|
||||
SPDK_DEBUGLOG(rdma, "Destroyed RDMA shared queue %p\n", poller->srq);
|
||||
}
|
||||
|
||||
if (poller->cq) {
|
||||
@ -3769,7 +3769,7 @@ nvmf_rdma_log_wc_status(struct spdk_nvmf_rdma_qpair *rqpair, struct ibv_wc *wc)
|
||||
if (wc->status == IBV_WC_WR_FLUSH_ERR) {
|
||||
/* If qpair is in ERR state, we will receive completions for all posted and not completed
|
||||
* Work Requests with IBV_WC_WR_FLUSH_ERR status. Don't log an error in that case */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_RDMA,
|
||||
SPDK_DEBUGLOG(rdma,
|
||||
"Error on CQ %p, (qp state %d ibv_state %d) request 0x%lu, type %s, status: (%d): %s\n",
|
||||
rqpair->poller->cq, rqpair->qpair.state, rqpair->ibv_state, wc->wr_id,
|
||||
nvmf_rdma_wr_type_str(wr_type), wc->status, ibv_wc_status_str(wc->status));
|
||||
@ -4259,4 +4259,4 @@ const struct spdk_nvmf_transport_ops spdk_nvmf_transport_rdma = {
|
||||
};
|
||||
|
||||
SPDK_NVMF_TRANSPORT_REGISTER(rdma, &spdk_nvmf_transport_rdma);
|
||||
SPDK_LOG_REGISTER_COMPONENT("rdma", SPDK_LOG_RDMA)
|
||||
SPDK_LOG_REGISTER_COMPONENT(rdma)
|
||||
|
@ -346,7 +346,7 @@ spdk_nvmf_subsystem_destroy(struct spdk_nvmf_subsystem *subsystem)
|
||||
|
||||
assert(subsystem->state == SPDK_NVMF_SUBSYSTEM_INACTIVE);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "subsystem is %p\n", subsystem);
|
||||
SPDK_DEBUGLOG(nvmf, "subsystem is %p\n", subsystem);
|
||||
|
||||
nvmf_subsystem_remove_all_listeners(subsystem, false);
|
||||
|
||||
@ -1225,7 +1225,7 @@ nvmf_ns_event(enum spdk_bdev_event_type type,
|
||||
struct spdk_bdev *bdev,
|
||||
void *event_ctx)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Bdev event: type %d, name %s, subsystem_id %d, ns_id %d\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Bdev event: type %d, name %s, subsystem_id %d, ns_id %d\n",
|
||||
type,
|
||||
bdev->name,
|
||||
((struct spdk_nvmf_ns *)event_ctx)->subsystem->id,
|
||||
@ -1382,7 +1382,7 @@ spdk_nvmf_subsystem_add_ns(struct spdk_nvmf_subsystem *subsystem, struct spdk_bd
|
||||
ns->ptpl_file = strdup(ptpl_file);
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Subsystem %s: bdev %s assigned nsid %" PRIu32 "\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Subsystem %s: bdev %s assigned nsid %" PRIu32 "\n",
|
||||
spdk_nvmf_subsystem_get_nqn(subsystem),
|
||||
spdk_bdev_get_name(bdev),
|
||||
opts.nsid);
|
||||
@ -1470,14 +1470,14 @@ spdk_nvmf_subsystem_set_sn(struct spdk_nvmf_subsystem *subsystem, const char *sn
|
||||
max_len = sizeof(subsystem->sn) - 1;
|
||||
len = strlen(sn);
|
||||
if (len > max_len) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Invalid sn \"%s\": length %zu > max %zu\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Invalid sn \"%s\": length %zu > max %zu\n",
|
||||
sn, len, max_len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!nvmf_valid_ascii_string(sn, len)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Non-ASCII sn\n");
|
||||
SPDK_LOGDUMP(SPDK_LOG_NVMF, "sn", sn, len);
|
||||
SPDK_DEBUGLOG(nvmf, "Non-ASCII sn\n");
|
||||
SPDK_LOGDUMP(nvmf, "sn", sn, len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1503,14 +1503,14 @@ spdk_nvmf_subsystem_set_mn(struct spdk_nvmf_subsystem *subsystem, const char *mn
|
||||
max_len = sizeof(subsystem->mn) - 1;
|
||||
len = strlen(mn);
|
||||
if (len > max_len) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Invalid mn \"%s\": length %zu > max %zu\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Invalid mn \"%s\": length %zu > max %zu\n",
|
||||
mn, len, max_len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!nvmf_valid_ascii_string(mn, len)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Non-ASCII mn\n");
|
||||
SPDK_LOGDUMP(SPDK_LOG_NVMF, "mn", mn, len);
|
||||
SPDK_DEBUGLOG(nvmf, "Non-ASCII mn\n");
|
||||
SPDK_LOGDUMP(nvmf, "mn", mn, len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1752,7 +1752,7 @@ nvmf_ns_reservation_restore(struct spdk_nvmf_ns *ns, struct spdk_nvmf_reservatio
|
||||
struct spdk_nvmf_registrant *reg, *holder = NULL;
|
||||
struct spdk_uuid bdev_uuid, holder_uuid;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "NSID %u, PTPL %u, Number of registrants %u\n",
|
||||
SPDK_DEBUGLOG(nvmf, "NSID %u, PTPL %u, Number of registrants %u\n",
|
||||
ns->nsid, info->ptpl_activated, info->num_regs);
|
||||
|
||||
/* it's not an error */
|
||||
@ -1771,9 +1771,9 @@ nvmf_ns_reservation_restore(struct spdk_nvmf_ns *ns, struct spdk_nvmf_reservatio
|
||||
ns->ptpl_activated = info->ptpl_activated;
|
||||
spdk_uuid_parse(&holder_uuid, info->holder_uuid);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Bdev UUID %s\n", info->bdev_uuid);
|
||||
SPDK_DEBUGLOG(nvmf, "Bdev UUID %s\n", info->bdev_uuid);
|
||||
if (info->rtype) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Holder UUID %s, RTYPE %u, RKEY 0x%"PRIx64"\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Holder UUID %s, RTYPE %u, RKEY 0x%"PRIx64"\n",
|
||||
info->holder_uuid, info->rtype, info->crkey);
|
||||
}
|
||||
|
||||
@ -1788,7 +1788,7 @@ nvmf_ns_reservation_restore(struct spdk_nvmf_ns *ns, struct spdk_nvmf_reservatio
|
||||
if (!spdk_uuid_compare(&holder_uuid, ®->hostid)) {
|
||||
holder = reg;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Registrant RKEY 0x%"PRIx64", Host UUID %s\n",
|
||||
SPDK_DEBUGLOG(nvmf, "Registrant RKEY 0x%"PRIx64", Host UUID %s\n",
|
||||
info->registrants[i].rkey, info->registrants[i].host_uuid);
|
||||
}
|
||||
|
||||
@ -2160,7 +2160,7 @@ nvmf_ns_reservation_register(struct spdk_nvmf_ns *ns,
|
||||
goto exit;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "REGISTER: RREGA %u, IEKEY %u, CPTPL %u, "
|
||||
SPDK_DEBUGLOG(nvmf, "REGISTER: RREGA %u, IEKEY %u, CPTPL %u, "
|
||||
"NRKEY 0x%"PRIx64", NRKEY 0x%"PRIx64"\n",
|
||||
rrega, iekey, cptpl, key.crkey, key.nrkey);
|
||||
|
||||
@ -2296,7 +2296,7 @@ nvmf_ns_reservation_acquire(struct spdk_nvmf_ns *ns,
|
||||
goto exit;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "ACQUIRE: RACQA %u, IEKEY %u, RTYPE %u, "
|
||||
SPDK_DEBUGLOG(nvmf, "ACQUIRE: RACQA %u, IEKEY %u, RTYPE %u, "
|
||||
"NRKEY 0x%"PRIx64", PRKEY 0x%"PRIx64"\n",
|
||||
racqa, iekey, rtype, key.crkey, key.prkey);
|
||||
|
||||
@ -2458,7 +2458,7 @@ nvmf_ns_reservation_release(struct spdk_nvmf_ns *ns,
|
||||
goto exit;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "RELEASE: RRELA %u, IEKEY %u, RTYPE %u, "
|
||||
SPDK_DEBUGLOG(nvmf, "RELEASE: RRELA %u, IEKEY %u, RTYPE %u, "
|
||||
"CRKEY 0x%"PRIx64"\n", rrela, iekey, rtype, crkey);
|
||||
|
||||
if (iekey) {
|
||||
@ -2484,7 +2484,7 @@ nvmf_ns_reservation_release(struct spdk_nvmf_ns *ns,
|
||||
switch (rrela) {
|
||||
case SPDK_NVME_RESERVE_RELEASE:
|
||||
if (!ns->holder) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF, "RELEASE: no holder\n");
|
||||
SPDK_DEBUGLOG(nvmf, "RELEASE: no holder\n");
|
||||
update_sgroup = false;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ nvmf_tcp_request_free(struct spdk_nvmf_tcp_req *tcp_req)
|
||||
|
||||
assert(tcp_req != NULL);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "tcp_req=%p will be freed\n", tcp_req);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "tcp_req=%p will be freed\n", tcp_req);
|
||||
ttransport = SPDK_CONTAINEROF(tcp_req->req.qpair->transport,
|
||||
struct spdk_nvmf_tcp_transport, transport);
|
||||
nvmf_tcp_req_set_state(tcp_req, TCP_REQUEST_STATE_COMPLETED);
|
||||
@ -413,7 +413,7 @@ nvmf_tcp_qpair_destroy(struct spdk_nvmf_tcp_qpair *tqpair)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "enter\n");
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "enter\n");
|
||||
|
||||
err = spdk_sock_close(&tqpair->sock);
|
||||
assert(err == 0);
|
||||
@ -434,7 +434,7 @@ nvmf_tcp_qpair_destroy(struct spdk_nvmf_tcp_qpair *tqpair)
|
||||
free(tqpair->reqs);
|
||||
spdk_free(tqpair->bufs);
|
||||
free(tqpair);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "Leave\n");
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "Leave\n");
|
||||
}
|
||||
|
||||
static int
|
||||
@ -468,7 +468,7 @@ nvmf_tcp_create(struct spdk_nvmf_transport_opts *opts)
|
||||
|
||||
SPDK_NOTICELOG("*** TCP Transport Init ***\n");
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_NVMF_TCP, "*** TCP Transport Init ***\n"
|
||||
SPDK_INFOLOG(nvmf_tcp, "*** TCP Transport Init ***\n"
|
||||
" Transport opts: max_ioq_depth=%d, max_io_size=%d,\n"
|
||||
" max_io_qpairs_per_ctrlr=%d, io_unit_size=%d,\n"
|
||||
" in_capsule_data_size=%d, max_aq_depth=%d\n"
|
||||
@ -664,7 +664,7 @@ nvmf_tcp_stop_listen(struct spdk_nvmf_transport *transport,
|
||||
|
||||
ttransport = SPDK_CONTAINEROF(transport, struct spdk_nvmf_tcp_transport, transport);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "Removing listen address %s port %s\n",
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "Removing listen address %s port %s\n",
|
||||
trid->traddr, trid->trsvcid);
|
||||
|
||||
pthread_mutex_lock(&ttransport->lock);
|
||||
@ -684,7 +684,7 @@ static void nvmf_tcp_qpair_set_recv_state(struct spdk_nvmf_tcp_qpair *tqpair,
|
||||
static void
|
||||
nvmf_tcp_qpair_disconnect(struct spdk_nvmf_tcp_qpair *tqpair)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "Disconnecting qpair %p\n", tqpair);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "Disconnecting qpair %p\n", tqpair);
|
||||
|
||||
if (tqpair->state <= NVME_TCP_QPAIR_STATE_RUNNING) {
|
||||
tqpair->state = NVME_TCP_QPAIR_STATE_EXITING;
|
||||
@ -843,7 +843,7 @@ nvmf_tcp_qpair_init(struct spdk_nvmf_qpair *qpair)
|
||||
|
||||
tqpair = SPDK_CONTAINEROF(qpair, struct spdk_nvmf_tcp_qpair, qpair);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "New TCP Connection: %p\n", qpair);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "New TCP Connection: %p\n", qpair);
|
||||
|
||||
TAILQ_INIT(&tqpair->send_queue);
|
||||
|
||||
@ -881,7 +881,7 @@ nvmf_tcp_handle_connect(struct spdk_nvmf_transport *transport,
|
||||
struct spdk_nvmf_tcp_qpair *tqpair;
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "New connection accepted on %s port %s\n",
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "New connection accepted on %s port %s\n",
|
||||
port->trid->traddr, port->trid->trsvcid);
|
||||
|
||||
tqpair = calloc(1, sizeof(struct spdk_nvmf_tcp_qpair));
|
||||
@ -1028,7 +1028,7 @@ nvmf_tcp_qpair_set_recv_state(struct spdk_nvmf_tcp_qpair *tqpair,
|
||||
TAILQ_INSERT_TAIL(&tqpair->group->qpairs, tqpair, link);
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "tqpair(%p) recv state=%d\n", tqpair, state);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "tqpair(%p) recv state=%d\n", tqpair, state);
|
||||
tqpair->recv_state = state;
|
||||
|
||||
switch (state) {
|
||||
@ -1206,7 +1206,7 @@ nvmf_tcp_h2c_data_hdr_handle(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
|
||||
h2c_data = &pdu->hdr.h2c_data;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "tqpair=%p, r2t_info: datao=%u, datal=%u, cccid=%u, ttag=%u\n",
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "tqpair=%p, r2t_info: datao=%u, datal=%u, cccid=%u, ttag=%u\n",
|
||||
tqpair, h2c_data->datao, h2c_data->datal, h2c_data->cccid, h2c_data->ttag);
|
||||
|
||||
rc = nvmf_tcp_find_req_in_state(tqpair, TCP_REQUEST_STATE_TRANSFERRING_HOST_TO_CONTROLLER,
|
||||
@ -1217,7 +1217,7 @@ nvmf_tcp_h2c_data_hdr_handle(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
}
|
||||
|
||||
if (!tcp_req) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "tcp_req is not found for tqpair=%p\n", tqpair);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "tcp_req is not found for tqpair=%p\n", tqpair);
|
||||
fes = SPDK_NVME_TCP_TERM_REQ_FES_INVALID_DATA_UNSUPPORTED_PARAMETER;
|
||||
if (rc == 0) {
|
||||
error_offset = offsetof(struct spdk_nvme_tcp_h2c_data_hdr, cccid);
|
||||
@ -1228,7 +1228,7 @@ nvmf_tcp_h2c_data_hdr_handle(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
}
|
||||
|
||||
if (tcp_req->h2c_offset != h2c_data->datao) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP,
|
||||
SPDK_DEBUGLOG(nvmf_tcp,
|
||||
"tcp_req(%p), tqpair=%p, expected data offset %u, but data offset is %u\n",
|
||||
tcp_req, tqpair, tcp_req->h2c_offset, h2c_data->datao);
|
||||
fes = SPDK_NVME_TCP_TERM_REQ_FES_DATA_TRANSFER_OUT_OF_RANGE;
|
||||
@ -1236,7 +1236,7 @@ nvmf_tcp_h2c_data_hdr_handle(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
}
|
||||
|
||||
if ((h2c_data->datao + h2c_data->datal) > tcp_req->req.length) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP,
|
||||
SPDK_DEBUGLOG(nvmf_tcp,
|
||||
"tcp_req(%p), tqpair=%p, (datao=%u + datal=%u) execeeds requested length=%u\n",
|
||||
tcp_req, tqpair, h2c_data->datao, h2c_data->datal, tcp_req->req.length);
|
||||
fes = SPDK_NVME_TCP_TERM_REQ_FES_DATA_TRANSFER_OUT_OF_RANGE;
|
||||
@ -1272,7 +1272,7 @@ nvmf_tcp_send_capsule_resp_pdu(struct spdk_nvmf_tcp_req *tcp_req,
|
||||
struct nvme_tcp_pdu *rsp_pdu;
|
||||
struct spdk_nvme_tcp_rsp *capsule_resp;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "enter, tqpair=%p\n", tqpair);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "enter, tqpair=%p\n", tqpair);
|
||||
|
||||
rsp_pdu = nvmf_tcp_req_pdu_init(tcp_req);
|
||||
assert(rsp_pdu != NULL);
|
||||
@ -1350,7 +1350,7 @@ nvmf_tcp_send_r2t_pdu(struct spdk_nvmf_tcp_qpair *tqpair,
|
||||
|
||||
nvmf_tcp_req_set_state(tcp_req, TCP_REQUEST_STATE_AWAITING_R2T_ACK);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP,
|
||||
SPDK_DEBUGLOG(nvmf_tcp,
|
||||
"tcp_req(%p) on tqpair(%p), r2t_info: cccid=%u, ttag=%u, r2to=%u, r2tl=%u\n",
|
||||
tcp_req, tqpair, r2t->cccid, r2t->ttag, r2t->r2to, r2t->r2tl);
|
||||
nvmf_tcp_qpair_write_pdu(tqpair, rsp_pdu, nvmf_tcp_r2t_complete, tcp_req);
|
||||
@ -1366,7 +1366,7 @@ nvmf_tcp_h2c_data_payload_handle(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
tcp_req = pdu->req;
|
||||
assert(tcp_req != NULL);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "enter\n");
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "enter\n");
|
||||
|
||||
tcp_req->h2c_offset += pdu->data_len;
|
||||
|
||||
@ -1388,7 +1388,7 @@ nvmf_tcp_h2c_term_req_dump(struct spdk_nvme_tcp_term_req_hdr *h2c_term_req)
|
||||
spdk_nvmf_tcp_term_req_fes_str[h2c_term_req->fes]);
|
||||
if ((h2c_term_req->fes == SPDK_NVME_TCP_TERM_REQ_FES_INVALID_HEADER_FIELD) ||
|
||||
(h2c_term_req->fes == SPDK_NVME_TCP_TERM_REQ_FES_INVALID_DATA_UNSUPPORTED_PARAMETER)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "The offset from the start of the PDU header is %u\n",
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "The offset from the start of the PDU header is %u\n",
|
||||
DGET32(h2c_term_req->fei));
|
||||
}
|
||||
}
|
||||
@ -1440,7 +1440,7 @@ nvmf_tcp_pdu_payload_handle(struct spdk_nvmf_tcp_qpair *tqpair,
|
||||
assert(tqpair->recv_state == NVME_TCP_PDU_RECV_STATE_AWAIT_PDU_PAYLOAD);
|
||||
pdu = &tqpair->pdu_in_progress;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "enter\n");
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "enter\n");
|
||||
/* check data digest if need */
|
||||
if (pdu->ddgst_enable) {
|
||||
crc32c = nvme_tcp_pdu_calc_data_digest(pdu);
|
||||
@ -1501,7 +1501,7 @@ nvmf_tcp_icreq_handle(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
}
|
||||
|
||||
/* MAXR2T is 0's based */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "maxr2t =%u\n", (ic_req->maxr2t + 1u));
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "maxr2t =%u\n", (ic_req->maxr2t + 1u));
|
||||
|
||||
tqpair->host_hdgst_enable = ic_req->dgst.bits.hdgst_enable ? true : false;
|
||||
if (!tqpair->host_hdgst_enable) {
|
||||
@ -1522,7 +1522,7 @@ nvmf_tcp_icreq_handle(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
}
|
||||
|
||||
tqpair->cpda = spdk_min(ic_req->hpda, SPDK_NVME_TCP_CPDA_MAX);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "cpda of tqpair=(%p) is : %u\n", tqpair, tqpair->cpda);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "cpda of tqpair=(%p) is : %u\n", tqpair, tqpair->cpda);
|
||||
|
||||
rsp_pdu = tqpair->mgmt_pdu;
|
||||
|
||||
@ -1535,8 +1535,8 @@ nvmf_tcp_icreq_handle(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
ic_resp->dgst.bits.hdgst_enable = tqpair->host_hdgst_enable ? 1 : 0;
|
||||
ic_resp->dgst.bits.ddgst_enable = tqpair->host_ddgst_enable ? 1 : 0;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "host_hdgst_enable: %u\n", tqpair->host_hdgst_enable);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "host_ddgst_enable: %u\n", tqpair->host_ddgst_enable);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "host_hdgst_enable: %u\n", tqpair->host_hdgst_enable);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "host_ddgst_enable: %u\n", tqpair->host_ddgst_enable);
|
||||
|
||||
tqpair->state = NVME_TCP_QPAIR_STATE_INITIALIZING;
|
||||
nvmf_tcp_qpair_write_pdu(tqpair, rsp_pdu, nvmf_tcp_send_icresp_complete, tqpair);
|
||||
@ -1558,11 +1558,11 @@ nvmf_tcp_pdu_psh_handle(struct spdk_nvmf_tcp_qpair *tqpair,
|
||||
assert(tqpair->recv_state == NVME_TCP_PDU_RECV_STATE_AWAIT_PDU_PSH);
|
||||
pdu = &tqpair->pdu_in_progress;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "pdu type of tqpair(%p) is %d\n", tqpair,
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "pdu type of tqpair(%p) is %d\n", tqpair,
|
||||
pdu->hdr.common.pdu_type);
|
||||
/* check header digest if needed */
|
||||
if (pdu->has_hdgst) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "Compare the header of pdu=%p on tqpair=%p\n", pdu, tqpair);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "Compare the header of pdu=%p on tqpair=%p\n", pdu, tqpair);
|
||||
crc32c = nvme_tcp_pdu_calc_header_digest(pdu);
|
||||
rc = MATCH_DIGEST_WORD((uint8_t *)pdu->hdr.raw + pdu->hdr.common.hlen, crc32c);
|
||||
if (rc == 0) {
|
||||
@ -1719,7 +1719,7 @@ nvmf_tcp_sock_process(struct spdk_nvmf_tcp_qpair *tqpair)
|
||||
/* The loop here is to allow for several back-to-back state changes. */
|
||||
do {
|
||||
prev_state = tqpair->recv_state;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "tqpair(%p) recv pdu entering state %d\n", tqpair, prev_state);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "tqpair(%p) recv pdu entering state %d\n", tqpair, prev_state);
|
||||
|
||||
pdu = &tqpair->pdu_in_progress;
|
||||
switch (tqpair->recv_state) {
|
||||
@ -1734,7 +1734,7 @@ nvmf_tcp_sock_process(struct spdk_nvmf_tcp_qpair *tqpair)
|
||||
sizeof(struct spdk_nvme_tcp_common_pdu_hdr) - pdu->ch_valid_bytes,
|
||||
(void *)&pdu->hdr.common + pdu->ch_valid_bytes);
|
||||
if (rc < 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "will disconnect tqpair=%p\n", tqpair);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "will disconnect tqpair=%p\n", tqpair);
|
||||
return NVME_TCP_PDU_FATAL;
|
||||
} else if (rc > 0) {
|
||||
pdu->ch_valid_bytes += rc;
|
||||
@ -1853,7 +1853,7 @@ nvmf_tcp_req_parse_sgl(struct spdk_nvmf_tcp_req *tcp_req,
|
||||
/* fill request length and populate iovs */
|
||||
req->length = length;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "Data requested length= 0x%x\n", length);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "Data requested length= 0x%x\n", length);
|
||||
|
||||
if (spdk_unlikely(req->dif.dif_insert_or_strip)) {
|
||||
req->dif.orig_length = length;
|
||||
@ -1863,7 +1863,7 @@ nvmf_tcp_req_parse_sgl(struct spdk_nvmf_tcp_req *tcp_req,
|
||||
|
||||
if (spdk_nvmf_request_get_buffers(req, group, transport, length)) {
|
||||
/* No available buffers. Queue this request up. */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "No available large data buffers. Queueing request %p\n",
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "No available large data buffers. Queueing request %p\n",
|
||||
tcp_req);
|
||||
return 0;
|
||||
}
|
||||
@ -1871,7 +1871,7 @@ nvmf_tcp_req_parse_sgl(struct spdk_nvmf_tcp_req *tcp_req,
|
||||
/* backward compatible */
|
||||
req->data = req->iov[0].iov_base;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "Request %p took %d buffer/s from central pool, and data=%p\n",
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "Request %p took %d buffer/s from central pool, and data=%p\n",
|
||||
tcp_req, req->iovcnt, req->data);
|
||||
|
||||
return 0;
|
||||
@ -1880,7 +1880,7 @@ nvmf_tcp_req_parse_sgl(struct spdk_nvmf_tcp_req *tcp_req,
|
||||
uint64_t offset = sgl->address;
|
||||
uint32_t max_len = transport->opts.in_capsule_data_size;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "In-capsule data: offset 0x%" PRIx64 ", length 0x%x\n",
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "In-capsule data: offset 0x%" PRIx64 ", length 0x%x\n",
|
||||
offset, length);
|
||||
|
||||
if (offset > max_len) {
|
||||
@ -1952,7 +1952,7 @@ nvmf_tcp_send_c2h_data(struct spdk_nvmf_tcp_qpair *tqpair,
|
||||
uint32_t plen, pdo, alignment;
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "enter\n");
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "enter\n");
|
||||
|
||||
rsp_pdu = nvmf_tcp_req_pdu_init(tcp_req);
|
||||
assert(rsp_pdu != NULL);
|
||||
@ -2031,7 +2031,7 @@ request_transfer_out(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvmf_tcp_qpair *tqpair;
|
||||
struct spdk_nvme_cpl *rsp;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "enter\n");
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "enter\n");
|
||||
|
||||
qpair = req->qpair;
|
||||
rsp = &req->rsp->nvme_cpl;
|
||||
@ -2102,7 +2102,7 @@ nvmf_tcp_req_process(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
do {
|
||||
prev_state = tcp_req->state;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "Request %p entering state %d on tqpair=%p\n", tcp_req, prev_state,
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "Request %p entering state %d on tqpair=%p\n", tcp_req, prev_state,
|
||||
tqpair);
|
||||
|
||||
switch (tcp_req->state) {
|
||||
@ -2128,7 +2128,7 @@ nvmf_tcp_req_process(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
tcp_req->req.rsp->nvme_cpl.status.sct = SPDK_NVME_SCT_GENERIC;
|
||||
tcp_req->req.rsp->nvme_cpl.status.sct = SPDK_NVME_SC_INVALID_OPCODE;
|
||||
nvmf_tcp_req_set_state(tcp_req, TCP_REQUEST_STATE_READY_TO_COMPLETE);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "Request %p: invalid xfer type (BIDIRECTIONAL)\n", tcp_req);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "Request %p: invalid xfer type (BIDIRECTIONAL)\n", tcp_req);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2155,7 +2155,7 @@ nvmf_tcp_req_process(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
assert(tcp_req->req.xfer != SPDK_NVME_DATA_NONE);
|
||||
|
||||
if (!tcp_req->has_incapsule_data && (&tcp_req->req != STAILQ_FIRST(&group->pending_buf_queue))) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP,
|
||||
SPDK_DEBUGLOG(nvmf_tcp,
|
||||
"Not the first element to wait for the buf for tcp_req(%p) on tqpair=%p\n",
|
||||
tcp_req, tqpair);
|
||||
/* This request needs to wait in line to obtain a buffer */
|
||||
@ -2173,7 +2173,7 @@ nvmf_tcp_req_process(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
}
|
||||
|
||||
if (!tcp_req->req.data) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "No buffer allocated for tcp_req(%p) on tqpair(%p\n)",
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "No buffer allocated for tcp_req(%p) on tqpair(%p\n)",
|
||||
tcp_req, tqpair);
|
||||
/* No buffers available. */
|
||||
break;
|
||||
@ -2184,7 +2184,7 @@ nvmf_tcp_req_process(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
/* If data is transferring from host to controller, we need to do a transfer from the host. */
|
||||
if (tcp_req->req.xfer == SPDK_NVME_DATA_HOST_TO_CONTROLLER) {
|
||||
if (tcp_req->req.data_from_pool) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "Sending R2T for tcp_req(%p) on tqpair=%p\n", tcp_req, tqpair);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "Sending R2T for tcp_req(%p) on tqpair=%p\n", tcp_req, tqpair);
|
||||
nvmf_tcp_send_r2t_pdu(tqpair, tcp_req);
|
||||
} else {
|
||||
struct nvme_tcp_pdu *pdu;
|
||||
@ -2192,7 +2192,7 @@ nvmf_tcp_req_process(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
nvmf_tcp_req_set_state(tcp_req, TCP_REQUEST_STATE_TRANSFERRING_HOST_TO_CONTROLLER);
|
||||
|
||||
pdu = &tqpair->pdu_in_progress;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "Not need to send r2t for tcp_req(%p) on tqpair=%p\n", tcp_req,
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "Not need to send r2t for tcp_req(%p) on tqpair=%p\n", tcp_req,
|
||||
tqpair);
|
||||
/* No need to send r2t, contained in the capsuled data */
|
||||
nvme_tcp_pdu_set_data_buf(pdu, tcp_req->req.iov, tcp_req->req.iovcnt,
|
||||
@ -2351,7 +2351,7 @@ nvmf_tcp_poll_group_remove(struct spdk_nvmf_transport_poll_group *group,
|
||||
|
||||
assert(tqpair->group == tgroup);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "remove tqpair=%p from the tgroup=%p\n", tqpair, tgroup);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "remove tqpair=%p from the tgroup=%p\n", tqpair, tgroup);
|
||||
if (tqpair->recv_state == NVME_TCP_PDU_RECV_STATE_AWAIT_REQ) {
|
||||
TAILQ_REMOVE(&tgroup->await_req, tqpair, link);
|
||||
} else {
|
||||
@ -2387,7 +2387,7 @@ nvmf_tcp_close_qpair(struct spdk_nvmf_qpair *qpair)
|
||||
{
|
||||
struct spdk_nvmf_tcp_qpair *tqpair;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "Qpair: %p\n", qpair);
|
||||
SPDK_DEBUGLOG(nvmf_tcp, "Qpair: %p\n", qpair);
|
||||
|
||||
tqpair = SPDK_CONTAINEROF(qpair, struct spdk_nvmf_tcp_qpair, qpair);
|
||||
tqpair->state = NVME_TCP_QPAIR_STATE_EXITED;
|
||||
@ -2639,4 +2639,4 @@ const struct spdk_nvmf_transport_ops spdk_nvmf_transport_tcp = {
|
||||
};
|
||||
|
||||
SPDK_NVMF_TRANSPORT_REGISTER(tcp, &spdk_nvmf_transport_tcp);
|
||||
SPDK_LOG_REGISTER_COMPONENT("nvmf_tcp", SPDK_LOG_NVMF_TCP)
|
||||
SPDK_LOG_REGISTER_COMPONENT(nvmf_tcp)
|
||||
|
@ -1622,4 +1622,4 @@ void spdk_reduce_vol_print_info(struct spdk_reduce_vol *vol)
|
||||
SPDK_NOTICELOG("\tchunk_map_size = 0x%" PRIx64 "\n", chunk_map_size);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("reduce", SPDK_LOG_REDUCE)
|
||||
SPDK_LOG_REGISTER_COMPONENT(reduce)
|
||||
|
@ -107,4 +107,4 @@ spdk_scsi_lun_id_fmt_to_int(uint64_t fmt_lun)
|
||||
return lun_i;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("scsi", SPDK_LOG_SCSI)
|
||||
SPDK_LOG_REGISTER_COMPONENT(scsi)
|
||||
|
@ -665,7 +665,7 @@ bdev_scsi_inquiry(struct spdk_bdev *bdev, struct spdk_scsi_task *task,
|
||||
|
||||
default:
|
||||
if (pc >= 0xc0 && pc <= 0xff) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "Vendor specific INQUIRY VPD page 0x%x\n", pc);
|
||||
SPDK_DEBUGLOG(scsi, "Vendor specific INQUIRY VPD page 0x%x\n", pc);
|
||||
} else {
|
||||
SPDK_ERRLOG("unsupported INQUIRY VPD page 0x%x\n", pc);
|
||||
}
|
||||
@ -840,7 +840,7 @@ bdev_scsi_mode_sense_page(struct spdk_bdev *bdev,
|
||||
break;
|
||||
case 0x01:
|
||||
/* Read-Write Error Recovery */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI,
|
||||
SPDK_DEBUGLOG(scsi,
|
||||
"MODE_SENSE Read-Write Error Recovery\n");
|
||||
if (subpage != 0x00) {
|
||||
break;
|
||||
@ -851,7 +851,7 @@ bdev_scsi_mode_sense_page(struct spdk_bdev *bdev,
|
||||
break;
|
||||
case 0x02:
|
||||
/* Disconnect-Reconnect */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI,
|
||||
SPDK_DEBUGLOG(scsi,
|
||||
"MODE_SENSE Disconnect-Reconnect\n");
|
||||
if (subpage != 0x00) {
|
||||
break;
|
||||
@ -874,7 +874,7 @@ bdev_scsi_mode_sense_page(struct spdk_bdev *bdev,
|
||||
break;
|
||||
case 0x07:
|
||||
/* Verify Error Recovery */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI,
|
||||
SPDK_DEBUGLOG(scsi,
|
||||
"MODE_SENSE Verify Error Recovery\n");
|
||||
|
||||
if (subpage != 0x00) {
|
||||
@ -887,7 +887,7 @@ bdev_scsi_mode_sense_page(struct spdk_bdev *bdev,
|
||||
break;
|
||||
case 0x08: {
|
||||
/* Caching */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "MODE_SENSE Caching\n");
|
||||
SPDK_DEBUGLOG(scsi, "MODE_SENSE Caching\n");
|
||||
if (subpage != 0x00) {
|
||||
break;
|
||||
}
|
||||
@ -914,7 +914,7 @@ bdev_scsi_mode_sense_page(struct spdk_bdev *bdev,
|
||||
switch (subpage) {
|
||||
case 0x00:
|
||||
/* Control */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI,
|
||||
SPDK_DEBUGLOG(scsi,
|
||||
"MODE_SENSE Control\n");
|
||||
plen = 0x0a + 2;
|
||||
mode_sense_page_init(cp, plen, page, subpage);
|
||||
@ -922,7 +922,7 @@ bdev_scsi_mode_sense_page(struct spdk_bdev *bdev,
|
||||
break;
|
||||
case 0x01:
|
||||
/* Control Extension */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI,
|
||||
SPDK_DEBUGLOG(scsi,
|
||||
"MODE_SENSE Control Extension\n");
|
||||
plen = 0x1c + 4;
|
||||
mode_sense_page_init(cp, plen, page, subpage);
|
||||
@ -959,7 +959,7 @@ bdev_scsi_mode_sense_page(struct spdk_bdev *bdev,
|
||||
break;
|
||||
case 0x10:
|
||||
/* XOR Control */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "MODE_SENSE XOR Control\n");
|
||||
SPDK_DEBUGLOG(scsi, "MODE_SENSE XOR Control\n");
|
||||
if (subpage != 0x00) {
|
||||
break;
|
||||
}
|
||||
@ -988,7 +988,7 @@ bdev_scsi_mode_sense_page(struct spdk_bdev *bdev,
|
||||
break;
|
||||
case 0x1a:
|
||||
/* Power Condition */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI,
|
||||
SPDK_DEBUGLOG(scsi,
|
||||
"MODE_SENSE Power Condition\n");
|
||||
if (subpage != 0x00) {
|
||||
break;
|
||||
@ -1002,7 +1002,7 @@ bdev_scsi_mode_sense_page(struct spdk_bdev *bdev,
|
||||
break;
|
||||
case 0x1c:
|
||||
/* Informational Exceptions Control */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI,
|
||||
SPDK_DEBUGLOG(scsi,
|
||||
"MODE_SENSE Informational Exceptions Control\n");
|
||||
if (subpage != 0x00) {
|
||||
break;
|
||||
@ -1305,7 +1305,7 @@ bdev_scsi_readwrite(struct spdk_bdev *bdev, struct spdk_bdev_desc *bdev_desc,
|
||||
|
||||
bdev_num_blocks = spdk_bdev_get_num_blocks(bdev);
|
||||
if (spdk_unlikely(bdev_num_blocks <= lba || bdev_num_blocks - lba < xfer_len)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "end of media\n");
|
||||
SPDK_DEBUGLOG(scsi, "end of media\n");
|
||||
sk = SPDK_SCSI_SENSE_ILLEGAL_REQUEST;
|
||||
asc = SPDK_SCSI_ASC_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE;
|
||||
goto check_condition;
|
||||
@ -1345,7 +1345,7 @@ bdev_scsi_readwrite(struct spdk_bdev *bdev, struct spdk_bdev_desc *bdev_desc,
|
||||
|
||||
offset_blocks += lba;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI,
|
||||
SPDK_DEBUGLOG(scsi,
|
||||
"%s: lba=%"PRIu64", len=%"PRIu64"\n",
|
||||
is_read ? "Read" : "Write", offset_blocks, num_blocks);
|
||||
|
||||
@ -1724,14 +1724,14 @@ bdev_scsi_process_primary(struct spdk_scsi_task *task)
|
||||
break;
|
||||
}
|
||||
|
||||
SPDK_LOGDUMP(SPDK_LOG_SCSI, "INQUIRY", data, data_len);
|
||||
SPDK_LOGDUMP(scsi, "INQUIRY", data, data_len);
|
||||
break;
|
||||
|
||||
case SPDK_SPC_REPORT_LUNS: {
|
||||
int sel;
|
||||
|
||||
sel = cdb[2];
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "sel=%x\n", sel);
|
||||
SPDK_DEBUGLOG(scsi, "sel=%x\n", sel);
|
||||
|
||||
alloc_len = from_be32(&cdb[6]);
|
||||
rc = bdev_scsi_check_len(task, alloc_len, 16);
|
||||
@ -1752,7 +1752,7 @@ bdev_scsi_process_primary(struct spdk_scsi_task *task)
|
||||
break;
|
||||
}
|
||||
|
||||
SPDK_LOGDUMP(SPDK_LOG_SCSI, "REPORT LUNS", data, data_len);
|
||||
SPDK_LOGDUMP(scsi, "REPORT LUNS", data, data_len);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1869,12 +1869,12 @@ bdev_scsi_process_primary(struct spdk_scsi_task *task)
|
||||
}
|
||||
|
||||
case SPDK_SPC_LOG_SELECT:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "LOG_SELECT\n");
|
||||
SPDK_DEBUGLOG(scsi, "LOG_SELECT\n");
|
||||
cmd_parsed = 1;
|
||||
/* FALLTHROUGH */
|
||||
case SPDK_SPC_LOG_SENSE:
|
||||
if (!cmd_parsed) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "LOG_SENSE\n");
|
||||
SPDK_DEBUGLOG(scsi, "LOG_SENSE\n");
|
||||
}
|
||||
|
||||
/* INVALID COMMAND OPERATION CODE */
|
||||
@ -1886,12 +1886,12 @@ bdev_scsi_process_primary(struct spdk_scsi_task *task)
|
||||
break;
|
||||
|
||||
case SPDK_SPC_TEST_UNIT_READY:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "TEST_UNIT_READY\n");
|
||||
SPDK_DEBUGLOG(scsi, "TEST_UNIT_READY\n");
|
||||
cmd_parsed = 1;
|
||||
/* FALLTHROUGH */
|
||||
case SPDK_SBC_START_STOP_UNIT:
|
||||
if (!cmd_parsed) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "START_STOP_UNIT\n");
|
||||
SPDK_DEBUGLOG(scsi, "START_STOP_UNIT\n");
|
||||
}
|
||||
|
||||
rc = 0;
|
||||
@ -1975,7 +1975,7 @@ bdev_scsi_execute(struct spdk_scsi_task *task)
|
||||
|
||||
if ((rc = bdev_scsi_process_block(task)) == SPDK_SCSI_TASK_UNKNOWN) {
|
||||
if ((rc = bdev_scsi_process_primary(task)) == SPDK_SCSI_TASK_UNKNOWN) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "unsupported SCSI OP=0x%x\n", task->cdb[0]);
|
||||
SPDK_DEBUGLOG(scsi, "unsupported SCSI OP=0x%x\n", task->cdb[0]);
|
||||
/* INVALID COMMAND OPERATION CODE */
|
||||
spdk_scsi_task_set_status(task, SPDK_SCSI_STATUS_CHECK_CONDITION,
|
||||
SPDK_SCSI_SENSE_ILLEGAL_REQUEST,
|
||||
|
@ -111,7 +111,7 @@ scsi_pr_register_registrant(struct spdk_scsi_lun *lun,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "REGISTER: new registrant registered "
|
||||
SPDK_DEBUGLOG(scsi, "REGISTER: new registrant registered "
|
||||
"with key 0x%"PRIx64"\n", sa_rkey);
|
||||
|
||||
/* New I_T nexus */
|
||||
@ -140,7 +140,7 @@ scsi_pr_release_reservation(struct spdk_scsi_lun *lun, struct spdk_scsi_pr_regis
|
||||
{
|
||||
bool all_regs = false;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "REGISTER: release reservation "
|
||||
SPDK_DEBUGLOG(scsi, "REGISTER: release reservation "
|
||||
"with type %u\n", lun->reservation.rtype);
|
||||
|
||||
/* TODO: Unit Attention */
|
||||
@ -168,7 +168,7 @@ static void
|
||||
scsi_pr_unregister_registrant(struct spdk_scsi_lun *lun,
|
||||
struct spdk_scsi_pr_registrant *reg)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "REGISTER: unregister registrant\n");
|
||||
SPDK_DEBUGLOG(scsi, "REGISTER: unregister registrant\n");
|
||||
|
||||
TAILQ_REMOVE(&lun->reg_head, reg, link);
|
||||
if (scsi_pr_registrant_is_holder(lun, reg)) {
|
||||
@ -184,7 +184,7 @@ scsi_pr_replace_registrant_key(struct spdk_scsi_lun *lun,
|
||||
struct spdk_scsi_pr_registrant *reg,
|
||||
uint64_t sa_rkey)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "REGISTER: replace with new "
|
||||
SPDK_DEBUGLOG(scsi, "REGISTER: replace with new "
|
||||
"reservation key 0x%"PRIx64"\n", sa_rkey);
|
||||
reg->rkey = sa_rkey;
|
||||
lun->pr_generation++;
|
||||
@ -198,7 +198,7 @@ scsi_pr_out_reserve(struct spdk_scsi_task *task,
|
||||
struct spdk_scsi_lun *lun = task->lun;
|
||||
struct spdk_scsi_pr_registrant *reg;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "PR OUT RESERVE: rkey 0x%"PRIx64", requested "
|
||||
SPDK_DEBUGLOG(scsi, "PR OUT RESERVE: rkey 0x%"PRIx64", requested "
|
||||
"reservation type %u, type %u\n", rkey, rtype, lun->reservation.rtype);
|
||||
|
||||
/* TODO: don't support now */
|
||||
@ -262,7 +262,7 @@ scsi_pr_out_register(struct spdk_scsi_task *task,
|
||||
struct spdk_scsi_pr_registrant *reg;
|
||||
int sc, sk, asc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "PR OUT REGISTER: rkey 0x%"PRIx64", "
|
||||
SPDK_DEBUGLOG(scsi, "PR OUT REGISTER: rkey 0x%"PRIx64", "
|
||||
"sa_key 0x%"PRIx64", reservation type %u\n", rkey, sa_rkey, lun->reservation.rtype);
|
||||
|
||||
/* TODO: don't support now */
|
||||
@ -287,7 +287,7 @@ scsi_pr_out_register(struct spdk_scsi_task *task,
|
||||
|
||||
if (!sa_rkey) {
|
||||
/* Do nothing except return GOOD status */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "REGISTER: service action "
|
||||
SPDK_DEBUGLOG(scsi, "REGISTER: service action "
|
||||
"reservation key is zero, do noting\n");
|
||||
return 0;
|
||||
}
|
||||
@ -329,7 +329,7 @@ scsi_pr_out_release(struct spdk_scsi_task *task,
|
||||
struct spdk_scsi_pr_registrant *reg;
|
||||
int sk, asc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "PR OUT RELEASE: rkey 0x%"PRIx64", "
|
||||
SPDK_DEBUGLOG(scsi, "PR OUT RELEASE: rkey 0x%"PRIx64", "
|
||||
"reservation type %u\n", rkey, rtype);
|
||||
|
||||
reg = scsi_pr_get_registrant(lun, task->initiator_port, task->target_port);
|
||||
@ -342,7 +342,7 @@ scsi_pr_out_release(struct spdk_scsi_task *task,
|
||||
|
||||
/* no reservation holder */
|
||||
if (!scsi_pr_has_reservation(lun)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "RELEASE: no reservation holder\n");
|
||||
SPDK_DEBUGLOG(scsi, "RELEASE: no reservation holder\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -354,7 +354,7 @@ scsi_pr_out_release(struct spdk_scsi_task *task,
|
||||
|
||||
/* I_T nexus is not a persistent reservation holder */
|
||||
if (!scsi_pr_registrant_is_holder(lun, reg)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "RELEASE: current I_T nexus is not holder\n");
|
||||
SPDK_DEBUGLOG(scsi, "RELEASE: current I_T nexus is not holder\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -375,7 +375,7 @@ scsi_pr_out_clear(struct spdk_scsi_task *task, uint64_t rkey)
|
||||
struct spdk_scsi_pr_registrant *reg, *tmp;
|
||||
int sc, sk, asc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "PR OUT CLEAR: rkey 0x%"PRIx64"\n", rkey);
|
||||
SPDK_DEBUGLOG(scsi, "PR OUT CLEAR: rkey 0x%"PRIx64"\n", rkey);
|
||||
|
||||
reg = scsi_pr_get_registrant(lun, task->initiator_port, task->target_port);
|
||||
if (!reg) {
|
||||
@ -440,7 +440,7 @@ scsi_pr_out_preempt(struct spdk_scsi_task *task,
|
||||
struct spdk_scsi_pr_registrant *reg;
|
||||
bool all_regs = false;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "PR OUT PREEMPT: rkey 0x%"PRIx64", sa_rkey 0x%"PRIx64" "
|
||||
SPDK_DEBUGLOG(scsi, "PR OUT PREEMPT: rkey 0x%"PRIx64", sa_rkey 0x%"PRIx64" "
|
||||
"action %u, type %u, reservation type %u\n",
|
||||
rkey, sa_rkey, action, rtype, lun->reservation.rtype);
|
||||
|
||||
@ -459,7 +459,7 @@ scsi_pr_out_preempt(struct spdk_scsi_task *task,
|
||||
/* no persistent reservation */
|
||||
if (!scsi_pr_has_reservation(lun)) {
|
||||
scsi_pr_remove_all_regs_by_key(lun, sa_rkey);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "PREEMPT: no persistent reservation\n");
|
||||
SPDK_DEBUGLOG(scsi, "PREEMPT: no persistent reservation\n");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@ -468,13 +468,13 @@ scsi_pr_out_preempt(struct spdk_scsi_task *task,
|
||||
if (all_regs) {
|
||||
if (sa_rkey != 0) {
|
||||
scsi_pr_remove_all_regs_by_key(lun, sa_rkey);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "PREEMPT: All registrants type with sa_rkey\n");
|
||||
SPDK_DEBUGLOG(scsi, "PREEMPT: All registrants type with sa_rkey\n");
|
||||
} else {
|
||||
/* remove all other registrants and release persistent reservation if any */
|
||||
scsi_pr_remove_all_other_regs(lun, reg);
|
||||
/* create persistent reservation using new type and scope */
|
||||
scsi_pr_reserve_reservation(lun, rtype, 0, reg);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "PREEMPT: All registrants type with sa_rkey zeroed\n");
|
||||
SPDK_DEBUGLOG(scsi, "PREEMPT: All registrants type with sa_rkey zeroed\n");
|
||||
}
|
||||
goto exit;
|
||||
}
|
||||
@ -496,7 +496,7 @@ scsi_pr_out_preempt(struct spdk_scsi_task *task,
|
||||
|
||||
if (scsi_pr_registrant_is_holder(lun, reg)) {
|
||||
scsi_pr_reserve_reservation(lun, rtype, rkey, reg);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "PREEMPT: preempt itself with type %u\n", rtype);
|
||||
SPDK_DEBUGLOG(scsi, "PREEMPT: preempt itself with type %u\n", rtype);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@ -597,7 +597,7 @@ scsi_pr_in_read_keys(struct spdk_scsi_task *task, uint8_t *data,
|
||||
struct spdk_scsi_pr_registrant *reg, *tmp;
|
||||
uint16_t count = 0;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "PR IN READ KEYS\n");
|
||||
SPDK_DEBUGLOG(scsi, "PR IN READ KEYS\n");
|
||||
keys = (struct spdk_scsi_pr_in_read_keys_data *)data;
|
||||
|
||||
to_be32(&keys->header.pr_generation, lun->pr_generation);
|
||||
@ -621,7 +621,7 @@ scsi_pr_in_read_reservations(struct spdk_scsi_task *task,
|
||||
struct spdk_scsi_pr_in_read_reservations_data *param;
|
||||
bool all_regs = false;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "PR IN READ RESERVATIONS\n");
|
||||
SPDK_DEBUGLOG(scsi, "PR IN READ RESERVATIONS\n");
|
||||
param = (struct spdk_scsi_pr_in_read_reservations_data *)(data);
|
||||
|
||||
to_be32(¶m->header.pr_generation, lun->pr_generation);
|
||||
@ -635,13 +635,13 @@ scsi_pr_in_read_reservations(struct spdk_scsi_task *task,
|
||||
to_be32(¶m->header.additional_len, 16);
|
||||
param->scope = SPDK_SCSI_PR_LU_SCOPE;
|
||||
param->type = lun->reservation.rtype;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "READ RESERVATIONS with valid reservation\n");
|
||||
SPDK_DEBUGLOG(scsi, "READ RESERVATIONS with valid reservation\n");
|
||||
return sizeof(*param);
|
||||
}
|
||||
|
||||
/* no reservation */
|
||||
to_be32(¶m->header.additional_len, 0);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "READ RESERVATIONS no reservation\n");
|
||||
SPDK_DEBUGLOG(scsi, "READ RESERVATIONS no reservation\n");
|
||||
return sizeof(param->header);
|
||||
}
|
||||
|
||||
@ -651,7 +651,7 @@ scsi_pr_in_report_capabilities(struct spdk_scsi_task *task,
|
||||
{
|
||||
struct spdk_scsi_pr_in_report_capabilities_data *param;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "PR IN REPORT CAPABILITIES\n");
|
||||
SPDK_DEBUGLOG(scsi, "PR IN REPORT CAPABILITIES\n");
|
||||
param = (struct spdk_scsi_pr_in_report_capabilities_data *)data;
|
||||
|
||||
memset(param, 0, sizeof(*param));
|
||||
@ -680,7 +680,7 @@ scsi_pr_in_read_full_status(struct spdk_scsi_task *task,
|
||||
bool all_regs = false;
|
||||
uint32_t add_len = 0;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "PR IN READ FULL STATUS\n");
|
||||
SPDK_DEBUGLOG(scsi, "PR IN READ FULL STATUS\n");
|
||||
|
||||
all_regs = scsi_pr_is_all_registrants_type(lun);
|
||||
param = (struct spdk_scsi_pr_in_full_status_data *)data;
|
||||
@ -807,14 +807,14 @@ scsi_pr_check(struct spdk_scsi_task *task)
|
||||
case SPDK_SPC_LOG_SELECT:
|
||||
/* I_T nexus is registrant but not holder */
|
||||
if (!reg) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "CHECK: current I_T nexus "
|
||||
SPDK_DEBUGLOG(scsi, "CHECK: current I_T nexus "
|
||||
"is not registered, cdb 0x%x\n", cdb[0]);
|
||||
goto conflict;
|
||||
}
|
||||
return 0;
|
||||
case SPDK_SPC_PERSISTENT_RESERVE_OUT:
|
||||
action = cdb[1] & 0x1f;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SCSI, "CHECK: PR OUT action %u\n", action);
|
||||
SPDK_DEBUGLOG(scsi, "CHECK: PR OUT action %u\n", action);
|
||||
switch (action) {
|
||||
case SPDK_SCSI_PR_OUT_RELEASE:
|
||||
case SPDK_SCSI_PR_OUT_CLEAR:
|
||||
|
@ -256,7 +256,7 @@ spdk_sock_connect_ext(const char *ip, int port, char *_impl_name, struct spdk_so
|
||||
continue;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SOCK, "Creating a client socket using impl %s\n", impl->name);
|
||||
SPDK_DEBUGLOG(sock, "Creating a client socket using impl %s\n", impl->name);
|
||||
sock_init_opts(&opts_local, opts);
|
||||
sock = impl->connect(ip, port, &opts_local);
|
||||
if (sock != NULL) {
|
||||
@ -306,7 +306,7 @@ spdk_sock_listen_ext(const char *ip, int port, char *_impl_name, struct spdk_soc
|
||||
continue;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SOCK, "Creating a listening socket using impl %s\n", impl->name);
|
||||
SPDK_DEBUGLOG(sock, "Creating a listening socket using impl %s\n", impl->name);
|
||||
sock_init_opts(&opts_local, opts);
|
||||
sock = impl->listen(ip, port, &opts_local);
|
||||
if (sock != NULL) {
|
||||
@ -878,10 +878,10 @@ int spdk_sock_set_default_impl(const char *impl_name)
|
||||
}
|
||||
|
||||
if (g_default_impl) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SOCK, "Change the default sock impl from %s to %s\n", g_default_impl->name,
|
||||
SPDK_DEBUGLOG(sock, "Change the default sock impl from %s to %s\n", g_default_impl->name,
|
||||
impl->name);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_SOCK, "Set default sock implementation to %s\n", impl_name);
|
||||
SPDK_DEBUGLOG(sock, "Set default sock implementation to %s\n", impl_name);
|
||||
}
|
||||
|
||||
g_default_impl = impl;
|
||||
@ -889,4 +889,4 @@ int spdk_sock_set_default_impl(const char *impl_name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("sock", SPDK_LOG_SOCK)
|
||||
SPDK_LOG_REGISTER_COMPONENT(sock)
|
||||
|
@ -126,7 +126,7 @@ spdk_thread_lib_init(spdk_new_thread_fn new_thread_fn, size_t ctx_sz)
|
||||
assert(g_thread_op_fn == NULL);
|
||||
|
||||
if (new_thread_fn == NULL) {
|
||||
SPDK_INFOLOG(SPDK_LOG_THREAD, "new_thread_fn was not specified at spdk_thread_lib_init\n");
|
||||
SPDK_INFOLOG(thread, "new_thread_fn was not specified at spdk_thread_lib_init\n");
|
||||
} else {
|
||||
g_new_thread_fn = new_thread_fn;
|
||||
}
|
||||
@ -149,7 +149,7 @@ spdk_thread_lib_init_ext(spdk_thread_op_fn thread_op_fn,
|
||||
}
|
||||
|
||||
if (thread_op_fn == NULL && thread_op_supported_fn == NULL) {
|
||||
SPDK_INFOLOG(SPDK_LOG_THREAD, "thread_op_fn and thread_op_supported_fn were not specified\n");
|
||||
SPDK_INFOLOG(thread, "thread_op_fn and thread_op_supported_fn were not specified\n");
|
||||
} else {
|
||||
g_thread_op_fn = thread_op_fn;
|
||||
g_thread_op_supported_fn = thread_op_supported_fn;
|
||||
@ -301,7 +301,7 @@ spdk_thread_create(const char *name, struct spdk_cpuset *cpumask)
|
||||
g_thread_count++;
|
||||
pthread_mutex_unlock(&g_devlist_mutex);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "Allocating new thread (%" PRIu64 ", %s)\n",
|
||||
SPDK_DEBUGLOG(thread, "Allocating new thread (%" PRIu64 ", %s)\n",
|
||||
thread->id, thread->name);
|
||||
|
||||
if (g_new_thread_fn) {
|
||||
@ -340,7 +340,7 @@ thread_exit(struct spdk_thread *thread, uint64_t now)
|
||||
|
||||
TAILQ_FOREACH(poller, &thread->active_pollers, tailq) {
|
||||
if (poller->state != SPDK_POLLER_STATE_UNREGISTERED) {
|
||||
SPDK_INFOLOG(SPDK_LOG_THREAD,
|
||||
SPDK_INFOLOG(thread,
|
||||
"thread %s still has active poller %s\n",
|
||||
thread->name, poller->name);
|
||||
return;
|
||||
@ -349,7 +349,7 @@ thread_exit(struct spdk_thread *thread, uint64_t now)
|
||||
|
||||
TAILQ_FOREACH(poller, &thread->timed_pollers, tailq) {
|
||||
if (poller->state != SPDK_POLLER_STATE_UNREGISTERED) {
|
||||
SPDK_INFOLOG(SPDK_LOG_THREAD,
|
||||
SPDK_INFOLOG(thread,
|
||||
"thread %s still has active timed poller %s\n",
|
||||
thread->name, poller->name);
|
||||
return;
|
||||
@ -357,14 +357,14 @@ thread_exit(struct spdk_thread *thread, uint64_t now)
|
||||
}
|
||||
|
||||
TAILQ_FOREACH(poller, &thread->paused_pollers, tailq) {
|
||||
SPDK_INFOLOG(SPDK_LOG_THREAD,
|
||||
SPDK_INFOLOG(thread,
|
||||
"thread %s still has paused poller %s\n",
|
||||
thread->name, poller->name);
|
||||
return;
|
||||
}
|
||||
|
||||
TAILQ_FOREACH(ch, &thread->io_channels, tailq) {
|
||||
SPDK_INFOLOG(SPDK_LOG_THREAD,
|
||||
SPDK_INFOLOG(thread,
|
||||
"thread %s still has channel for io_device %s\n",
|
||||
thread->name, ch->dev->name);
|
||||
return;
|
||||
@ -377,12 +377,12 @@ exited:
|
||||
int
|
||||
spdk_thread_exit(struct spdk_thread *thread)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "Exit thread %s\n", thread->name);
|
||||
SPDK_DEBUGLOG(thread, "Exit thread %s\n", thread->name);
|
||||
|
||||
assert(tls_thread == thread);
|
||||
|
||||
if (thread->state >= SPDK_THREAD_STATE_EXITING) {
|
||||
SPDK_INFOLOG(SPDK_LOG_THREAD,
|
||||
SPDK_INFOLOG(thread,
|
||||
"thread %s is already exiting\n",
|
||||
thread->name);
|
||||
return 0;
|
||||
@ -403,7 +403,7 @@ spdk_thread_is_exited(struct spdk_thread *thread)
|
||||
void
|
||||
spdk_thread_destroy(struct spdk_thread *thread)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "Destroy thread %s\n", thread->name);
|
||||
SPDK_DEBUGLOG(thread, "Destroy thread %s\n", thread->name);
|
||||
|
||||
assert(thread->state == SPDK_THREAD_STATE_EXITED);
|
||||
|
||||
@ -610,7 +610,7 @@ thread_poll(struct spdk_thread *thread, uint32_t max_msgs, uint64_t now)
|
||||
|
||||
#ifdef DEBUG
|
||||
if (poller_rc == -1) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "Poller %s returned -1\n", poller->name);
|
||||
SPDK_DEBUGLOG(thread, "Poller %s returned -1\n", poller->name);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -654,7 +654,7 @@ thread_poll(struct spdk_thread *thread, uint32_t max_msgs, uint64_t now)
|
||||
|
||||
#ifdef DEBUG
|
||||
if (timer_rc == -1) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "Timed poller %s returned -1\n", poller->name);
|
||||
SPDK_DEBUGLOG(thread, "Timed poller %s returned -1\n", poller->name);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1108,12 +1108,12 @@ _on_thread(void *ctx)
|
||||
pthread_mutex_unlock(&g_devlist_mutex);
|
||||
|
||||
if (!ct->cur_thread) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "Completed thread iteration\n");
|
||||
SPDK_DEBUGLOG(thread, "Completed thread iteration\n");
|
||||
|
||||
rc = spdk_thread_send_msg(ct->orig_thread, ct->cpl, ct->ctx);
|
||||
free(ctx);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "Continuing thread iteration to %s\n",
|
||||
SPDK_DEBUGLOG(thread, "Continuing thread iteration to %s\n",
|
||||
ct->cur_thread->name);
|
||||
|
||||
rc = spdk_thread_send_msg(ct->cur_thread, _on_thread, ctx);
|
||||
@ -1152,7 +1152,7 @@ spdk_for_each_thread(spdk_msg_fn fn, void *ctx, spdk_msg_fn cpl)
|
||||
ct->cur_thread = TAILQ_FIRST(&g_threads);
|
||||
pthread_mutex_unlock(&g_devlist_mutex);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "Starting thread iteration from %s\n",
|
||||
SPDK_DEBUGLOG(thread, "Starting thread iteration from %s\n",
|
||||
ct->orig_thread->name);
|
||||
|
||||
rc = spdk_thread_send_msg(ct->cur_thread, _on_thread, ct);
|
||||
@ -1198,7 +1198,7 @@ spdk_io_device_register(void *io_device, spdk_io_channel_create_cb create_cb,
|
||||
dev->unregistered = false;
|
||||
dev->refcnt = 0;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "Registering io_device %s (%p) on thread %s\n",
|
||||
SPDK_DEBUGLOG(thread, "Registering io_device %s (%p) on thread %s\n",
|
||||
dev->name, dev->io_device, thread->name);
|
||||
|
||||
pthread_mutex_lock(&g_devlist_mutex);
|
||||
@ -1220,7 +1220,7 @@ _finish_unregister(void *arg)
|
||||
{
|
||||
struct io_device *dev = arg;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "Finishing unregistration of io_device %s (%p) on thread %s\n",
|
||||
SPDK_DEBUGLOG(thread, "Finishing unregistration of io_device %s (%p) on thread %s\n",
|
||||
dev->name, dev->io_device, dev->unregister_thread->name);
|
||||
|
||||
dev->unregister_cb(dev->io_device);
|
||||
@ -1236,7 +1236,7 @@ io_device_free(struct io_device *dev)
|
||||
free(dev);
|
||||
} else {
|
||||
assert(dev->unregister_thread != NULL);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "io_device %s (%p) needs to unregister from thread %s\n",
|
||||
SPDK_DEBUGLOG(thread, "io_device %s (%p) needs to unregister from thread %s\n",
|
||||
dev->name, dev->io_device, dev->unregister_thread->name);
|
||||
rc = spdk_thread_send_msg(dev->unregister_thread, _finish_unregister, dev);
|
||||
assert(rc == 0);
|
||||
@ -1285,7 +1285,7 @@ spdk_io_device_unregister(void *io_device, spdk_io_device_unregister_cb unregist
|
||||
dev->unregister_thread = thread;
|
||||
pthread_mutex_unlock(&g_devlist_mutex);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "Unregistering io_device %s (%p) from thread %s\n",
|
||||
SPDK_DEBUGLOG(thread, "Unregistering io_device %s (%p) from thread %s\n",
|
||||
dev->name, dev->io_device, thread->name);
|
||||
|
||||
if (refcnt > 0) {
|
||||
@ -1339,7 +1339,7 @@ spdk_get_io_channel(void *io_device)
|
||||
if (ch->dev == dev) {
|
||||
ch->ref++;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "Get io_channel %p for io_device %s (%p) on thread %s refcnt %u\n",
|
||||
SPDK_DEBUGLOG(thread, "Get io_channel %p for io_device %s (%p) on thread %s refcnt %u\n",
|
||||
ch, dev->name, dev->io_device, thread->name, ch->ref);
|
||||
|
||||
/*
|
||||
@ -1365,7 +1365,7 @@ spdk_get_io_channel(void *io_device)
|
||||
ch->destroy_ref = 0;
|
||||
TAILQ_INSERT_TAIL(&thread->io_channels, ch, tailq);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD, "Get io_channel %p for io_device %s (%p) on thread %s refcnt %u\n",
|
||||
SPDK_DEBUGLOG(thread, "Get io_channel %p for io_device %s (%p) on thread %s refcnt %u\n",
|
||||
ch, dev->name, dev->io_device, thread->name, ch->ref);
|
||||
|
||||
dev->refcnt++;
|
||||
@ -1399,7 +1399,7 @@ put_io_channel(void *arg)
|
||||
return;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD,
|
||||
SPDK_DEBUGLOG(thread,
|
||||
"Releasing io_channel %p for io_device %s (%p) on thread %s\n",
|
||||
ch, ch->dev->name, ch->dev->io_device, thread->name);
|
||||
|
||||
@ -1461,7 +1461,7 @@ spdk_put_io_channel(struct spdk_io_channel *ch)
|
||||
return;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_THREAD,
|
||||
SPDK_DEBUGLOG(thread,
|
||||
"Putting io_channel %p for io_device %s (%p) on thread %s refcnt %u\n",
|
||||
ch, ch->dev->name, ch->dev->io_device, thread->name, ch->ref);
|
||||
|
||||
@ -1639,4 +1639,4 @@ end:
|
||||
}
|
||||
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("thread", SPDK_LOG_THREAD)
|
||||
SPDK_LOG_REGISTER_COMPONENT(thread)
|
||||
|
@ -41,7 +41,7 @@
|
||||
struct spdk_trace_flags *g_trace_flags = NULL;
|
||||
static struct spdk_trace_register_fn *g_reg_fn_head = NULL;
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("trace", SPDK_LOG_TRACE)
|
||||
SPDK_LOG_REGISTER_COMPONENT(trace)
|
||||
|
||||
uint64_t
|
||||
spdk_trace_get_tpoint_mask(uint32_t group_id)
|
||||
|
@ -59,12 +59,12 @@ rpc_trace_enable_tpoint_group(struct spdk_jsonrpc_request *request,
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_tpoint_group_decoders,
|
||||
SPDK_COUNTOF(rpc_tpoint_group_decoders), &req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_TRACE, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(trace, "spdk_json_decode_object failed\n");
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
if (req.name == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_TRACE, "flag was NULL\n");
|
||||
SPDK_DEBUGLOG(trace, "flag was NULL\n");
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
@ -96,12 +96,12 @@ rpc_trace_disable_tpoint_group(struct spdk_jsonrpc_request *request,
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_tpoint_group_decoders,
|
||||
SPDK_COUNTOF(rpc_tpoint_group_decoders), &req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_TRACE, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(trace, "spdk_json_decode_object failed\n");
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
if (req.name == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_TRACE, "flag was NULL\n");
|
||||
SPDK_DEBUGLOG(trace, "flag was NULL\n");
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ vhost_session_mem_register(struct rte_vhost_memory *mem)
|
||||
|
||||
for (i = 0; i < mem->nregions; i++) {
|
||||
vhost_session_mem_region_calc(&previous_start, &start, &end, &len, &mem->regions[i]);
|
||||
SPDK_INFOLOG(SPDK_LOG_VHOST, "Registering VM memory for vtophys translation - 0x%jx len:0x%jx\n",
|
||||
SPDK_INFOLOG(vhost, "Registering VM memory for vtophys translation - 0x%jx len:0x%jx\n",
|
||||
start, len);
|
||||
|
||||
if (spdk_mem_register((void *)start, len) != 0) {
|
||||
|
@ -202,7 +202,7 @@ vhost_vq_avail_ring_get(struct spdk_vhost_virtqueue *virtqueue, uint16_t *reqs,
|
||||
reqs[i] = vring->avail->ring[(last_idx + i) & size_mask];
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_RING,
|
||||
SPDK_DEBUGLOG(vhost_ring,
|
||||
"AVAIL: last_idx=%"PRIu16" avail_idx=%"PRIu16" count=%"PRIu16"\n",
|
||||
last_idx, avail_idx, count);
|
||||
|
||||
@ -290,7 +290,7 @@ vhost_vq_used_signal(struct spdk_vhost_session *vsession,
|
||||
virtqueue->req_cnt += virtqueue->used_req_cnt;
|
||||
virtqueue->used_req_cnt = 0;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_RING,
|
||||
SPDK_DEBUGLOG(vhost_ring,
|
||||
"Queue %td - USED RING: sending IRQ: last used %"PRIu16"\n",
|
||||
virtqueue - vsession->virtqueue, virtqueue->last_used_idx);
|
||||
|
||||
@ -472,7 +472,7 @@ vhost_vq_used_ring_enqueue(struct spdk_vhost_session *vsession,
|
||||
uint16_t last_idx = virtqueue->last_used_idx & (vring->size - 1);
|
||||
uint16_t vq_idx = virtqueue->vring_idx;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_RING,
|
||||
SPDK_DEBUGLOG(vhost_ring,
|
||||
"Queue %td - USED RING: last_idx=%"PRIu16" req id=%"PRIu16" len=%"PRIu32"\n",
|
||||
virtqueue - vsession->virtqueue, virtqueue->last_used_idx, id, len);
|
||||
|
||||
@ -505,7 +505,7 @@ vhost_vq_packed_ring_enqueue(struct spdk_vhost_session *vsession,
|
||||
struct vring_packed_desc *desc = &virtqueue->vring.desc_packed[virtqueue->last_used_idx];
|
||||
bool used, avail;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_RING,
|
||||
SPDK_DEBUGLOG(vhost_ring,
|
||||
"Queue %td - RING: buffer_id=%"PRIu16"\n",
|
||||
virtqueue - vsession->virtqueue, buffer_id);
|
||||
|
||||
@ -892,7 +892,7 @@ vhost_dev_register(struct spdk_vhost_dev *vdev, const char *name, const char *ma
|
||||
|
||||
TAILQ_INSERT_TAIL(&g_vhost_devices, vdev, tailq);
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VHOST, "Controller %s: new controller added\n", vdev->name);
|
||||
SPDK_INFOLOG(vhost, "Controller %s: new controller added\n", vdev->name);
|
||||
return 0;
|
||||
|
||||
out:
|
||||
@ -916,7 +916,7 @@ vhost_dev_unregister(struct spdk_vhost_dev *vdev)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VHOST, "Controller %s: removed\n", vdev->name);
|
||||
SPDK_INFOLOG(vhost, "Controller %s: removed\n", vdev->name);
|
||||
|
||||
spdk_thread_send_msg(vdev->thread, vhost_dev_thread_exit, NULL);
|
||||
|
||||
@ -1570,7 +1570,7 @@ session_shutdown(void *arg)
|
||||
vdev->registered = false;
|
||||
}
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VHOST, "Exiting\n");
|
||||
SPDK_INFOLOG(vhost, "Exiting\n");
|
||||
spdk_thread_send_msg(g_vhost_init_thread, vhost_fini, NULL);
|
||||
return NULL;
|
||||
}
|
||||
@ -1630,5 +1630,5 @@ spdk_vhost_config_json(struct spdk_json_write_ctx *w)
|
||||
spdk_json_write_array_end(w);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vhost", SPDK_LOG_VHOST)
|
||||
SPDK_LOG_REGISTER_COMPONENT("vhost_ring", SPDK_LOG_VHOST_RING)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vhost)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vhost_ring)
|
||||
|
@ -155,7 +155,7 @@ invalid_blk_request(struct spdk_vhost_blk_task *task, uint8_t status)
|
||||
|
||||
blk_task_enqueue(task);
|
||||
blk_task_finish(task);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK_DATA, "Invalid request (status=%" PRIu8")\n", status);
|
||||
SPDK_DEBUGLOG(vhost_blk_data, "Invalid request (status=%" PRIu8")\n", status);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -191,13 +191,13 @@ blk_iovs_split_queue_setup(struct spdk_vhost_blk_session *bvsession,
|
||||
* Should not happen if request is well formatted, otherwise this is a BUG.
|
||||
*/
|
||||
if (spdk_unlikely(cnt == *iovs_cnt)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "%s: max IOVs in request reached (req_idx = %"PRIu16").\n",
|
||||
SPDK_DEBUGLOG(vhost_blk, "%s: max IOVs in request reached (req_idx = %"PRIu16").\n",
|
||||
vsession->name, req_idx);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (spdk_unlikely(vhost_vring_desc_to_iov(vsession, iovs, &cnt, desc))) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "%s: invalid descriptor %" PRIu16" (req_idx = %"PRIu16").\n",
|
||||
SPDK_DEBUGLOG(vhost_blk, "%s: invalid descriptor %" PRIu16" (req_idx = %"PRIu16").\n",
|
||||
vsession->name, req_idx, cnt);
|
||||
return -1;
|
||||
}
|
||||
@ -310,7 +310,7 @@ blk_request_finish(bool success, struct spdk_vhost_blk_task *task)
|
||||
|
||||
blk_task_enqueue(task);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "Finished task (%p) req_idx=%d\n status: %s\n", task,
|
||||
SPDK_DEBUGLOG(vhost_blk, "Finished task (%p) req_idx=%d\n status: %s\n", task,
|
||||
task->req_idx, success ? "OK" : "FAIL");
|
||||
blk_task_finish(task);
|
||||
}
|
||||
@ -334,9 +334,9 @@ blk_request_resubmit(void *arg)
|
||||
|
||||
rc = process_blk_request(task, task->bvsession, task->vq);
|
||||
if (rc == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "====== Task %p resubmitted ======\n", task);
|
||||
SPDK_DEBUGLOG(vhost_blk, "====== Task %p resubmitted ======\n", task);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "====== Task %p failed ======\n", task);
|
||||
SPDK_DEBUGLOG(vhost_blk, "====== Task %p failed ======\n", task);
|
||||
}
|
||||
}
|
||||
|
||||
@ -381,7 +381,7 @@ process_blk_request(struct spdk_vhost_blk_task *task,
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "Invalid request (req_idx = %"PRIu16").\n", task->req_idx);
|
||||
SPDK_DEBUGLOG(vhost_blk, "Invalid request (req_idx = %"PRIu16").\n", task->req_idx);
|
||||
/* Only READ and WRITE are supported for now. */
|
||||
invalid_blk_request(task, VIRTIO_BLK_S_UNSUPP);
|
||||
return -1;
|
||||
@ -389,7 +389,7 @@ process_blk_request(struct spdk_vhost_blk_task *task,
|
||||
|
||||
iov = &task->iovs[0];
|
||||
if (spdk_unlikely(iov->iov_len != sizeof(*req))) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK,
|
||||
SPDK_DEBUGLOG(vhost_blk,
|
||||
"First descriptor size is %zu but expected %zu (req_idx = %"PRIu16").\n",
|
||||
iov->iov_len, sizeof(*req), task->req_idx);
|
||||
invalid_blk_request(task, VIRTIO_BLK_S_UNSUPP);
|
||||
@ -400,7 +400,7 @@ process_blk_request(struct spdk_vhost_blk_task *task,
|
||||
|
||||
iov = &task->iovs[task->iovcnt - 1];
|
||||
if (spdk_unlikely(iov->iov_len != 1)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK,
|
||||
SPDK_DEBUGLOG(vhost_blk,
|
||||
"Last descriptor size is %zu but expected %d (req_idx = %"PRIu16").\n",
|
||||
iov->iov_len, 1, task->req_idx);
|
||||
invalid_blk_request(task, VIRTIO_BLK_S_UNSUPP);
|
||||
@ -438,13 +438,13 @@ process_blk_request(struct spdk_vhost_blk_task *task,
|
||||
&task->iovs[1], task->iovcnt, req->sector * 512,
|
||||
payload_len, blk_request_complete_cb, task);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "Device is in read-only mode!\n");
|
||||
SPDK_DEBUGLOG(vhost_blk, "Device is in read-only mode!\n");
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "No memory, start to queue io.\n");
|
||||
SPDK_DEBUGLOG(vhost_blk, "No memory, start to queue io.\n");
|
||||
blk_request_queue_io(task);
|
||||
} else {
|
||||
invalid_blk_request(task, VIRTIO_BLK_S_IOERR);
|
||||
@ -465,7 +465,7 @@ process_blk_request(struct spdk_vhost_blk_task *task,
|
||||
blk_request_complete_cb, task);
|
||||
if (rc) {
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "No memory, start to queue io.\n");
|
||||
SPDK_DEBUGLOG(vhost_blk, "No memory, start to queue io.\n");
|
||||
blk_request_queue_io(task);
|
||||
} else {
|
||||
invalid_blk_request(task, VIRTIO_BLK_S_IOERR);
|
||||
@ -493,7 +493,7 @@ process_blk_request(struct spdk_vhost_blk_task *task,
|
||||
blk_request_complete_cb, task);
|
||||
if (rc) {
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "No memory, start to queue io.\n");
|
||||
SPDK_DEBUGLOG(vhost_blk, "No memory, start to queue io.\n");
|
||||
blk_request_queue_io(task);
|
||||
} else {
|
||||
invalid_blk_request(task, VIRTIO_BLK_S_IOERR);
|
||||
@ -513,7 +513,7 @@ process_blk_request(struct spdk_vhost_blk_task *task,
|
||||
blk_request_complete_cb, task);
|
||||
if (rc) {
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "No memory, start to queue io.\n");
|
||||
SPDK_DEBUGLOG(vhost_blk, "No memory, start to queue io.\n");
|
||||
blk_request_queue_io(task);
|
||||
} else {
|
||||
invalid_blk_request(task, VIRTIO_BLK_S_IOERR);
|
||||
@ -532,7 +532,7 @@ process_blk_request(struct spdk_vhost_blk_task *task,
|
||||
blk_request_finish(true, task);
|
||||
break;
|
||||
default:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "Not supported request type '%"PRIu32"'.\n", type);
|
||||
SPDK_DEBUGLOG(vhost_blk, "Not supported request type '%"PRIu32"'.\n", type);
|
||||
invalid_blk_request(task, VIRTIO_BLK_S_UNSUPP);
|
||||
return -1;
|
||||
}
|
||||
@ -583,7 +583,7 @@ process_blk_task(struct spdk_vhost_virtqueue *vq, uint16_t req_idx)
|
||||
blk_task_init(task);
|
||||
|
||||
if (process_blk_request(task, task->bvsession, vq) == 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "====== Task %p req_idx %d submitted ======\n", task,
|
||||
SPDK_DEBUGLOG(vhost_blk, "====== Task %p req_idx %d submitted ======\n", task,
|
||||
task_idx);
|
||||
} else {
|
||||
SPDK_ERRLOG("====== Task %p req_idx %d failed ======\n", task, task_idx);
|
||||
@ -606,7 +606,7 @@ submit_inflight_desc(struct spdk_vhost_blk_session *bvsession,
|
||||
resubmit_list = resubmit->resubmit_list;
|
||||
while (resubmit->resubmit_num-- > 0) {
|
||||
req_idx = resubmit_list[resubmit->resubmit_num].index;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "====== Start processing request idx %"PRIu16"======\n",
|
||||
SPDK_DEBUGLOG(vhost_blk, "====== Start processing request idx %"PRIu16"======\n",
|
||||
req_idx);
|
||||
|
||||
if (spdk_unlikely(req_idx >= vq->vring.size)) {
|
||||
@ -638,7 +638,7 @@ process_vq(struct spdk_vhost_blk_session *bvsession, struct spdk_vhost_virtqueue
|
||||
}
|
||||
|
||||
for (i = 0; i < reqs_cnt; i++) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "====== Starting processing request idx %"PRIu16"======\n",
|
||||
SPDK_DEBUGLOG(vhost_blk, "====== Starting processing request idx %"PRIu16"======\n",
|
||||
reqs[i]);
|
||||
|
||||
if (spdk_unlikely(reqs[i] >= vq->vring.size)) {
|
||||
@ -661,7 +661,7 @@ process_packed_vq(struct spdk_vhost_blk_session *bvsession, struct spdk_vhost_vi
|
||||
|
||||
while (i++ < SPDK_VHOST_VQ_MAX_SUBMISSIONS &&
|
||||
vhost_vq_packed_ring_is_avail(vq)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "====== Starting processing request idx %"PRIu16"======\n",
|
||||
SPDK_DEBUGLOG(vhost_blk, "====== Starting processing request idx %"PRIu16"======\n",
|
||||
vq->last_avail_idx);
|
||||
|
||||
process_blk_task(vq, vq->last_avail_idx);
|
||||
@ -707,7 +707,7 @@ no_bdev_process_vq(struct spdk_vhost_blk_session *bvsession, struct spdk_vhost_v
|
||||
iovcnt = SPDK_COUNTOF(iovs);
|
||||
if (blk_iovs_split_queue_setup(bvsession, vq, req_idx, iovs, &iovcnt, &length) == 0) {
|
||||
*(volatile uint8_t *)iovs[iovcnt - 1].iov_base = VIRTIO_BLK_S_IOERR;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK_DATA, "Aborting request %" PRIu16"\n", req_idx);
|
||||
SPDK_DEBUGLOG(vhost_blk_data, "Aborting request %" PRIu16"\n", req_idx);
|
||||
}
|
||||
|
||||
vhost_vq_used_ring_enqueue(vsession, vq, req_idx, 0);
|
||||
@ -744,7 +744,7 @@ no_bdev_process_packed_vq(struct spdk_vhost_blk_session *bvsession, struct spdk_
|
||||
if (blk_iovs_packed_queue_setup(bvsession, vq, task->req_idx, task->iovs, &task->iovcnt,
|
||||
&length)) {
|
||||
*(volatile uint8_t *)(task->iovs[task->iovcnt - 1].iov_base) = VIRTIO_BLK_S_IOERR;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK_DATA, "Aborting request %" PRIu16"\n", req_idx);
|
||||
SPDK_DEBUGLOG(vhost_blk_data, "Aborting request %" PRIu16"\n", req_idx);
|
||||
}
|
||||
|
||||
task->used = false;
|
||||
@ -876,7 +876,7 @@ static void
|
||||
bdev_event_cb(enum spdk_bdev_event_type type, struct spdk_bdev *bdev,
|
||||
void *event_ctx)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_BLK, "Bdev event: type %d, name %s\n",
|
||||
SPDK_DEBUGLOG(vhost_blk, "Bdev event: type %d, name %s\n",
|
||||
type,
|
||||
bdev->name);
|
||||
|
||||
@ -1000,7 +1000,7 @@ vhost_blk_start_cb(struct spdk_vhost_dev *vdev,
|
||||
|
||||
bvsession->requestq_poller = SPDK_POLLER_REGISTER(bvdev->bdev ? vdev_worker : no_bdev_vdev_worker,
|
||||
bvsession, 0);
|
||||
SPDK_INFOLOG(SPDK_LOG_VHOST, "%s: started poller on lcore %d\n",
|
||||
SPDK_INFOLOG(vhost, "%s: started poller on lcore %d\n",
|
||||
vsession->name, spdk_env_get_current_core());
|
||||
out:
|
||||
vhost_session_start_done(vsession, rc);
|
||||
@ -1034,7 +1034,7 @@ destroy_session_poller_cb(void *arg)
|
||||
vhost_vq_used_signal(vsession, &vsession->virtqueue[i]);
|
||||
}
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VHOST, "%s: stopping poller on lcore %d\n",
|
||||
SPDK_INFOLOG(vhost, "%s: stopping poller on lcore %d\n",
|
||||
vsession->name, spdk_env_get_current_core());
|
||||
|
||||
if (bvsession->io_channel) {
|
||||
@ -1313,7 +1313,7 @@ spdk_vhost_blk_construct(const char *name, const char *cpumask, const char *dev_
|
||||
goto out;
|
||||
}
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VHOST, "%s: using bdev '%s'\n", name, dev_name);
|
||||
SPDK_INFOLOG(vhost, "%s: using bdev '%s'\n", name, dev_name);
|
||||
out:
|
||||
if (ret != 0 && bvdev) {
|
||||
free(bvdev);
|
||||
@ -1350,5 +1350,5 @@ vhost_blk_destroy(struct spdk_vhost_dev *vdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vhost_blk", SPDK_LOG_VHOST_BLK)
|
||||
SPDK_LOG_REGISTER_COMPONENT("vhost_blk_data", SPDK_LOG_VHOST_BLK_DATA)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vhost_blk)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vhost_blk_data)
|
||||
|
@ -407,7 +407,7 @@ vhost_nvme_resubmit_task(void *arg)
|
||||
|
||||
rc = nvme_process_sq(task->nvme, task->sq, task);
|
||||
if (rc) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_NVME, "vhost_nvme: task resubmit failed, rc = %d.\n", rc);
|
||||
SPDK_DEBUGLOG(vhost_nvme, "vhost_nvme: task resubmit failed, rc = %d.\n", rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -482,7 +482,7 @@ nvme_process_sq(struct spdk_vhost_nvme_dev *nvme, struct spdk_vhost_nvme_sq *sq,
|
||||
if (cmd->opc == SPDK_NVME_OPC_READ || cmd->opc == SPDK_NVME_OPC_WRITE ||
|
||||
cmd->opc == SPDK_NVME_OPC_DATASET_MANAGEMENT) {
|
||||
if (cmd->psdt != SPDK_NVME_PSDT_PRP) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_NVME, "Invalid PSDT %u%ub in command\n",
|
||||
SPDK_DEBUGLOG(vhost_nvme, "Invalid PSDT %u%ub in command\n",
|
||||
cmd->psdt >> 1, cmd->psdt & 1u);
|
||||
task->dnr = 1;
|
||||
task->sct = SPDK_NVME_SCT_GENERIC;
|
||||
@ -555,7 +555,7 @@ nvme_process_sq(struct spdk_vhost_nvme_dev *nvme, struct spdk_vhost_nvme_sq *sq,
|
||||
|
||||
if (spdk_unlikely(ret)) {
|
||||
if (ret == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_NVME, "No memory, start to queue io.\n");
|
||||
SPDK_DEBUGLOG(vhost_nvme, "No memory, start to queue io.\n");
|
||||
task->sq = sq;
|
||||
ret = vhost_nvme_queue_task(task);
|
||||
} else {
|
||||
@ -709,7 +709,7 @@ vhost_nvme_create_io_sq(struct spdk_vhost_nvme_dev *nvme,
|
||||
sq = vhost_nvme_get_sq_from_qid(nvme, qid);
|
||||
cq = vhost_nvme_get_cq_from_qid(nvme, cqid);
|
||||
if (!sq || !cq) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_NVME, "User requested invalid QID %u or CQID %u\n",
|
||||
SPDK_DEBUGLOG(vhost_nvme, "User requested invalid QID %u or CQID %u\n",
|
||||
qid, cqid);
|
||||
cpl->status.sct = SPDK_NVME_SCT_COMMAND_SPECIFIC;
|
||||
cpl->status.sc = SPDK_NVME_SC_INVALID_QUEUE_IDENTIFIER;
|
||||
@ -789,7 +789,7 @@ vhost_nvme_create_io_cq(struct spdk_vhost_nvme_dev *nvme,
|
||||
|
||||
cq = vhost_nvme_get_cq_from_qid(nvme, qid);
|
||||
if (!cq) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_NVME, "User requested invalid QID %u\n", qid);
|
||||
SPDK_DEBUGLOG(vhost_nvme, "User requested invalid QID %u\n", qid);
|
||||
cpl->status.sct = SPDK_NVME_SCT_COMMAND_SPECIFIC;
|
||||
cpl->status.sc = SPDK_NVME_SC_INVALID_QUEUE_IDENTIFIER;
|
||||
return -1;
|
||||
@ -890,7 +890,7 @@ vhost_nvme_admin_passthrough(int vid, void *cmd, void *cqe, void *buf)
|
||||
return -1;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_NVME, "Admin Command Opcode %u\n", req->opc);
|
||||
SPDK_DEBUGLOG(vhost_nvme, "Admin Command Opcode %u\n", req->opc);
|
||||
switch (req->opc) {
|
||||
case SPDK_NVME_OPC_IDENTIFY:
|
||||
if (req->cdw10 == SPDK_NVME_IDENTIFY_CTRLR) {
|
||||
@ -1108,7 +1108,7 @@ destroy_device_poller_cb(void *arg)
|
||||
struct spdk_vhost_nvme_ns *ns_dev;
|
||||
uint32_t i;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_NVME, "Destroy device poller callback\n");
|
||||
SPDK_DEBUGLOG(vhost_nvme, "Destroy device poller callback\n");
|
||||
|
||||
/* FIXME wait for pending I/Os to complete */
|
||||
|
||||
@ -1497,4 +1497,4 @@ vhost_nvme_controller_construct(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vhost_nvme", SPDK_LOG_VHOST_NVME)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vhost_nvme)
|
||||
|
@ -72,7 +72,7 @@ rpc_vhost_create_scsi_controller(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_vhost_create_scsi_ctrlr,
|
||||
SPDK_COUNTOF(rpc_vhost_create_scsi_ctrlr),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(vhost_rpc, "spdk_json_decode_object failed\n");
|
||||
rc = -EINVAL;
|
||||
goto invalid;
|
||||
}
|
||||
@ -129,7 +129,7 @@ rpc_vhost_scsi_controller_add_target(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_vhost_scsi_ctrlr_add_target,
|
||||
SPDK_COUNTOF(rpc_vhost_scsi_ctrlr_add_target),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(vhost_rpc, "spdk_json_decode_object failed\n");
|
||||
rc = -EINVAL;
|
||||
goto invalid;
|
||||
}
|
||||
@ -203,7 +203,7 @@ rpc_vhost_scsi_controller_remove_target(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_vhost_remove_target,
|
||||
SPDK_COUNTOF(rpc_vhost_remove_target),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(vhost_rpc, "spdk_json_decode_object failed\n");
|
||||
rc = -EINVAL;
|
||||
goto invalid;
|
||||
}
|
||||
@ -272,7 +272,7 @@ rpc_vhost_create_blk_controller(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_construct_vhost_blk_ctrlr,
|
||||
SPDK_COUNTOF(rpc_construct_vhost_blk_ctrlr),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(vhost_rpc, "spdk_json_decode_object failed\n");
|
||||
rc = -EINVAL;
|
||||
goto invalid;
|
||||
}
|
||||
@ -325,7 +325,7 @@ rpc_vhost_delete_controller(struct spdk_jsonrpc_request *request,
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_delete_vhost_ctrlr_decoder,
|
||||
SPDK_COUNTOF(rpc_delete_vhost_ctrlr_decoder), &req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(vhost_rpc, "spdk_json_decode_object failed\n");
|
||||
rc = -EINVAL;
|
||||
goto invalid;
|
||||
}
|
||||
@ -490,7 +490,7 @@ rpc_vhost_controller_set_coalescing(struct spdk_jsonrpc_request *request,
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_set_vhost_ctrlr_coalescing,
|
||||
SPDK_COUNTOF(rpc_set_vhost_ctrlr_coalescing), &req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(vhost_rpc, "spdk_json_decode_object failed\n");
|
||||
rc = -EINVAL;
|
||||
goto invalid;
|
||||
}
|
||||
@ -613,7 +613,7 @@ rpc_vhost_nvme_controller_add_ns(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_vhost_nvme_add_ns,
|
||||
SPDK_COUNTOF(rpc_vhost_nvme_add_ns),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(vhost_rpc, "spdk_json_decode_object failed\n");
|
||||
rc = -EINVAL;
|
||||
goto invalid;
|
||||
}
|
||||
@ -649,4 +649,4 @@ SPDK_RPC_REGISTER_ALIAS_DEPRECATED(vhost_nvme_controller_add_ns, add_vhost_nvme_
|
||||
|
||||
#endif /* SPDK_CONFIG_VHOST_INTERNAL_LIB */
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vhost_rpc", SPDK_LOG_VHOST_RPC)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vhost_rpc)
|
||||
|
@ -206,7 +206,7 @@ remove_scsi_tgt(struct spdk_vhost_scsi_dev *svdev,
|
||||
state->remove_cb(&svdev->vdev, state->remove_ctx);
|
||||
state->remove_cb = NULL;
|
||||
}
|
||||
SPDK_INFOLOG(SPDK_LOG_VHOST, "%s: removed target 'Target %u'\n",
|
||||
SPDK_INFOLOG(vhost, "%s: removed target 'Target %u'\n",
|
||||
svdev->vdev.name, scsi_tgt_num);
|
||||
|
||||
if (--svdev->ref == 0 && svdev->registered == false) {
|
||||
@ -340,7 +340,7 @@ submit_completion(struct spdk_vhost_scsi_task *task)
|
||||
|
||||
vhost_vq_used_ring_enqueue(vsession, task->vq, task->req_idx,
|
||||
task->used_len);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI, "Finished task (%p) req_idx=%d\n", task, task->req_idx);
|
||||
SPDK_DEBUGLOG(vhost_scsi, "Finished task (%p) req_idx=%d\n", task, task->req_idx);
|
||||
|
||||
vhost_scsi_task_put(task);
|
||||
}
|
||||
@ -366,7 +366,7 @@ vhost_scsi_task_cpl(struct spdk_scsi_task *scsi_task)
|
||||
if (task->scsi.status != SPDK_SCSI_STATUS_GOOD) {
|
||||
memcpy(task->resp->sense, task->scsi.sense_data, task->scsi.sense_data_len);
|
||||
task->resp->sense_len = task->scsi.sense_data_len;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI, "Task (%p) req_idx=%d failed - status=%u\n", task, task->req_idx,
|
||||
SPDK_DEBUGLOG(vhost_scsi, "Task (%p) req_idx=%d failed - status=%u\n", task, task->req_idx,
|
||||
task->scsi.status);
|
||||
}
|
||||
assert(task->scsi.transfer_len == task->scsi.length);
|
||||
@ -399,7 +399,7 @@ invalid_request(struct spdk_vhost_scsi_task *task)
|
||||
task->used_len);
|
||||
vhost_scsi_task_put(task);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI, "Invalid request (status=%" PRIu8")\n",
|
||||
SPDK_DEBUGLOG(vhost_scsi, "Invalid request (status=%" PRIu8")\n",
|
||||
task->resp ? task->resp->response : -1);
|
||||
}
|
||||
|
||||
@ -410,7 +410,7 @@ vhost_scsi_task_init_target(struct spdk_vhost_scsi_task *task, const __u8 *lun)
|
||||
struct spdk_scsi_dev_session_state *state;
|
||||
uint16_t lun_id = (((uint16_t)lun[2] << 8) | lun[3]) & 0x3FFF;
|
||||
|
||||
SPDK_LOGDUMP(SPDK_LOG_VHOST_SCSI_QUEUE, "LUN", lun, 8);
|
||||
SPDK_LOGDUMP(vhost_scsi_queue, "LUN", lun, 8);
|
||||
|
||||
/* First byte must be 1 and second is target */
|
||||
if (lun[0] != 1 || lun[1] >= SPDK_VHOST_SCSI_CTRLR_MAX_DEVS) {
|
||||
@ -457,11 +457,11 @@ process_ctrl_request(struct spdk_vhost_scsi_task *task)
|
||||
goto out;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI_QUEUE,
|
||||
SPDK_DEBUGLOG(vhost_scsi_queue,
|
||||
"Processing controlq descriptor: desc %d/%p, desc_addr %p, len %d, flags %d, last_used_idx %d; kickfd %d; size %d\n",
|
||||
task->req_idx, desc, (void *)desc->addr, desc->len, desc->flags, task->vq->last_used_idx,
|
||||
task->vq->vring.kickfd, task->vq->vring.size);
|
||||
SPDK_LOGDUMP(SPDK_LOG_VHOST_SCSI_QUEUE, "Request descriptor", (uint8_t *)ctrl_req, desc->len);
|
||||
SPDK_LOGDUMP(vhost_scsi_queue, "Request descriptor", (uint8_t *)ctrl_req, desc->len);
|
||||
|
||||
vhost_scsi_task_init_target(task, ctrl_req->lun);
|
||||
|
||||
@ -491,14 +491,14 @@ process_ctrl_request(struct spdk_vhost_scsi_task *task)
|
||||
switch (ctrl_req->subtype) {
|
||||
case VIRTIO_SCSI_T_TMF_LOGICAL_UNIT_RESET:
|
||||
/* Handle LUN reset */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI_QUEUE, "%s: LUN reset\n", vsession->name);
|
||||
SPDK_DEBUGLOG(vhost_scsi_queue, "%s: LUN reset\n", vsession->name);
|
||||
|
||||
mgmt_task_submit(task, SPDK_SCSI_TASK_FUNC_LUN_RESET);
|
||||
return;
|
||||
default:
|
||||
task->tmf_resp->response = VIRTIO_SCSI_S_ABORTED;
|
||||
/* Unsupported command */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI_QUEUE, "%s: unsupported TMF command %x\n",
|
||||
SPDK_DEBUGLOG(vhost_scsi_queue, "%s: unsupported TMF command %x\n",
|
||||
vsession->name, ctrl_req->subtype);
|
||||
break;
|
||||
}
|
||||
@ -516,7 +516,7 @@ process_ctrl_request(struct spdk_vhost_scsi_task *task)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI_QUEUE, "%s: Unsupported control command %x\n",
|
||||
SPDK_DEBUGLOG(vhost_scsi_queue, "%s: Unsupported control command %x\n",
|
||||
vsession->name, ctrl_req->type);
|
||||
break;
|
||||
}
|
||||
@ -594,9 +594,9 @@ task_data_setup(struct spdk_vhost_scsi_task *task,
|
||||
/*
|
||||
* TEST UNIT READY command and some others might not contain any payload and this is not an error.
|
||||
*/
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI_DATA,
|
||||
SPDK_DEBUGLOG(vhost_scsi_data,
|
||||
"No payload descriptors for FROM DEV command req_idx=%"PRIu16".\n", task->req_idx);
|
||||
SPDK_LOGDUMP(SPDK_LOG_VHOST_SCSI_DATA, "CDB=", (*req)->cdb, VIRTIO_SCSI_CDB_SIZE);
|
||||
SPDK_LOGDUMP(vhost_scsi_data, "CDB=", (*req)->cdb, VIRTIO_SCSI_CDB_SIZE);
|
||||
task->used_len = sizeof(struct virtio_scsi_cmd_resp);
|
||||
task->scsi.iovcnt = 1;
|
||||
task->scsi.iovs[0].iov_len = 0;
|
||||
@ -628,7 +628,7 @@ task_data_setup(struct spdk_vhost_scsi_task *task,
|
||||
|
||||
task->used_len = sizeof(struct virtio_scsi_cmd_resp) + len;
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI_DATA, "TO DEV");
|
||||
SPDK_DEBUGLOG(vhost_scsi_data, "TO DEV");
|
||||
/*
|
||||
* TO_DEV (WRITE):[RD_req][RD_buf0]...[RD_bufN][WR_resp]
|
||||
* No need to check descriptor WR flag as this is done while setting scsi.dxfer_dir.
|
||||
@ -664,7 +664,7 @@ task_data_setup(struct spdk_vhost_scsi_task *task,
|
||||
return 0;
|
||||
|
||||
invalid_task:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI_DATA, "%s: Invalid task at index %"PRIu16".\n",
|
||||
SPDK_DEBUGLOG(vhost_scsi_data, "%s: Invalid task at index %"PRIu16".\n",
|
||||
vsession->name, task->req_idx);
|
||||
return -1;
|
||||
}
|
||||
@ -687,7 +687,7 @@ process_request(struct spdk_vhost_scsi_task *task)
|
||||
}
|
||||
|
||||
task->scsi.cdb = req->cdb;
|
||||
SPDK_LOGDUMP(SPDK_LOG_VHOST_SCSI_DATA, "request CDB", req->cdb, VIRTIO_SCSI_CDB_SIZE);
|
||||
SPDK_LOGDUMP(vhost_scsi_data, "request CDB", req->cdb, VIRTIO_SCSI_CDB_SIZE);
|
||||
|
||||
if (spdk_unlikely(task->scsi.lun == NULL)) {
|
||||
spdk_scsi_task_process_null_lun(&task->scsi);
|
||||
@ -723,15 +723,15 @@ process_scsi_task(struct spdk_vhost_session *vsession,
|
||||
result = process_request(task);
|
||||
if (likely(result == 0)) {
|
||||
task_submit(task);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI, "====== Task %p req_idx %d submitted ======\n", task,
|
||||
SPDK_DEBUGLOG(vhost_scsi, "====== Task %p req_idx %d submitted ======\n", task,
|
||||
task->req_idx);
|
||||
} else if (result > 0) {
|
||||
vhost_scsi_task_cpl(&task->scsi);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI, "====== Task %p req_idx %d finished early ======\n", task,
|
||||
SPDK_DEBUGLOG(vhost_scsi, "====== Task %p req_idx %d finished early ======\n", task,
|
||||
task->req_idx);
|
||||
} else {
|
||||
invalid_request(task);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI, "====== Task %p req_idx %d failed ======\n", task,
|
||||
SPDK_DEBUGLOG(vhost_scsi, "====== Task %p req_idx %d failed ======\n", task,
|
||||
task->req_idx);
|
||||
}
|
||||
}
|
||||
@ -753,7 +753,7 @@ submit_inflight_desc(struct spdk_vhost_scsi_session *svsession,
|
||||
resubmit_list = resubmit->resubmit_list;
|
||||
while (resubmit->resubmit_num-- > 0) {
|
||||
req_idx = resubmit_list[resubmit->resubmit_num].index;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI, "====== Start processing request idx %"PRIu16"======\n",
|
||||
SPDK_DEBUGLOG(vhost_scsi, "====== Start processing request idx %"PRIu16"======\n",
|
||||
req_idx);
|
||||
|
||||
if (spdk_unlikely(req_idx >= vq->vring.size)) {
|
||||
@ -785,7 +785,7 @@ process_vq(struct spdk_vhost_scsi_session *svsession, struct spdk_vhost_virtqueu
|
||||
assert(reqs_cnt <= 32);
|
||||
|
||||
for (i = 0; i < reqs_cnt; i++) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI, "====== Starting processing request idx %"PRIu16"======\n",
|
||||
SPDK_DEBUGLOG(vhost_scsi, "====== Starting processing request idx %"PRIu16"======\n",
|
||||
reqs[i]);
|
||||
|
||||
if (spdk_unlikely(reqs[i] >= vq->vring.size)) {
|
||||
@ -1119,7 +1119,7 @@ spdk_vhost_scsi_dev_add_tgt(struct spdk_vhost_dev *vdev, int scsi_tgt_num,
|
||||
}
|
||||
spdk_scsi_dev_add_port(state->dev, 0, "vhost");
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VHOST, "%s: added SCSI target %u using bdev '%s'\n",
|
||||
SPDK_INFOLOG(vhost, "%s: added SCSI target %u using bdev '%s'\n",
|
||||
vdev->name, scsi_tgt_num, bdev_name);
|
||||
|
||||
vhost_dev_foreach_session(vdev, vhost_scsi_session_add_tgt,
|
||||
@ -1473,7 +1473,7 @@ vhost_scsi_start_cb(struct spdk_vhost_dev *vdev,
|
||||
continue;
|
||||
}
|
||||
}
|
||||
SPDK_INFOLOG(SPDK_LOG_VHOST, "%s: started poller on lcore %d\n",
|
||||
SPDK_INFOLOG(vhost, "%s: started poller on lcore %d\n",
|
||||
vsession->name, spdk_env_get_current_core());
|
||||
|
||||
svsession->requestq_poller = SPDK_POLLER_REGISTER(vdev_worker, svsession, 0);
|
||||
@ -1545,7 +1545,7 @@ destroy_session_poller_cb(void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VHOST, "%s: stopping poller on lcore %d\n",
|
||||
SPDK_INFOLOG(vhost, "%s: stopping poller on lcore %d\n",
|
||||
vsession->name, spdk_env_get_current_core());
|
||||
|
||||
free_task_pool(svsession);
|
||||
@ -1677,6 +1677,6 @@ vhost_scsi_write_config_json(struct spdk_vhost_dev *vdev, struct spdk_json_write
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vhost_scsi", SPDK_LOG_VHOST_SCSI)
|
||||
SPDK_LOG_REGISTER_COMPONENT("vhost_scsi_queue", SPDK_LOG_VHOST_SCSI_QUEUE)
|
||||
SPDK_LOG_REGISTER_COMPONENT("vhost_scsi_data", SPDK_LOG_VHOST_SCSI_DATA)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vhost_scsi)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vhost_scsi_queue)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vhost_scsi_data)
|
||||
|
@ -288,7 +288,7 @@ vhost_user_sock(struct virtio_user_dev *dev,
|
||||
int i, len, rc;
|
||||
int vhostfd = dev->vhostfd;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_USER, "sent message %d = %s\n", req, vhost_msg_strings[req]);
|
||||
SPDK_DEBUGLOG(virtio_user, "sent message %d = %s\n", req, vhost_msg_strings[req]);
|
||||
|
||||
msg.request = req;
|
||||
msg.flags = VHOST_USER_VERSION;
|
||||
@ -486,4 +486,4 @@ struct virtio_user_backend_ops ops_user = {
|
||||
.send_request = vhost_user_sock,
|
||||
};
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("virtio_user", SPDK_LOG_VIRTIO_USER)
|
||||
SPDK_LOG_REGISTER_COMPONENT(virtio_user)
|
||||
|
@ -102,14 +102,14 @@ virtio_init_queue(struct virtio_dev *dev, uint16_t vtpci_queue_idx)
|
||||
struct virtqueue *vq;
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_DEV, "setting up queue: %"PRIu16"\n", vtpci_queue_idx);
|
||||
SPDK_DEBUGLOG(virtio_dev, "setting up queue: %"PRIu16"\n", vtpci_queue_idx);
|
||||
|
||||
/*
|
||||
* Read the virtqueue size from the Queue Size field
|
||||
* Always power of 2 and if 0 virtqueue does not exist
|
||||
*/
|
||||
vq_size = virtio_dev_backend_ops(dev)->get_queue_size(dev, vtpci_queue_idx);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_DEV, "vq_size: %u\n", vq_size);
|
||||
SPDK_DEBUGLOG(virtio_dev, "vq_size: %u\n", vq_size);
|
||||
if (vq_size == 0) {
|
||||
SPDK_ERRLOG("virtqueue %"PRIu16" does not exist\n", vtpci_queue_idx);
|
||||
return -EINVAL;
|
||||
@ -139,7 +139,7 @@ virtio_init_queue(struct virtio_dev *dev, uint16_t vtpci_queue_idx)
|
||||
*/
|
||||
size = vring_size(vq_size, VIRTIO_PCI_VRING_ALIGN);
|
||||
vq->vq_ring_size = SPDK_ALIGN_CEIL(size, VIRTIO_PCI_VRING_ALIGN);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_DEV, "vring_size: %u, rounded_vring_size: %u\n",
|
||||
SPDK_DEBUGLOG(virtio_dev, "vring_size: %u, rounded_vring_size: %u\n",
|
||||
size, vq->vq_ring_size);
|
||||
|
||||
vq->owner_thread = NULL;
|
||||
@ -152,9 +152,9 @@ virtio_init_queue(struct virtio_dev *dev, uint16_t vtpci_queue_idx)
|
||||
return rc;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_DEV, "vq->vq_ring_mem: 0x%" PRIx64 "\n",
|
||||
SPDK_DEBUGLOG(virtio_dev, "vq->vq_ring_mem: 0x%" PRIx64 "\n",
|
||||
vq->vq_ring_mem);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_DEV, "vq->vq_ring_virt_mem: 0x%" PRIx64 "\n",
|
||||
SPDK_DEBUGLOG(virtio_dev, "vq->vq_ring_virt_mem: 0x%" PRIx64 "\n",
|
||||
(uint64_t)(uintptr_t)vq->vq_ring_virt_mem);
|
||||
|
||||
virtio_init_vring(vq);
|
||||
@ -231,8 +231,8 @@ virtio_negotiate_features(struct virtio_dev *dev, uint64_t req_features)
|
||||
uint64_t host_features = virtio_dev_backend_ops(dev)->get_features(dev);
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_DEV, "guest features = %" PRIx64 "\n", req_features);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_DEV, "device features = %" PRIx64 "\n", host_features);
|
||||
SPDK_DEBUGLOG(virtio_dev, "guest features = %" PRIx64 "\n", req_features);
|
||||
SPDK_DEBUGLOG(virtio_dev, "device features = %" PRIx64 "\n", host_features);
|
||||
|
||||
rc = virtio_dev_backend_ops(dev)->set_features(dev, req_features & host_features);
|
||||
if (rc != 0) {
|
||||
@ -240,7 +240,7 @@ virtio_negotiate_features(struct virtio_dev *dev, uint64_t req_features)
|
||||
return rc;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_DEV, "negotiated features = %" PRIx64 "\n",
|
||||
SPDK_DEBUGLOG(virtio_dev, "negotiated features = %" PRIx64 "\n",
|
||||
dev->negotiated_features);
|
||||
|
||||
virtio_dev_set_status(dev, VIRTIO_CONFIG_S_FEATURES_OK);
|
||||
@ -473,7 +473,7 @@ virtqueue_req_flush(struct virtqueue *vq)
|
||||
}
|
||||
|
||||
virtio_dev_backend_ops(vq->vdev)->notify_queue(vq->vdev, vq);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_DEV, "Notified backend after xmit\n");
|
||||
SPDK_DEBUGLOG(virtio_dev, "Notified backend after xmit\n");
|
||||
}
|
||||
|
||||
void
|
||||
@ -714,4 +714,4 @@ virtio_dev_dump_json_info(struct virtio_dev *hw, struct spdk_json_write_ctx *w)
|
||||
spdk_json_write_object_end(w);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("virtio_dev", SPDK_LOG_VIRTIO_DEV)
|
||||
SPDK_LOG_REGISTER_COMPONENT(virtio_dev)
|
||||
|
@ -317,11 +317,11 @@ modern_setup_queue(struct virtio_dev *dev, struct virtqueue *vq)
|
||||
|
||||
spdk_mmio_write_2(&hw->common_cfg->queue_enable, 1);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI, "queue %"PRIu16" addresses:\n", vq->vq_queue_index);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI, "\t desc_addr: %" PRIx64 "\n", desc_addr);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI, "\t aval_addr: %" PRIx64 "\n", avail_addr);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI, "\t used_addr: %" PRIx64 "\n", used_addr);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI, "\t notify addr: %p (notify offset: %"PRIu16")\n",
|
||||
SPDK_DEBUGLOG(virtio_pci, "queue %"PRIu16" addresses:\n", vq->vq_queue_index);
|
||||
SPDK_DEBUGLOG(virtio_pci, "\t desc_addr: %" PRIx64 "\n", desc_addr);
|
||||
SPDK_DEBUGLOG(virtio_pci, "\t aval_addr: %" PRIx64 "\n", avail_addr);
|
||||
SPDK_DEBUGLOG(virtio_pci, "\t used_addr: %" PRIx64 "\n", used_addr);
|
||||
SPDK_DEBUGLOG(virtio_pci, "\t notify addr: %p (notify offset: %"PRIu16")\n",
|
||||
vq->notify_addr, notify_off);
|
||||
|
||||
return 0;
|
||||
@ -409,7 +409,7 @@ virtio_read_caps(struct virtio_hw *hw)
|
||||
|
||||
ret = spdk_pci_device_cfg_read(hw->pci_dev, &pos, 1, PCI_CAPABILITY_LIST);
|
||||
if (ret < 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI, "failed to read pci capability list\n");
|
||||
SPDK_DEBUGLOG(virtio_pci, "failed to read pci capability list\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -425,13 +425,13 @@ virtio_read_caps(struct virtio_hw *hw)
|
||||
}
|
||||
|
||||
if (cap.cap_vndr != PCI_CAP_ID_VNDR) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI,
|
||||
SPDK_DEBUGLOG(virtio_pci,
|
||||
"[%2"PRIx8"] skipping non VNDR cap id: %02"PRIx8"\n",
|
||||
pos, cap.cap_vndr);
|
||||
goto next;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI,
|
||||
SPDK_DEBUGLOG(virtio_pci,
|
||||
"[%2"PRIx8"] cfg type: %"PRIu8", bar: %"PRIu8", offset: %04"PRIx32", len: %"PRIu32"\n",
|
||||
pos, cap.cfg_type, cap.bar, cap.offset, cap.length);
|
||||
|
||||
@ -458,7 +458,7 @@ next:
|
||||
|
||||
if (hw->common_cfg == NULL || hw->notify_base == NULL ||
|
||||
hw->dev_cfg == NULL || hw->isr == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI, "no modern virtio pci device found.\n");
|
||||
SPDK_DEBUGLOG(virtio_pci, "no modern virtio pci device found.\n");
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
} else {
|
||||
@ -466,12 +466,12 @@ next:
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI, "found modern virtio pci device.\n");
|
||||
SPDK_DEBUGLOG(virtio_pci, "found modern virtio pci device.\n");
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI, "common cfg mapped at: %p\n", hw->common_cfg);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI, "device cfg mapped at: %p\n", hw->dev_cfg);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI, "isr cfg mapped at: %p\n", hw->isr);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VIRTIO_PCI, "notify base: %p, notify off multiplier: %u\n",
|
||||
SPDK_DEBUGLOG(virtio_pci, "common cfg mapped at: %p\n", hw->common_cfg);
|
||||
SPDK_DEBUGLOG(virtio_pci, "device cfg mapped at: %p\n", hw->dev_cfg);
|
||||
SPDK_DEBUGLOG(virtio_pci, "isr cfg mapped at: %p\n", hw->isr);
|
||||
SPDK_DEBUGLOG(virtio_pci, "notify base: %p, notify off multiplier: %u\n",
|
||||
hw->notify_base, hw->notify_off_multiplier);
|
||||
|
||||
return 0;
|
||||
@ -601,4 +601,4 @@ virtio_pci_dev_init(struct virtio_dev *vdev, const char *name,
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("virtio_pci", SPDK_LOG_VIRTIO_PCI)
|
||||
SPDK_LOG_REGISTER_COMPONENT(virtio_pci)
|
||||
|
@ -179,7 +179,7 @@ vmd_hotplug_allocate_base_addr(struct vmd_hot_plug *hp, uint32_t size)
|
||||
}
|
||||
|
||||
if (region == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "Unable to find free hotplug memory region of size:"
|
||||
SPDK_DEBUGLOG(vmd, "Unable to find free hotplug memory region of size:"
|
||||
"%"PRIx32"\n", size);
|
||||
return 0;
|
||||
}
|
||||
@ -188,7 +188,7 @@ vmd_hotplug_allocate_base_addr(struct vmd_hot_plug *hp, uint32_t size)
|
||||
if (size < region->size) {
|
||||
free_region = TAILQ_FIRST(&hp->unused_mem_queue);
|
||||
if (free_region == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "Unable to find unused descriptor to store the "
|
||||
SPDK_DEBUGLOG(vmd, "Unable to find unused descriptor to store the "
|
||||
"free region of size: %"PRIu32"\n", region->size - size);
|
||||
} else {
|
||||
TAILQ_REMOVE(&hp->unused_mem_queue, free_region, tailq);
|
||||
@ -248,7 +248,7 @@ vmd_allocate_base_addr(struct vmd_adapter *vmd, struct vmd_pci_device *dev, uint
|
||||
vmd->current_addr_size -= size + padding;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "allocated(size) %lx (%x)\n", base_address, size);
|
||||
SPDK_DEBUGLOG(vmd, "allocated(size) %lx (%x)\n", base_address, size);
|
||||
|
||||
return base_address;
|
||||
}
|
||||
@ -277,7 +277,7 @@ vmd_update_base_limit_register(struct vmd_pci_device *dev, uint16_t base, uint16
|
||||
}
|
||||
|
||||
bridge = bus->self;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "base:limit = %x:%x\n", bridge->header->one.mem_base,
|
||||
SPDK_DEBUGLOG(vmd, "base:limit = %x:%x\n", bridge->header->one.mem_base,
|
||||
bridge->header->one.mem_limit);
|
||||
|
||||
if (dev->bus->vmd->scan_completed) {
|
||||
@ -500,14 +500,14 @@ vmd_update_scan_info(struct vmd_pci_device *dev)
|
||||
|
||||
if (vmd_device_is_root_port(dev)) {
|
||||
vmd_adapter->root_port_updated = 1;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "root_port_updated = %d\n",
|
||||
SPDK_DEBUGLOG(vmd, "root_port_updated = %d\n",
|
||||
vmd_adapter->root_port_updated);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "upper:limit = %x : %x\n",
|
||||
SPDK_DEBUGLOG(vmd, "upper:limit = %x : %x\n",
|
||||
dev->header->one.prefetch_base_upper,
|
||||
dev->header->one.prefetch_limit_upper);
|
||||
if (vmd_device_is_enumerated(dev)) {
|
||||
vmd_adapter->scan_completed = 1;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "scan_completed = %d\n",
|
||||
SPDK_DEBUGLOG(vmd, "scan_completed = %d\n",
|
||||
vmd_adapter->scan_completed);
|
||||
}
|
||||
}
|
||||
@ -583,7 +583,7 @@ vmd_init_hotplug(struct vmd_pci_device *dev, struct vmd_pci_bus *bus)
|
||||
TAILQ_INSERT_TAIL(&hp->unused_mem_queue, &hp->mem[mem_id], tailq);
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "%s: mem_base:mem_limit = %x : %x\n", __func__,
|
||||
SPDK_DEBUGLOG(vmd, "%s: mem_base:mem_limit = %x : %x\n", __func__,
|
||||
bus->self->header->one.mem_base, bus->self->header->one.mem_limit);
|
||||
}
|
||||
|
||||
@ -627,7 +627,7 @@ vmd_alloc_dev(struct vmd_pci_bus *bus, uint32_t devfn)
|
||||
header = (struct pci_header * volatile)(bus->vmd->cfg_vaddr +
|
||||
CONFIG_OFFSET_ADDR(bus->bus_number, devfn, 0, 0));
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "PCI device found: %04x:%04x ***\n",
|
||||
SPDK_DEBUGLOG(vmd, "PCI device found: %04x:%04x ***\n",
|
||||
header->common.vendor_id, header->common.device_id);
|
||||
|
||||
dev = calloc(1, sizeof(*dev));
|
||||
@ -909,7 +909,7 @@ vmd_dev_init(struct vmd_pci_device *dev)
|
||||
|
||||
if (vmd_is_supported_device(dev)) {
|
||||
spdk_pci_addr_fmt(bdf, sizeof(bdf), &dev->pci.addr);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "Initalizing NVMe device at %s\n", bdf);
|
||||
SPDK_DEBUGLOG(vmd, "Initalizing NVMe device at %s\n", bdf);
|
||||
dev->pci.parent = dev->bus->vmd->pci;
|
||||
spdk_pci_hook_device(spdk_pci_nvme_get_driver(), &dev->pci);
|
||||
}
|
||||
@ -980,7 +980,7 @@ vmd_scan_single_bus(struct vmd_pci_bus *bus, struct vmd_pci_device *parent_bridg
|
||||
|
||||
/* Attach hot plug instance if HP is supported */
|
||||
/* Hot inserted SSDs can be assigned port bus of sub-ordinate + 1 */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "hotplug_capable/slot_implemented = "
|
||||
SPDK_DEBUGLOG(vmd, "hotplug_capable/slot_implemented = "
|
||||
"%x:%x\n", slot_cap.bit_field.hotplug_capable,
|
||||
new_dev->pcie_cap->express_cap_register.bit_field.slot_implemented);
|
||||
}
|
||||
@ -1019,7 +1019,7 @@ vmd_scan_single_bus(struct vmd_pci_bus *bus, struct vmd_pci_device *parent_bridg
|
||||
vmd->nvme_count++;
|
||||
}
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "Removing failed device:%p\n", new_dev);
|
||||
SPDK_DEBUGLOG(vmd, "Removing failed device:%p\n", new_dev);
|
||||
TAILQ_REMOVE(&bus->dev_list, new_dev, tailq);
|
||||
free(new_dev);
|
||||
if (dev_cnt) {
|
||||
@ -1040,30 +1040,30 @@ vmd_print_pci_info(struct vmd_pci_device *dev)
|
||||
}
|
||||
|
||||
if (dev->pcie_cap != NULL) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VMD, "PCI DEVICE: [%04X:%04X] type(%x) : %s\n",
|
||||
SPDK_INFOLOG(vmd, "PCI DEVICE: [%04X:%04X] type(%x) : %s\n",
|
||||
dev->header->common.vendor_id, dev->header->common.device_id,
|
||||
dev->pcie_cap->express_cap_register.bit_field.device_type,
|
||||
device_type[dev->pcie_cap->express_cap_register.bit_field.device_type]);
|
||||
} else {
|
||||
SPDK_INFOLOG(SPDK_LOG_VMD, "PCI DEVICE: [%04X:%04X]\n",
|
||||
SPDK_INFOLOG(vmd, "PCI DEVICE: [%04X:%04X]\n",
|
||||
dev->header->common.vendor_id, dev->header->common.device_id);
|
||||
}
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VMD, "\tDOMAIN:BDF: %04x:%02x:%02x:%x\n", dev->pci.addr.domain,
|
||||
SPDK_INFOLOG(vmd, "\tDOMAIN:BDF: %04x:%02x:%02x:%x\n", dev->pci.addr.domain,
|
||||
dev->pci.addr.bus, dev->pci.addr.dev, dev->pci.addr.func);
|
||||
|
||||
if (!(dev->header_type & PCI_HEADER_TYPE_BRIDGE) && dev->bus) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VMD, "\tbase addr: %x : %p\n",
|
||||
SPDK_INFOLOG(vmd, "\tbase addr: %x : %p\n",
|
||||
dev->header->zero.BAR[0], (void *)dev->bar[0].vaddr);
|
||||
}
|
||||
|
||||
if ((dev->header_type & PCI_HEADER_TYPE_BRIDGE)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VMD, "\tPrimary = %d, Secondary = %d, Subordinate = %d\n",
|
||||
SPDK_INFOLOG(vmd, "\tPrimary = %d, Secondary = %d, Subordinate = %d\n",
|
||||
dev->header->one.primary, dev->header->one.secondary, dev->header->one.subordinate);
|
||||
if (dev->pcie_cap && dev->pcie_cap->express_cap_register.bit_field.slot_implemented) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VMD, "\tSlot implemented on this device.\n");
|
||||
SPDK_INFOLOG(vmd, "\tSlot implemented on this device.\n");
|
||||
if (dev->pcie_cap->slot_cap.bit_field.hotplug_capable) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VMD, "Device has HOT-PLUG capable slot.\n");
|
||||
SPDK_INFOLOG(vmd, "Device has HOT-PLUG capable slot.\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1072,7 +1072,7 @@ vmd_print_pci_info(struct vmd_pci_device *dev)
|
||||
uint8_t *snLow = (uint8_t *)&dev->sn_cap->sn_low;
|
||||
uint8_t *snHi = (uint8_t *)&dev->sn_cap->sn_hi;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VMD, "\tSN: %02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x\n",
|
||||
SPDK_INFOLOG(vmd, "\tSN: %02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x\n",
|
||||
snHi[3], snHi[2], snHi[1], snHi[0], snLow[3], snLow[2], snLow[1], snLow[0]);
|
||||
}
|
||||
}
|
||||
@ -1086,7 +1086,7 @@ vmd_cache_scan_info(struct vmd_pci_device *dev)
|
||||
return;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "vendor/device id:%x:%x\n", dev->header->common.vendor_id,
|
||||
SPDK_DEBUGLOG(vmd, "vendor/device id:%x:%x\n", dev->header->common.vendor_id,
|
||||
dev->header->common.device_id);
|
||||
|
||||
if (vmd_device_is_root_port(dev)) {
|
||||
@ -1095,7 +1095,7 @@ vmd_cache_scan_info(struct vmd_pci_device *dev)
|
||||
dev->header->one.prefetch_limit_upper = VMD_UPPER_LIMIT_SIGNATURE;
|
||||
reg = dev->header->one.prefetch_limit_upper;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "prefetch: %x:%x\n",
|
||||
SPDK_DEBUGLOG(vmd, "prefetch: %x:%x\n",
|
||||
dev->header->one.prefetch_base_upper,
|
||||
dev->header->one.prefetch_limit_upper);
|
||||
}
|
||||
@ -1113,10 +1113,10 @@ vmd_scan_pcibus(struct vmd_pci_bus *bus)
|
||||
bus->vmd->next_bus_number = bus->bus_number + 1;
|
||||
dev_cnt = vmd_scan_single_bus(bus, NULL);
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "VMD scan found %u devices\n", dev_cnt);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "VMD scan found %u END DEVICES\n", g_end_device_count);
|
||||
SPDK_DEBUGLOG(vmd, "VMD scan found %u devices\n", dev_cnt);
|
||||
SPDK_DEBUGLOG(vmd, "VMD scan found %u END DEVICES\n", g_end_device_count);
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VMD, "PCIe devices attached to VMD %04x:%02x:%02x:%x...\n",
|
||||
SPDK_INFOLOG(vmd, "PCIe devices attached to VMD %04x:%02x:%02x:%x...\n",
|
||||
bus->vmd->pci->addr.domain, bus->vmd->pci->addr.bus,
|
||||
bus->vmd->pci->addr.dev, bus->vmd->pci->addr.func);
|
||||
|
||||
@ -1208,7 +1208,7 @@ vmd_enum_cb(void *ctx, struct spdk_pci_device *pci_dev)
|
||||
spdk_pci_device_cfg_write32(pci_dev, cmd_reg, 4);
|
||||
|
||||
spdk_pci_addr_fmt(bdf, sizeof(bdf), &pci_dev->addr);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "Found a VMD[ %d ] at %s\n", vmd_c->count, bdf);
|
||||
SPDK_DEBUGLOG(vmd, "Found a VMD[ %d ] at %s\n", vmd_c->count, bdf);
|
||||
|
||||
/* map vmd bars */
|
||||
i = vmd_c->count;
|
||||
@ -1223,13 +1223,13 @@ vmd_enum_cb(void *ctx, struct spdk_pci_device *pci_dev)
|
||||
return -1;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "vmd config bar(%p) vaddr(%p) size(%x)\n",
|
||||
SPDK_DEBUGLOG(vmd, "vmd config bar(%p) vaddr(%p) size(%x)\n",
|
||||
(void *)vmd_c->vmd[i].cfgbar, (void *)vmd_c->vmd[i].cfg_vaddr,
|
||||
(uint32_t)vmd_c->vmd[i].cfgbar_size);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "vmd mem bar(%p) vaddr(%p) size(%x)\n",
|
||||
SPDK_DEBUGLOG(vmd, "vmd mem bar(%p) vaddr(%p) size(%x)\n",
|
||||
(void *)vmd_c->vmd[i].membar, (void *)vmd_c->vmd[i].mem_vaddr,
|
||||
(uint32_t)vmd_c->vmd[i].membar_size);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "vmd msix bar(%p) vaddr(%p) size(%x)\n\n",
|
||||
SPDK_DEBUGLOG(vmd, "vmd msix bar(%p) vaddr(%p) size(%x)\n\n",
|
||||
(void *)vmd_c->vmd[i].msixbar, (void *)vmd_c->vmd[i].msix_vaddr,
|
||||
(uint32_t)vmd_c->vmd[i].msixbar_size);
|
||||
|
||||
@ -1340,11 +1340,11 @@ spdk_vmd_hotplug_monitor(void)
|
||||
}
|
||||
|
||||
if (device->pcie_cap->link_status.bit_field.datalink_layer_active == 1) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "Device hotplug detected on bus "
|
||||
SPDK_DEBUGLOG(vmd, "Device hotplug detected on bus "
|
||||
"%"PRIu32"\n", bus->bus_number);
|
||||
vmd_bus_handle_hotplug(bus);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VMD, "Device hotremove detected on bus "
|
||||
SPDK_DEBUGLOG(vmd, "Device hotremove detected on bus "
|
||||
"%"PRIu32"\n", bus->bus_number);
|
||||
vmd_bus_handle_hotremove(bus);
|
||||
}
|
||||
@ -1373,4 +1373,4 @@ spdk_vmd_fini(void)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vmd", SPDK_LOG_VMD)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vmd)
|
||||
|
@ -844,4 +844,4 @@ SPDK_ACCEL_MODULE_REGISTER(accel_engine_idxd_init, accel_engine_idxd_exit,
|
||||
NULL, accel_engine_idxd_write_config_json,
|
||||
accel_engine_idxd_get_ctx_size)
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("accel_idxd", SPDK_LOG_ACCEL_IDXD)
|
||||
SPDK_LOG_REGISTER_COMPONENT(accel_idxd)
|
||||
|
@ -548,7 +548,7 @@ probe_cb(void *cb_ctx, struct spdk_pci_device *pci_dev)
|
||||
struct spdk_pci_addr pci_addr = spdk_pci_device_get_addr(pci_dev);
|
||||
struct pci_device *pdev;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_ACCEL_IOAT,
|
||||
SPDK_INFOLOG(accel_ioat,
|
||||
" Found matching device at %04x:%02x:%02x.%x vendor:0x%04x device:0x%04x\n",
|
||||
pci_addr.domain,
|
||||
pci_addr.bus,
|
||||
@ -761,4 +761,4 @@ accel_engine_ioat_config_text(FILE *fp)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("accel_ioat", SPDK_LOG_ACCEL_IOAT)
|
||||
SPDK_LOG_REGISTER_COMPONENT(accel_ioat)
|
||||
|
@ -177,7 +177,7 @@ bdev_aio_readv(struct file_disk *fdisk, struct spdk_io_channel *ch,
|
||||
aio_task->len = nbytes;
|
||||
aio_task->ch = aio_ch;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_AIO, "read %d iovs size %lu to off: %#lx\n",
|
||||
SPDK_DEBUGLOG(aio, "read %d iovs size %lu to off: %#lx\n",
|
||||
iovcnt, nbytes, offset);
|
||||
|
||||
rc = io_submit(aio_ch->io_ctx, 1, &iocb);
|
||||
@ -208,7 +208,7 @@ bdev_aio_writev(struct file_disk *fdisk, struct spdk_io_channel *ch,
|
||||
aio_task->len = len;
|
||||
aio_task->ch = aio_ch;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_AIO, "write %d iovs size %lu from off: %#lx\n",
|
||||
SPDK_DEBUGLOG(aio, "write %d iovs size %lu from off: %#lx\n",
|
||||
iovcnt, len, offset);
|
||||
|
||||
rc = io_submit(aio_ch->io_ctx, 1, &iocb);
|
||||
@ -849,4 +849,4 @@ bdev_aio_get_spdk_running_config(FILE *fp)
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("aio", SPDK_LOG_AIO)
|
||||
SPDK_LOG_REGISTER_COMPONENT(aio)
|
||||
|
@ -1862,4 +1862,4 @@ compress_set_pmd(enum compress_pmd *opts)
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vbdev_compress", SPDK_LOG_VBDEV_COMPRESS)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vbdev_compress)
|
||||
|
@ -183,7 +183,7 @@ rpc_bdev_compress_create(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_construct_compress_decoders,
|
||||
SPDK_COUNTOF(rpc_construct_compress_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_COMPRESS, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(vbdev_compress, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_PARSE_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
|
@ -1066,7 +1066,7 @@ crypto_read_get_buf_cb(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io,
|
||||
bdev_io);
|
||||
if (rc != 0) {
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_CRYPTO, "No memory, queue the IO.\n");
|
||||
SPDK_DEBUGLOG(vbdev_crypto, "No memory, queue the IO.\n");
|
||||
io_ctx->ch = ch;
|
||||
vbdev_crypto_queue_io(bdev_io);
|
||||
} else {
|
||||
@ -1091,7 +1091,7 @@ crypto_write_get_buf_cb(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io
|
||||
if (rc != 0) {
|
||||
spdk_bdev_io_put_aux_buf(bdev_io, aux_buf);
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_CRYPTO, "No memory, queue the IO.\n");
|
||||
SPDK_DEBUGLOG(vbdev_crypto, "No memory, queue the IO.\n");
|
||||
io_ctx->ch = ch;
|
||||
vbdev_crypto_queue_io(bdev_io);
|
||||
} else {
|
||||
@ -1159,7 +1159,7 @@ vbdev_crypto_submit_request(struct spdk_io_channel *ch, struct spdk_bdev_io *bde
|
||||
|
||||
if (rc != 0) {
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_CRYPTO, "No memory, queue the IO.\n");
|
||||
SPDK_DEBUGLOG(vbdev_crypto, "No memory, queue the IO.\n");
|
||||
io_ctx->ch = ch;
|
||||
vbdev_crypto_queue_io(bdev_io);
|
||||
} else {
|
||||
@ -1765,7 +1765,7 @@ vbdev_crypto_claim(struct spdk_bdev *bdev)
|
||||
int rc = 0;
|
||||
|
||||
if (g_number_of_claimed_volumes >= MAX_CRYPTO_VOLUMES) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_CRYPTO, "Reached max number of claimed volumes\n");
|
||||
SPDK_DEBUGLOG(vbdev_crypto, "Reached max number of claimed volumes\n");
|
||||
rc = -EINVAL;
|
||||
goto error_vbdev_alloc;
|
||||
}
|
||||
@ -1778,7 +1778,7 @@ vbdev_crypto_claim(struct spdk_bdev *bdev)
|
||||
if (strcmp(name->bdev_name, bdev->name) != 0) {
|
||||
continue;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_CRYPTO, "Match on %s\n", bdev->name);
|
||||
SPDK_DEBUGLOG(vbdev_crypto, "Match on %s\n", bdev->name);
|
||||
|
||||
vbdev = calloc(1, sizeof(struct vbdev_crypto));
|
||||
if (!vbdev) {
|
||||
@ -1954,7 +1954,7 @@ vbdev_crypto_claim(struct spdk_bdev *bdev)
|
||||
rc = -EINVAL;
|
||||
goto error_bdev_register;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_CRYPTO, "registered io_device and virtual bdev for: %s\n",
|
||||
SPDK_DEBUGLOG(vbdev_crypto, "registered io_device and virtual bdev for: %s\n",
|
||||
name->vbdev_name);
|
||||
break;
|
||||
}
|
||||
@ -2037,4 +2037,4 @@ vbdev_crypto_examine(struct spdk_bdev *bdev)
|
||||
spdk_bdev_module_examine_done(&crypto_if);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vbdev_crypto", SPDK_LOG_VBDEV_CRYPTO)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vbdev_crypto)
|
||||
|
@ -848,4 +848,4 @@ vbdev_delay_examine(struct spdk_bdev *bdev)
|
||||
spdk_bdev_module_examine_done(&delay_if);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vbdev_delay", SPDK_LOG_VBDEV_DELAY)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vbdev_delay)
|
||||
|
@ -70,7 +70,7 @@ rpc_bdev_delay_update_latency(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_update_latency_decoders,
|
||||
SPDK_COUNTOF(rpc_update_latency_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_DELAY, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(vbdev_delay, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -149,7 +149,7 @@ rpc_bdev_delay_create(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_construct_delay_decoders,
|
||||
SPDK_COUNTOF(rpc_construct_delay_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_DELAY, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(vbdev_delay, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
|
@ -313,9 +313,9 @@ bdev_ftl_create_cb(struct spdk_ftl_dev *dev, void *ctx, int status)
|
||||
ftl_bdev->bdev.blockcnt = attrs.num_blocks;
|
||||
ftl_bdev->bdev.uuid = attrs.uuid;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_FTL, "Creating bdev %s:\n", ftl_bdev->bdev.name);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_FTL, "\tblock_len:\t%zu\n", attrs.block_size);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_FTL, "\tnum_blocks:\t%"PRIu64"\n", attrs.num_blocks);
|
||||
SPDK_DEBUGLOG(bdev_ftl, "Creating bdev %s:\n", ftl_bdev->bdev.name);
|
||||
SPDK_DEBUGLOG(bdev_ftl, "\tblock_len:\t%zu\n", attrs.block_size);
|
||||
SPDK_DEBUGLOG(bdev_ftl, "\tnum_blocks:\t%"PRIu64"\n", attrs.num_blocks);
|
||||
|
||||
ftl_bdev->bdev.ctxt = ftl_bdev;
|
||||
ftl_bdev->bdev.fn_table = &ftl_fn_table;
|
||||
@ -514,4 +514,4 @@ bdev_ftl_examine(struct spdk_bdev *bdev)
|
||||
spdk_bdev_module_examine_done(&g_ftl_if);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("bdev_ftl", SPDK_LOG_BDEV_FTL)
|
||||
SPDK_LOG_REGISTER_COMPONENT(bdev_ftl)
|
||||
|
@ -239,7 +239,7 @@ gpt_check_mbr(struct spdk_gpt *gpt)
|
||||
|
||||
mbr = (struct spdk_mbr *)gpt->buf;
|
||||
if (from_le16(&mbr->mbr_signature) != SPDK_MBR_SIGNATURE) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_GPT_PARSE, "Signature mismatch, provided=%x,"
|
||||
SPDK_DEBUGLOG(gpt_parse, "Signature mismatch, provided=%x,"
|
||||
"expected=%x\n", from_le16(&mbr->disk_signature),
|
||||
SPDK_MBR_SIGNATURE);
|
||||
return -1;
|
||||
@ -256,7 +256,7 @@ gpt_check_mbr(struct spdk_gpt *gpt)
|
||||
if (ret == GPT_PROTECTIVE_MBR) {
|
||||
expected_start_lba = GPT_PRIMARY_PARTITION_TABLE_LBA;
|
||||
if (from_le32(&mbr->partitions[primary_partition].start_lba) != expected_start_lba) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_GPT_PARSE, "start lba mismatch, provided=%u, expected=%u\n",
|
||||
SPDK_DEBUGLOG(gpt_parse, "start lba mismatch, provided=%u, expected=%u\n",
|
||||
from_le32(&mbr->partitions[primary_partition].start_lba),
|
||||
expected_start_lba);
|
||||
return -1;
|
||||
@ -265,13 +265,13 @@ gpt_check_mbr(struct spdk_gpt *gpt)
|
||||
total_lba_size = from_le32(&mbr->partitions[primary_partition].size_lba);
|
||||
if ((total_lba_size != ((uint32_t) gpt->total_sectors - 1)) &&
|
||||
(total_lba_size != 0xFFFFFFFF)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_GPT_PARSE,
|
||||
SPDK_DEBUGLOG(gpt_parse,
|
||||
"GPT Primary MBR size does not equal: (record_size %u != actual_size %u)!\n",
|
||||
total_lba_size, (uint32_t) gpt->total_sectors - 1);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_GPT_PARSE, "Currently only support GPT Protective MBR format\n");
|
||||
SPDK_DEBUGLOG(gpt_parse, "Currently only support GPT Protective MBR format\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ gpt_parse_mbr(struct spdk_gpt *gpt)
|
||||
|
||||
rc = gpt_check_mbr(gpt);
|
||||
if (rc) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_GPT_PARSE, "Failed to detect gpt in MBR\n");
|
||||
SPDK_DEBUGLOG(gpt_parse, "Failed to detect gpt in MBR\n");
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -317,4 +317,4 @@ gpt_parse_partition_table(struct spdk_gpt *gpt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("gpt_parse", SPDK_LOG_GPT_PARSE)
|
||||
SPDK_LOG_REGISTER_COMPONENT(gpt_parse)
|
||||
|
@ -221,7 +221,7 @@ _vbdev_gpt_submit_request(struct spdk_io_channel *_ch, struct spdk_bdev_io *bdev
|
||||
rc = spdk_bdev_part_submit_request(&ch->part_ch, bdev_io);
|
||||
if (rc) {
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_GPT, "gpt: no memory, queue io\n");
|
||||
SPDK_DEBUGLOG(vbdev_gpt, "gpt: no memory, queue io\n");
|
||||
io->ch = _ch;
|
||||
io->bdev_io = bdev_io;
|
||||
vbdev_gpt_queue_io(io);
|
||||
@ -385,7 +385,7 @@ gpt_read_secondary_table_complete(struct spdk_bdev_io *bdev_io, bool status, voi
|
||||
|
||||
rc = gpt_parse_partition_table(&gpt_base->gpt);
|
||||
if (rc) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_GPT, "Failed to parse secondary partition table\n");
|
||||
SPDK_DEBUGLOG(vbdev_gpt, "Failed to parse secondary partition table\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
@ -394,7 +394,7 @@ gpt_read_secondary_table_complete(struct spdk_bdev_io *bdev_io, bool status, voi
|
||||
|
||||
num_partitions = vbdev_gpt_create_bdevs(gpt_base);
|
||||
if (num_partitions < 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_GPT, "Failed to split dev=%s by gpt table\n",
|
||||
SPDK_DEBUGLOG(vbdev_gpt, "Failed to split dev=%s by gpt table\n",
|
||||
spdk_bdev_get_name(bdev));
|
||||
}
|
||||
|
||||
@ -443,13 +443,13 @@ gpt_bdev_complete(struct spdk_bdev_io *bdev_io, bool status, void *arg)
|
||||
|
||||
rc = gpt_parse_mbr(&gpt_base->gpt);
|
||||
if (rc) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_GPT, "Failed to parse mbr\n");
|
||||
SPDK_DEBUGLOG(vbdev_gpt, "Failed to parse mbr\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
rc = gpt_parse_partition_table(&gpt_base->gpt);
|
||||
if (rc) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_GPT, "Failed to parse primary partition table\n");
|
||||
SPDK_DEBUGLOG(vbdev_gpt, "Failed to parse primary partition table\n");
|
||||
rc = vbdev_gpt_read_secondary_table(gpt_base);
|
||||
if (rc) {
|
||||
SPDK_ERRLOG("Failed to read secondary table\n");
|
||||
@ -460,7 +460,7 @@ gpt_bdev_complete(struct spdk_bdev_io *bdev_io, bool status, void *arg)
|
||||
|
||||
num_partitions = vbdev_gpt_create_bdevs(gpt_base);
|
||||
if (num_partitions < 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_GPT, "Failed to split dev=%s by gpt table\n",
|
||||
SPDK_DEBUGLOG(vbdev_gpt, "Failed to split dev=%s by gpt table\n",
|
||||
spdk_bdev_get_name(bdev));
|
||||
}
|
||||
|
||||
@ -549,7 +549,7 @@ vbdev_gpt_examine(struct spdk_bdev *bdev)
|
||||
}
|
||||
|
||||
if (spdk_bdev_get_block_size(bdev) % 512 != 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_GPT,
|
||||
SPDK_DEBUGLOG(vbdev_gpt,
|
||||
"GPT module does not support block size %" PRIu32 " for bdev %s\n",
|
||||
spdk_bdev_get_block_size(bdev), spdk_bdev_get_name(bdev));
|
||||
spdk_bdev_module_examine_done(&gpt_if);
|
||||
@ -563,4 +563,4 @@ vbdev_gpt_examine(struct spdk_bdev *bdev)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vbdev_gpt", SPDK_LOG_VBDEV_GPT)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vbdev_gpt)
|
||||
|
@ -226,7 +226,7 @@ bdev_iscsi_readv(struct bdev_iscsi_lun *lun, struct bdev_iscsi_io *iscsi_io,
|
||||
{
|
||||
struct scsi_task *task;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI_INIT, "read %d iovs size %lu to lba: %#lx\n",
|
||||
SPDK_DEBUGLOG(iscsi_init, "read %d iovs size %lu to lba: %#lx\n",
|
||||
iovcnt, nbytes, lba);
|
||||
|
||||
task = iscsi_read16_task(lun->context, lun->lun_id, lba, nbytes, lun->bdev.blocklen, 0, 0, 0, 0, 0,
|
||||
@ -253,7 +253,7 @@ bdev_iscsi_writev(struct bdev_iscsi_lun *lun, struct bdev_iscsi_io *iscsi_io,
|
||||
{
|
||||
struct scsi_task *task;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI_INIT, "write %d iovs size %lu to lba: %#lx\n",
|
||||
SPDK_DEBUGLOG(iscsi_init, "write %d iovs size %lu to lba: %#lx\n",
|
||||
iovcnt, nbytes, lba);
|
||||
|
||||
task = iscsi_write16_task(lun->context, lun->lun_id, lba, NULL, nbytes, lun->bdev.blocklen, 0, 0, 0,
|
||||
@ -933,4 +933,4 @@ bdev_iscsi_initialize(void)
|
||||
return rc;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("iscsi_init", SPDK_LOG_ISCSI_INIT)
|
||||
SPDK_LOG_REGISTER_COMPONENT(iscsi_init)
|
||||
|
@ -177,7 +177,7 @@ _vbdev_lvs_create_cb(void *cb_arg, struct spdk_lvol_store *lvs, int lvserrno)
|
||||
|
||||
lvserrno = spdk_bs_bdev_claim(bs_dev, &g_lvol_if);
|
||||
if (lvserrno != 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Lvol store base bdev already claimed by another bdev\n");
|
||||
SPDK_INFOLOG(vbdev_lvol, "Lvol store base bdev already claimed by another bdev\n");
|
||||
req->bs_dev->destroy(req->bs_dev);
|
||||
goto end;
|
||||
}
|
||||
@ -194,7 +194,7 @@ _vbdev_lvs_create_cb(void *cb_arg, struct spdk_lvol_store *lvs, int lvserrno)
|
||||
lvs_bdev->req = NULL;
|
||||
|
||||
TAILQ_INSERT_TAIL(&g_spdk_lvol_pairs, lvs_bdev, lvol_stores);
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Lvol store bdev inserted\n");
|
||||
SPDK_INFOLOG(vbdev_lvol, "Lvol store bdev inserted\n");
|
||||
|
||||
end:
|
||||
req->cb_fn(req->cb_arg, lvs, lvserrno);
|
||||
@ -275,7 +275,7 @@ _vbdev_lvs_rename_cb(void *cb_arg, int lvserrno)
|
||||
struct spdk_lvol *tmp;
|
||||
|
||||
if (lvserrno != 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Lvol store rename failed\n");
|
||||
SPDK_INFOLOG(vbdev_lvol, "Lvol store rename failed\n");
|
||||
} else {
|
||||
TAILQ_FOREACH(tmp, &req->lvol_store->lvols, link) {
|
||||
/* We have to pass current lvol name, since only lvs name changed */
|
||||
@ -322,7 +322,7 @@ _vbdev_lvs_remove_cb(void *cb_arg, int lvserrno)
|
||||
struct spdk_lvs_req *req = lvs_bdev->req;
|
||||
|
||||
if (lvserrno != 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Lvol store removed with error: %d.\n", lvserrno);
|
||||
SPDK_INFOLOG(vbdev_lvol, "Lvol store removed with error: %d.\n", lvserrno);
|
||||
}
|
||||
|
||||
TAILQ_REMOVE(&g_spdk_lvol_pairs, lvs_bdev, lvol_stores);
|
||||
@ -342,7 +342,7 @@ _vbdev_lvs_remove_lvol_cb(void *cb_arg, int lvolerrno)
|
||||
struct spdk_lvol *lvol;
|
||||
|
||||
if (lvolerrno != 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_LVOL, "Lvol removed with errno %d\n", lvolerrno);
|
||||
SPDK_DEBUGLOG(vbdev_lvol, "Lvol removed with errno %d\n", lvolerrno);
|
||||
}
|
||||
|
||||
if (TAILQ_EMPTY(&lvs->lvols)) {
|
||||
@ -372,7 +372,7 @@ _vbdev_lvs_remove_bdev_unregistered_cb(void *cb_arg, int bdeverrno)
|
||||
struct spdk_lvol *lvol, *tmp;
|
||||
|
||||
if (bdeverrno != 0) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_LVOL, "Lvol unregistered with errno %d\n", bdeverrno);
|
||||
SPDK_DEBUGLOG(vbdev_lvol, "Lvol unregistered with errno %d\n", bdeverrno);
|
||||
}
|
||||
|
||||
TAILQ_FOREACH_SAFE(lvol, &lvs->lvols, link, tmp) {
|
||||
@ -458,7 +458,7 @@ vbdev_lvol_store_first(void)
|
||||
|
||||
lvs_bdev = TAILQ_FIRST(&g_spdk_lvol_pairs);
|
||||
if (lvs_bdev) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Starting lvolstore iteration at %p\n", lvs_bdev->lvs);
|
||||
SPDK_INFOLOG(vbdev_lvol, "Starting lvolstore iteration at %p\n", lvs_bdev->lvs);
|
||||
}
|
||||
|
||||
return lvs_bdev;
|
||||
@ -476,7 +476,7 @@ vbdev_lvol_store_next(struct lvol_store_bdev *prev)
|
||||
|
||||
lvs_bdev = TAILQ_NEXT(prev, lvol_stores);
|
||||
if (lvs_bdev) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Continuing lvolstore iteration at %p\n", lvs_bdev->lvs);
|
||||
SPDK_INFOLOG(vbdev_lvol, "Continuing lvolstore iteration at %p\n", lvs_bdev->lvs);
|
||||
}
|
||||
|
||||
return lvs_bdev;
|
||||
@ -564,7 +564,7 @@ _vbdev_lvol_destroy_cb(void *cb_arg, int bdeverrno)
|
||||
struct spdk_lvol *lvol = ctx->lvol;
|
||||
|
||||
if (bdeverrno < 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Could not unregister bdev during lvol (%s) destroy\n",
|
||||
SPDK_INFOLOG(vbdev_lvol, "Could not unregister bdev during lvol (%s) destroy\n",
|
||||
lvol->unique_id);
|
||||
ctx->cb_fn(ctx->cb_arg, bdeverrno);
|
||||
free(ctx);
|
||||
@ -758,7 +758,7 @@ lvol_op_comp(void *cb_arg, int bserrno)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Vbdev processing callback on device %s with type %d\n",
|
||||
SPDK_INFOLOG(vbdev_lvol, "Vbdev processing callback on device %s with type %d\n",
|
||||
bdev_io->bdev->name, bdev_io->type);
|
||||
spdk_bdev_io_complete(bdev_io, status);
|
||||
}
|
||||
@ -772,7 +772,7 @@ lvol_unmap(struct spdk_lvol *lvol, struct spdk_io_channel *ch, struct spdk_bdev_
|
||||
start_page = bdev_io->u.bdev.offset_blocks;
|
||||
num_pages = bdev_io->u.bdev.num_blocks;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL,
|
||||
SPDK_INFOLOG(vbdev_lvol,
|
||||
"Vbdev doing unmap at offset %" PRIu64 " using %" PRIu64 " pages on device %s\n", start_page,
|
||||
num_pages, bdev_io->bdev->name);
|
||||
spdk_blob_io_unmap(blob, ch, start_page, num_pages, lvol_op_comp, bdev_io);
|
||||
@ -787,7 +787,7 @@ lvol_write_zeroes(struct spdk_lvol *lvol, struct spdk_io_channel *ch, struct spd
|
||||
start_page = bdev_io->u.bdev.offset_blocks;
|
||||
num_pages = bdev_io->u.bdev.num_blocks;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL,
|
||||
SPDK_INFOLOG(vbdev_lvol,
|
||||
"Vbdev doing write zeros at offset %" PRIu64 " using %" PRIu64 " pages on device %s\n", start_page,
|
||||
num_pages, bdev_io->bdev->name);
|
||||
spdk_blob_io_write_zeroes(blob, ch, start_page, num_pages, lvol_op_comp, bdev_io);
|
||||
@ -803,7 +803,7 @@ lvol_read(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io)
|
||||
start_page = bdev_io->u.bdev.offset_blocks;
|
||||
num_pages = bdev_io->u.bdev.num_blocks;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL,
|
||||
SPDK_INFOLOG(vbdev_lvol,
|
||||
"Vbdev doing read at offset %" PRIu64 " using %" PRIu64 " pages on device %s\n", start_page,
|
||||
num_pages, bdev_io->bdev->name);
|
||||
spdk_blob_io_readv(blob, ch, bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt, start_page,
|
||||
@ -819,7 +819,7 @@ lvol_write(struct spdk_lvol *lvol, struct spdk_io_channel *ch, struct spdk_bdev_
|
||||
start_page = bdev_io->u.bdev.offset_blocks;
|
||||
num_pages = bdev_io->u.bdev.num_blocks;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL,
|
||||
SPDK_INFOLOG(vbdev_lvol,
|
||||
"Vbdev doing write at offset %" PRIu64 " using %" PRIu64 " pages on device %s\n", start_page,
|
||||
num_pages, bdev_io->bdev->name);
|
||||
spdk_blob_io_writev(blob, ch, bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt, start_page,
|
||||
@ -850,7 +850,7 @@ vbdev_lvol_submit_request(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_
|
||||
{
|
||||
struct spdk_lvol *lvol = bdev_io->bdev->ctxt;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Vbdev request type %d submitted\n", bdev_io->type);
|
||||
SPDK_INFOLOG(vbdev_lvol, "Vbdev request type %d submitted\n", bdev_io->type);
|
||||
|
||||
switch (bdev_io->type) {
|
||||
case SPDK_BDEV_IO_TYPE_READ:
|
||||
@ -870,7 +870,7 @@ vbdev_lvol_submit_request(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_
|
||||
lvol_write_zeroes(lvol, ch, bdev_io);
|
||||
break;
|
||||
default:
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "lvol: unsupported I/O type %d\n", bdev_io->type);
|
||||
SPDK_INFOLOG(vbdev_lvol, "lvol: unsupported I/O type %d\n", bdev_io->type);
|
||||
spdk_bdev_io_complete(bdev_io, SPDK_BDEV_IO_STATUS_FAILED);
|
||||
return;
|
||||
}
|
||||
@ -1214,7 +1214,7 @@ static void
|
||||
_vbdev_lvol_examine_close_cb(struct spdk_lvol_store *lvs)
|
||||
{
|
||||
if (lvs->lvols_opened >= lvs->lvol_count) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Opening lvols finished\n");
|
||||
SPDK_INFOLOG(vbdev_lvol, "Opening lvols finished\n");
|
||||
spdk_bdev_module_examine_done(&g_lvol_if);
|
||||
}
|
||||
}
|
||||
@ -1236,17 +1236,17 @@ _vbdev_lvs_examine_finish(void *cb_arg, struct spdk_lvol *lvol, int lvolerrno)
|
||||
SPDK_ERRLOG("Cannot create bdev for lvol %s\n", lvol->unique_id);
|
||||
lvs->lvol_count--;
|
||||
_vbdev_lvol_examine_close_cb(lvs);
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Opening lvol %s failed\n", lvol->unique_id);
|
||||
SPDK_INFOLOG(vbdev_lvol, "Opening lvol %s failed\n", lvol->unique_id);
|
||||
return;
|
||||
}
|
||||
|
||||
lvs->lvols_opened++;
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Opening lvol %s succeeded\n", lvol->unique_id);
|
||||
SPDK_INFOLOG(vbdev_lvol, "Opening lvol %s succeeded\n", lvol->unique_id);
|
||||
|
||||
end:
|
||||
|
||||
if (lvs->lvols_opened >= lvs->lvol_count) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Opening lvols finished\n");
|
||||
SPDK_INFOLOG(vbdev_lvol, "Opening lvols finished\n");
|
||||
spdk_bdev_module_examine_done(&g_lvol_if);
|
||||
}
|
||||
}
|
||||
@ -1259,14 +1259,14 @@ _vbdev_lvs_examine_cb(void *arg, struct spdk_lvol_store *lvol_store, int lvserrn
|
||||
struct spdk_lvol *lvol, *tmp;
|
||||
|
||||
if (lvserrno == -EEXIST) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL,
|
||||
SPDK_INFOLOG(vbdev_lvol,
|
||||
"Name for lvolstore on device %s conflicts with name for already loaded lvs\n",
|
||||
req->base_bdev->name);
|
||||
/* On error blobstore destroys bs_dev itself */
|
||||
spdk_bdev_module_examine_done(&g_lvol_if);
|
||||
goto end;
|
||||
} else if (lvserrno != 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Lvol store not found on %s\n", req->base_bdev->name);
|
||||
SPDK_INFOLOG(vbdev_lvol, "Lvol store not found on %s\n", req->base_bdev->name);
|
||||
/* On error blobstore destroys bs_dev itself */
|
||||
spdk_bdev_module_examine_done(&g_lvol_if);
|
||||
goto end;
|
||||
@ -1274,7 +1274,7 @@ _vbdev_lvs_examine_cb(void *arg, struct spdk_lvol_store *lvol_store, int lvserrn
|
||||
|
||||
lvserrno = spdk_bs_bdev_claim(lvol_store->bs_dev, &g_lvol_if);
|
||||
if (lvserrno != 0) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Lvol store base bdev already claimed by another bdev\n");
|
||||
SPDK_INFOLOG(vbdev_lvol, "Lvol store base bdev already claimed by another bdev\n");
|
||||
spdk_lvs_unload(lvol_store, _vbdev_lvs_examine_failed, NULL);
|
||||
goto end;
|
||||
}
|
||||
@ -1291,13 +1291,13 @@ _vbdev_lvs_examine_cb(void *arg, struct spdk_lvol_store *lvol_store, int lvserrn
|
||||
|
||||
TAILQ_INSERT_TAIL(&g_spdk_lvol_pairs, lvs_bdev, lvol_stores);
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Lvol store found on %s - begin parsing\n",
|
||||
SPDK_INFOLOG(vbdev_lvol, "Lvol store found on %s - begin parsing\n",
|
||||
req->base_bdev->name);
|
||||
|
||||
lvol_store->lvols_opened = 0;
|
||||
|
||||
if (TAILQ_EMPTY(&lvol_store->lvols)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Lvol store examination done\n");
|
||||
SPDK_INFOLOG(vbdev_lvol, "Lvol store examination done\n");
|
||||
spdk_bdev_module_examine_done(&g_lvol_if);
|
||||
} else {
|
||||
/* Open all lvols */
|
||||
@ -1325,7 +1325,7 @@ vbdev_lvs_examine(struct spdk_bdev *bdev)
|
||||
|
||||
bs_dev = spdk_bdev_create_bs_dev(bdev, vbdev_lvs_hotremove_cb, bdev);
|
||||
if (!bs_dev) {
|
||||
SPDK_INFOLOG(SPDK_LOG_VBDEV_LVOL, "Cannot create bs dev on %s\n", bdev->name);
|
||||
SPDK_INFOLOG(vbdev_lvol, "Cannot create bs dev on %s\n", bdev->name);
|
||||
spdk_bdev_module_examine_done(&g_lvol_if);
|
||||
free(req);
|
||||
return;
|
||||
@ -1351,4 +1351,4 @@ vbdev_lvol_get_from_bdev(struct spdk_bdev *bdev)
|
||||
return (struct spdk_lvol *)bdev->ctxt;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vbdev_lvol", SPDK_LOG_VBDEV_LVOL)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vbdev_lvol)
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "spdk/string.h"
|
||||
#include "spdk_internal/log.h"
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("lvol_rpc", SPDK_LOG_LVOL_RPC)
|
||||
SPDK_LOG_REGISTER_COMPONENT(lvol_rpc)
|
||||
|
||||
struct rpc_bdev_lvol_create_lvstore {
|
||||
char *lvs_name;
|
||||
@ -52,17 +52,17 @@ vbdev_get_lvol_store_by_uuid_xor_name(const char *uuid, const char *lvs_name,
|
||||
struct spdk_lvol_store **lvs)
|
||||
{
|
||||
if ((uuid == NULL && lvs_name == NULL)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "lvs UUID nor lvs name specified\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "lvs UUID nor lvs name specified\n");
|
||||
return -EINVAL;
|
||||
} else if ((uuid && lvs_name)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "both lvs UUID '%s' and lvs name '%s' specified\n", uuid,
|
||||
SPDK_INFOLOG(lvol_rpc, "both lvs UUID '%s' and lvs name '%s' specified\n", uuid,
|
||||
lvs_name);
|
||||
return -EINVAL;
|
||||
} else if (uuid) {
|
||||
*lvs = vbdev_get_lvol_store_by_uuid(uuid);
|
||||
|
||||
if (*lvs == NULL) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "blobstore with UUID '%s' not found\n", uuid);
|
||||
SPDK_INFOLOG(lvol_rpc, "blobstore with UUID '%s' not found\n", uuid);
|
||||
return -ENODEV;
|
||||
}
|
||||
} else if (lvs_name) {
|
||||
@ -70,7 +70,7 @@ vbdev_get_lvol_store_by_uuid_xor_name(const char *uuid, const char *lvs_name,
|
||||
*lvs = vbdev_get_lvol_store_by_name(lvs_name);
|
||||
|
||||
if (*lvs == NULL) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "blobstore with name '%s' not found\n", lvs_name);
|
||||
SPDK_INFOLOG(lvol_rpc, "blobstore with name '%s' not found\n", lvs_name);
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
@ -127,7 +127,7 @@ rpc_bdev_lvol_create_lvstore(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_bdev_lvol_create_lvstore_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_lvol_create_lvstore_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -218,7 +218,7 @@ rpc_bdev_lvol_rename_lvstore(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_bdev_lvol_rename_lvstore_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_lvol_rename_lvstore_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -226,7 +226,7 @@ rpc_bdev_lvol_rename_lvstore(struct spdk_jsonrpc_request *request,
|
||||
|
||||
lvs = vbdev_get_lvol_store_by_name(req.old_name);
|
||||
if (lvs == NULL) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "no lvs existing for given name\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "no lvs existing for given name\n");
|
||||
spdk_jsonrpc_send_error_response_fmt(request, -ENOENT, "Lvol store %s not found", req.old_name);
|
||||
goto cleanup;
|
||||
}
|
||||
@ -287,7 +287,7 @@ rpc_bdev_lvol_delete_lvstore(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_bdev_lvol_delete_lvstore_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_lvol_delete_lvstore_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -363,12 +363,12 @@ rpc_bdev_lvol_create(struct spdk_jsonrpc_request *request,
|
||||
int rc = 0;
|
||||
struct spdk_lvol_store *lvs = NULL;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "Creating blob\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "Creating blob\n");
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_bdev_lvol_create_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_lvol_create_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -454,12 +454,12 @@ rpc_bdev_lvol_snapshot(struct spdk_jsonrpc_request *request,
|
||||
struct spdk_bdev *bdev;
|
||||
struct spdk_lvol *lvol;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "Snapshotting blob\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "Snapshotting blob\n");
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_bdev_lvol_snapshot_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_lvol_snapshot_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -467,7 +467,7 @@ rpc_bdev_lvol_snapshot(struct spdk_jsonrpc_request *request,
|
||||
|
||||
bdev = spdk_bdev_get_by_name(req.lvol_name);
|
||||
if (bdev == NULL) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "bdev '%s' does not exist\n", req.lvol_name);
|
||||
SPDK_INFOLOG(lvol_rpc, "bdev '%s' does not exist\n", req.lvol_name);
|
||||
spdk_jsonrpc_send_error_response(request, -ENODEV, spdk_strerror(ENODEV));
|
||||
goto cleanup;
|
||||
}
|
||||
@ -533,12 +533,12 @@ rpc_bdev_lvol_clone(struct spdk_jsonrpc_request *request,
|
||||
struct spdk_bdev *bdev;
|
||||
struct spdk_lvol *lvol;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "Cloning blob\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "Cloning blob\n");
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_bdev_lvol_clone_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_lvol_clone_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -546,7 +546,7 @@ rpc_bdev_lvol_clone(struct spdk_jsonrpc_request *request,
|
||||
|
||||
bdev = spdk_bdev_get_by_name(req.snapshot_name);
|
||||
if (bdev == NULL) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "bdev '%s' does not exist\n", req.snapshot_name);
|
||||
SPDK_INFOLOG(lvol_rpc, "bdev '%s' does not exist\n", req.snapshot_name);
|
||||
spdk_jsonrpc_send_error_response(request, -ENODEV, spdk_strerror(ENODEV));
|
||||
goto cleanup;
|
||||
}
|
||||
@ -612,12 +612,12 @@ rpc_bdev_lvol_rename(struct spdk_jsonrpc_request *request,
|
||||
struct spdk_bdev *bdev;
|
||||
struct spdk_lvol *lvol;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "Renaming lvol\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "Renaming lvol\n");
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_bdev_lvol_rename_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_lvol_rename_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -688,12 +688,12 @@ rpc_bdev_lvol_inflate(struct spdk_jsonrpc_request *request,
|
||||
struct spdk_bdev *bdev;
|
||||
struct spdk_lvol *lvol;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "Inflating lvol\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "Inflating lvol\n");
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_bdev_lvol_inflate_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_lvol_inflate_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -730,12 +730,12 @@ rpc_bdev_lvol_decouple_parent(struct spdk_jsonrpc_request *request,
|
||||
struct spdk_bdev *bdev;
|
||||
struct spdk_lvol *lvol;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "Decoupling parent of lvol\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "Decoupling parent of lvol\n");
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_bdev_lvol_inflate_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_lvol_inflate_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -808,12 +808,12 @@ rpc_bdev_lvol_resize(struct spdk_jsonrpc_request *request,
|
||||
struct spdk_bdev *bdev;
|
||||
struct spdk_lvol *lvol;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "Resizing lvol\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "Resizing lvol\n");
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_bdev_lvol_resize_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_lvol_resize_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -883,12 +883,12 @@ rpc_bdev_lvol_set_read_only(struct spdk_jsonrpc_request *request,
|
||||
struct spdk_bdev *bdev;
|
||||
struct spdk_lvol *lvol;
|
||||
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "Setting lvol as read only\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "Setting lvol as read only\n");
|
||||
|
||||
if (spdk_json_decode_object(params, rpc_set_ro_lvol_bdev_decoders,
|
||||
SPDK_COUNTOF(rpc_set_ro_lvol_bdev_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -967,7 +967,7 @@ rpc_bdev_lvol_delete(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_bdev_lvol_delete_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_lvol_delete_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -1056,7 +1056,7 @@ rpc_bdev_lvol_get_lvstores(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_bdev_lvol_get_lvstores_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_lvol_get_lvstores_decoders),
|
||||
&req)) {
|
||||
SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_INFOLOG(lvol_rpc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
|
@ -152,7 +152,7 @@ bdev_malloc_readv(struct malloc_disk *mdisk, struct spdk_io_channel *ch,
|
||||
return;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_MALLOC, "read %lu bytes from offset %#lx\n",
|
||||
SPDK_DEBUGLOG(bdev_malloc, "read %lu bytes from offset %#lx\n",
|
||||
len, offset);
|
||||
|
||||
task->status = SPDK_BDEV_IO_STATUS_SUCCESS;
|
||||
@ -186,7 +186,7 @@ bdev_malloc_writev(struct malloc_disk *mdisk, struct spdk_io_channel *ch,
|
||||
return;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_MALLOC, "wrote %lu bytes to offset %#lx\n",
|
||||
SPDK_DEBUGLOG(bdev_malloc, "wrote %lu bytes to offset %#lx\n",
|
||||
len, offset);
|
||||
|
||||
task->status = SPDK_BDEV_IO_STATUS_SUCCESS;
|
||||
@ -529,4 +529,4 @@ bdev_malloc_get_spdk_running_config(FILE *fp)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("bdev_malloc", SPDK_LOG_BDEV_MALLOC)
|
||||
SPDK_LOG_REGISTER_COMPONENT(bdev_malloc)
|
||||
|
@ -73,7 +73,7 @@ rpc_bdev_malloc_create(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_construct_malloc_decoders,
|
||||
SPDK_COUNTOF(rpc_construct_malloc_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_MALLOC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(bdev_malloc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -147,7 +147,7 @@ rpc_bdev_malloc_delete(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_delete_malloc_decoders,
|
||||
SPDK_COUNTOF(rpc_delete_malloc_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_MALLOC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(bdev_malloc, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -155,7 +155,7 @@ rpc_bdev_malloc_delete(struct spdk_jsonrpc_request *request,
|
||||
|
||||
bdev = spdk_bdev_get_by_name(req.name);
|
||||
if (bdev == NULL) {
|
||||
SPDK_INFOLOG(SPDK_LOG_BDEV_MALLOC, "bdev '%s' does not exist\n", req.name);
|
||||
SPDK_INFOLOG(bdev_malloc, "bdev '%s' does not exist\n", req.name);
|
||||
spdk_jsonrpc_send_error_response(request, -ENODEV, spdk_strerror(ENODEV));
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -547,4 +547,4 @@ bdev_null_get_spdk_running_config(FILE *fp)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("bdev_null", SPDK_LOG_BDEV_NULL)
|
||||
SPDK_LOG_REGISTER_COMPONENT(bdev_null)
|
||||
|
@ -82,7 +82,7 @@ rpc_bdev_null_create(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_construct_null_decoders,
|
||||
SPDK_COUNTOF(rpc_construct_null_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_NULL, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(bdev_null, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
|
@ -233,7 +233,7 @@ SPDK_BDEV_MODULE_REGISTER(nvme, &nvme_if)
|
||||
static void
|
||||
bdev_nvme_disconnected_qpair_cb(struct spdk_nvme_qpair *qpair, void *poll_group_ctx)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_NVME, "qpar %p is disconnected, attempting reconnect.\n", qpair);
|
||||
SPDK_DEBUGLOG(bdev_nvme, "qpar %p is disconnected, attempting reconnect.\n", qpair);
|
||||
/*
|
||||
* Currently, just try to reconnect indefinitely. If we are doing a reset, the reset will
|
||||
* reconnect a qpair and we will stop getting a callback for this one.
|
||||
@ -1038,7 +1038,7 @@ nvme_ctrlr_populate_standard_namespace(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr,
|
||||
|
||||
ns = spdk_nvme_ctrlr_get_ns(ctrlr, nvme_ns->id);
|
||||
if (!ns) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_NVME, "Invalid NS %d\n", nvme_ns->id);
|
||||
SPDK_DEBUGLOG(bdev_nvme, "Invalid NS %d\n", nvme_ns->id);
|
||||
nvme_ctrlr_populate_namespace_done(ctx, nvme_ns, -EINVAL);
|
||||
return;
|
||||
}
|
||||
@ -1127,7 +1127,7 @@ hotplug_probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
opts->medium_priority_weight = (uint8_t)g_opts.medium_priority_weight;
|
||||
opts->high_priority_weight = (uint8_t)g_opts.high_priority_weight;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_NVME, "Attaching to %s\n", trid->traddr);
|
||||
SPDK_DEBUGLOG(bdev_nvme, "Attaching to %s\n", trid->traddr);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1138,7 +1138,7 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
{
|
||||
struct nvme_probe_ctx *ctx = cb_ctx;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_NVME, "Probing device %s\n", trid->traddr);
|
||||
SPDK_DEBUGLOG(bdev_nvme, "Probing device %s\n", trid->traddr);
|
||||
|
||||
if (nvme_bdev_ctrlr_get(trid)) {
|
||||
SPDK_ERRLOG("A controller with the provided trid (traddr: %s) already exists.\n",
|
||||
@ -1158,7 +1158,7 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
}
|
||||
|
||||
if (!claim_device) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_NVME, "Not claiming device at %s\n", trid->traddr);
|
||||
SPDK_DEBUGLOG(bdev_nvme, "Not claiming device at %s\n", trid->traddr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1227,7 +1227,7 @@ timeout_cb(void *cb_arg, struct spdk_nvme_ctrlr *ctrlr,
|
||||
bdev_nvme_reset(nvme_bdev_ctrlr, NULL, false);
|
||||
break;
|
||||
case SPDK_BDEV_NVME_TIMEOUT_ACTION_NONE:
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_NVME, "No action for nvme controller timeout.\n");
|
||||
SPDK_DEBUGLOG(bdev_nvme, "No action for nvme controller timeout.\n");
|
||||
break;
|
||||
default:
|
||||
SPDK_ERRLOG("An invalid timeout action value is found.\n");
|
||||
@ -1530,7 +1530,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
return;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_NVME, "Attached to %s (%s)\n", trid->traddr, name);
|
||||
SPDK_DEBUGLOG(bdev_nvme, "Attached to %s (%s)\n", trid->traddr, name);
|
||||
|
||||
create_ctrlr(ctrlr, name, trid, prchk_flags);
|
||||
|
||||
@ -2574,7 +2574,7 @@ bdev_nvme_no_pi_readv(struct nvme_bdev_ns *nvme_ns, struct nvme_io_channel *nvme
|
||||
{
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_NVME, "read %lu blocks with offset %#lx without PI check\n",
|
||||
SPDK_DEBUGLOG(bdev_nvme, "read %lu blocks with offset %#lx without PI check\n",
|
||||
lba_count, lba);
|
||||
|
||||
bio->iovs = iov;
|
||||
@ -2600,7 +2600,7 @@ bdev_nvme_readv(struct nvme_bdev_ns *nvme_ns, struct nvme_io_channel *nvme_ch,
|
||||
{
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_NVME, "read %lu blocks with offset %#lx\n",
|
||||
SPDK_DEBUGLOG(bdev_nvme, "read %lu blocks with offset %#lx\n",
|
||||
lba_count, lba);
|
||||
|
||||
bio->iovs = iov;
|
||||
@ -2635,7 +2635,7 @@ bdev_nvme_writev(struct nvme_bdev_ns *nvme_ns, struct nvme_io_channel *nvme_ch,
|
||||
{
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_NVME, "write %lu blocks with offset %#lx\n",
|
||||
SPDK_DEBUGLOG(bdev_nvme, "write %lu blocks with offset %#lx\n",
|
||||
lba_count, lba);
|
||||
|
||||
bio->iovs = iov;
|
||||
@ -2670,7 +2670,7 @@ bdev_nvme_comparev(struct nvme_bdev_ns *nvme_ns, struct nvme_io_channel *nvme_ch
|
||||
{
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_NVME, "compare %lu blocks with offset %#lx\n",
|
||||
SPDK_DEBUGLOG(bdev_nvme, "compare %lu blocks with offset %#lx\n",
|
||||
lba_count, lba);
|
||||
|
||||
bio->iovs = iov;
|
||||
@ -2698,7 +2698,7 @@ bdev_nvme_comparev_and_writev(struct nvme_bdev_ns *nvme_ns, struct nvme_io_chann
|
||||
struct spdk_bdev_io *bdev_io = spdk_bdev_io_from_ctx(bio);
|
||||
int rc;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_NVME, "compare and write %lu blocks with offset %#lx\n",
|
||||
SPDK_DEBUGLOG(bdev_nvme, "compare and write %lu blocks with offset %#lx\n",
|
||||
lba_count, lba);
|
||||
|
||||
bio->iovs = cmp_iov;
|
||||
@ -3120,4 +3120,4 @@ bdev_nvme_get_ctrlr(struct spdk_bdev *bdev)
|
||||
return SPDK_CONTAINEROF(bdev, struct nvme_bdev, disk)->nvme_ns->ctrlr->ctrlr;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("bdev_nvme", SPDK_LOG_BDEV_NVME)
|
||||
SPDK_LOG_REGISTER_COMPONENT(bdev_nvme)
|
||||
|
@ -870,7 +870,7 @@ bdev_ocssd_chunk_notification_cb(void *ctx, const struct spdk_nvme_cpl *cpl)
|
||||
}
|
||||
|
||||
if (nvme_bdev == NULL) {
|
||||
SPDK_INFOLOG(SPDK_LOG_BDEV_OCSSD, "Dropping media management event\n");
|
||||
SPDK_INFOLOG(bdev_ocssd, "Dropping media management event\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -881,7 +881,7 @@ bdev_ocssd_chunk_notification_cb(void *ctx, const struct spdk_nvme_cpl *cpl)
|
||||
|
||||
rc = spdk_bdev_push_media_events(&nvme_bdev->disk, &event, 1);
|
||||
if (spdk_unlikely(rc < 0)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_OCSSD, "Failed to push media event: %s\n",
|
||||
SPDK_DEBUGLOG(bdev_ocssd, "Failed to push media event: %s\n",
|
||||
spdk_strerror(-rc));
|
||||
break;
|
||||
}
|
||||
@ -1494,4 +1494,4 @@ bdev_ocssd_fini_ctrlr(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr)
|
||||
nvme_bdev_ctrlr->ocssd_ctrlr = NULL;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("bdev_ocssd", SPDK_LOG_BDEV_OCSSD)
|
||||
SPDK_LOG_REGISTER_COMPONENT(bdev_ocssd)
|
||||
|
@ -187,7 +187,7 @@ _vbdev_opal_submit_request(struct spdk_io_channel *_ch, struct spdk_bdev_io *bde
|
||||
rc = spdk_bdev_part_submit_request(&ch->part_ch, bdev_io);
|
||||
if (rc) {
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_OPAL, "opal: no memory, queue io.\n");
|
||||
SPDK_DEBUGLOG(vbdev_opal, "opal: no memory, queue io.\n");
|
||||
io_ctx->ch = _ch;
|
||||
io_ctx->bdev_io = bdev_io;
|
||||
vbdev_opal_queue_io(io_ctx);
|
||||
@ -627,4 +627,4 @@ vbdev_opal_enable_new_user(const char *bdev_name, const char *admin_password, ui
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vbdev_opal", SPDK_LOG_VBDEV_OPAL)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vbdev_opal)
|
||||
|
@ -182,7 +182,7 @@ vbdev_ocf_volume_submit_io_cb(struct spdk_bdev_io *bdev_io, bool success, void *
|
||||
}
|
||||
|
||||
if (io_ctx->error) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_OCF_VOLUME,
|
||||
SPDK_DEBUGLOG(vbdev_ocf_volume,
|
||||
"base returned error on io submission: %d\n", io_ctx->error);
|
||||
}
|
||||
|
||||
@ -441,4 +441,4 @@ vbdev_ocf_volume_cleanup(void)
|
||||
ocf_ctx_unregister_volume_type(vbdev_ocf_ctx, SPDK_OBJECT);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vbdev_ocf_volume", SPDK_LOG_VBDEV_OCF_VOLUME)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vbdev_ocf_volume)
|
||||
|
@ -806,4 +806,4 @@ vbdev_passthru_examine(struct spdk_bdev *bdev)
|
||||
spdk_bdev_module_examine_done(&passthru_if);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vbdev_passthru", SPDK_LOG_VBDEV_PASSTHRU)
|
||||
SPDK_LOG_REGISTER_COMPONENT(vbdev_passthru)
|
||||
|
@ -71,7 +71,7 @@ rpc_bdev_passthru_create(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_bdev_passthru_create_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_passthru_create_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_PASSTHRU, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(vbdev_passthru, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
|
@ -134,7 +134,7 @@ bdev_pmem_submit_io(struct spdk_bdev_io *bdev_io, struct pmem_disk *pdisk,
|
||||
goto end;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_PMEM, "io %lu bytes from offset %#lx\n",
|
||||
SPDK_DEBUGLOG(bdev_pmem, "io %lu bytes from offset %#lx\n",
|
||||
num_blocks, offset_blocks);
|
||||
|
||||
for (nbytes = num_blocks * block_size; nbytes > 0; iov++) {
|
||||
@ -470,4 +470,4 @@ bdev_pmem_finish(void)
|
||||
spdk_io_device_unregister(&g_pmem_disks, bdev_pmem_finish_done);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("bdev_pmem", SPDK_LOG_BDEV_PMEM)
|
||||
SPDK_LOG_REGISTER_COMPONENT(bdev_pmem)
|
||||
|
@ -68,7 +68,7 @@ rpc_bdev_pmem_create(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_construct_pmem_decoders,
|
||||
SPDK_COUNTOF(rpc_construct_pmem_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_PMEM, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(bdev_pmem, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -123,14 +123,14 @@ rpc_bdev_pmem_delete(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_delete_pmem_decoders,
|
||||
SPDK_COUNTOF(rpc_delete_pmem_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_PMEM, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(bdev_pmem, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
}
|
||||
|
||||
bdev = spdk_bdev_get_by_name(req.name);
|
||||
if (bdev == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_PMEM, "bdev '%s' does not exist\n", req.name);
|
||||
SPDK_DEBUGLOG(bdev_pmem, "bdev '%s' does not exist\n", req.name);
|
||||
spdk_jsonrpc_send_error_response(request, -ENODEV, spdk_strerror(ENODEV));
|
||||
goto cleanup;
|
||||
}
|
||||
@ -173,7 +173,7 @@ rpc_bdev_pmem_create_pool(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_bdev_pmem_create_pool_decoders,
|
||||
SPDK_COUNTOF(rpc_bdev_pmem_create_pool_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_PMEM, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(bdev_pmem, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
@ -197,7 +197,7 @@ rpc_bdev_pmem_create_pool(struct spdk_jsonrpc_request *request,
|
||||
if (pbp == NULL) {
|
||||
const char *msg = pmemblk_errormsg();
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_PMEM, "pmemblk_create() failed: %s\n", msg ? msg : "(logs disabled)");
|
||||
SPDK_DEBUGLOG(bdev_pmem, "pmemblk_create() failed: %s\n", msg ? msg : "(logs disabled)");
|
||||
spdk_jsonrpc_send_error_response_fmt(request, -SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
||||
"pmemblk_create failed: %s", msg ? msg : "(logs disabled)");
|
||||
goto cleanup;
|
||||
|
@ -117,7 +117,7 @@ raid_bdev_create_cb(void *io_device, void *ctx_buf)
|
||||
struct raid_bdev_io_channel *raid_ch = ctx_buf;
|
||||
uint8_t i;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid_bdev_create_cb, %p\n", raid_ch);
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid_bdev_create_cb, %p\n", raid_ch);
|
||||
|
||||
assert(raid_bdev != NULL);
|
||||
assert(raid_bdev->state == RAID_BDEV_STATE_ONLINE);
|
||||
@ -170,7 +170,7 @@ raid_bdev_destroy_cb(void *io_device, void *ctx_buf)
|
||||
struct raid_bdev_io_channel *raid_ch = ctx_buf;
|
||||
uint8_t i;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid_bdev_destroy_cb\n");
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid_bdev_destroy_cb\n");
|
||||
|
||||
assert(raid_ch != NULL);
|
||||
assert(raid_ch->base_channel);
|
||||
@ -195,7 +195,7 @@ raid_bdev_destroy_cb(void *io_device, void *ctx_buf)
|
||||
static void
|
||||
raid_bdev_cleanup(struct raid_bdev *raid_bdev)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid_bdev_cleanup, %p name %s, state %u, config %p\n",
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid_bdev_cleanup, %p name %s, state %u, config %p\n",
|
||||
raid_bdev,
|
||||
raid_bdev->bdev.name, raid_bdev->state, raid_bdev->config);
|
||||
if (raid_bdev->state == RAID_BDEV_STATE_CONFIGURING) {
|
||||
@ -272,7 +272,7 @@ raid_bdev_destruct(void *ctxt)
|
||||
struct raid_bdev *raid_bdev = ctxt;
|
||||
struct raid_base_bdev_info *base_info;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid_bdev_destruct\n");
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid_bdev_destruct\n");
|
||||
|
||||
raid_bdev->destruct_called = true;
|
||||
RAID_FOR_EACH_BASE_BDEV(raid_bdev, base_info) {
|
||||
@ -300,7 +300,7 @@ raid_bdev_destruct(void *ctxt)
|
||||
|
||||
if (raid_bdev->num_base_bdevs_discovered == 0) {
|
||||
/* Free raid_bdev when there are no base bdevs left */
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid bdev base bdevs is 0, going to free all in destruct\n");
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid bdev base bdevs is 0, going to free all in destruct\n");
|
||||
raid_bdev_cleanup(raid_bdev);
|
||||
}
|
||||
|
||||
@ -617,7 +617,7 @@ raid_bdev_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)
|
||||
struct raid_bdev *raid_bdev = ctx;
|
||||
struct raid_base_bdev_info *base_info;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid_bdev_dump_config_json\n");
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid_bdev_dump_config_json\n");
|
||||
assert(raid_bdev != NULL);
|
||||
|
||||
/* Dump the raid bdev configuration related information */
|
||||
@ -730,7 +730,7 @@ raid_bdev_free(void)
|
||||
{
|
||||
struct raid_bdev_config *raid_cfg, *tmp;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid_bdev_free\n");
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid_bdev_free\n");
|
||||
TAILQ_FOREACH_SAFE(raid_cfg, &g_raid_config.raid_bdev_config_head, link, tmp) {
|
||||
raid_bdev_config_cleanup(raid_cfg);
|
||||
}
|
||||
@ -969,7 +969,7 @@ raid_bdev_parse_raid(struct spdk_conf_section *conf_section)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "%s %" PRIu32 " %u %u\n",
|
||||
SPDK_DEBUGLOG(bdev_raid, "%s %" PRIu32 " %u %u\n",
|
||||
raid_name, strip_size, num_base_bdevs, level);
|
||||
|
||||
rc = raid_bdev_config_add(raid_name, strip_size, num_base_bdevs, level,
|
||||
@ -1063,7 +1063,7 @@ raid_bdev_parse_config(void)
|
||||
static void
|
||||
raid_bdev_fini_start(void)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid_bdev_fini_start\n");
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid_bdev_fini_start\n");
|
||||
g_shutdown_started = true;
|
||||
}
|
||||
|
||||
@ -1078,7 +1078,7 @@ raid_bdev_fini_start(void)
|
||||
static void
|
||||
raid_bdev_exit(void)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid_bdev_exit\n");
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid_bdev_exit\n");
|
||||
raid_bdev_free();
|
||||
}
|
||||
|
||||
@ -1094,7 +1094,7 @@ raid_bdev_exit(void)
|
||||
static int
|
||||
raid_bdev_get_ctx_size(void)
|
||||
{
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid_bdev_get_ctx_size\n");
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid_bdev_get_ctx_size\n");
|
||||
return sizeof(struct raid_bdev_io);
|
||||
}
|
||||
|
||||
@ -1214,7 +1214,7 @@ raid_bdev_init(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid_bdev_init completed successfully\n");
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid_bdev_init completed successfully\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1329,7 +1329,7 @@ raid_bdev_alloc_base_bdev_resource(struct raid_bdev *raid_bdev, struct spdk_bdev
|
||||
return rc;
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "bdev %s is claimed\n", bdev->name);
|
||||
SPDK_DEBUGLOG(bdev_raid, "bdev %s is claimed\n", bdev->name);
|
||||
|
||||
assert(raid_bdev->state != RAID_BDEV_STATE_ONLINE);
|
||||
assert(base_bdev_slot < raid_bdev->num_base_bdevs);
|
||||
@ -1396,8 +1396,8 @@ raid_bdev_configure(struct raid_bdev *raid_bdev)
|
||||
return rc;
|
||||
}
|
||||
raid_bdev->state = RAID_BDEV_STATE_ONLINE;
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "io device register %p\n", raid_bdev);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "blockcnt %lu, blocklen %u\n",
|
||||
SPDK_DEBUGLOG(bdev_raid, "io device register %p\n", raid_bdev);
|
||||
SPDK_DEBUGLOG(bdev_raid, "blockcnt %lu, blocklen %u\n",
|
||||
raid_bdev_gen->blockcnt, raid_bdev_gen->blocklen);
|
||||
spdk_io_device_register(raid_bdev, raid_bdev_create_cb, raid_bdev_destroy_cb,
|
||||
sizeof(struct raid_bdev_io_channel),
|
||||
@ -1412,10 +1412,10 @@ raid_bdev_configure(struct raid_bdev *raid_bdev)
|
||||
raid_bdev->state = RAID_BDEV_STATE_CONFIGURING;
|
||||
return rc;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid bdev generic %p\n", raid_bdev_gen);
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid bdev generic %p\n", raid_bdev_gen);
|
||||
TAILQ_REMOVE(&g_raid_bdev_configuring_list, raid_bdev, state_link);
|
||||
TAILQ_INSERT_TAIL(&g_raid_bdev_configured_list, raid_bdev, state_link);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid bdev is created with name %s, raid_bdev %p\n",
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid bdev is created with name %s, raid_bdev %p\n",
|
||||
raid_bdev_gen->name, raid_bdev);
|
||||
|
||||
return 0;
|
||||
@ -1452,7 +1452,7 @@ raid_bdev_deconfigure(struct raid_bdev *raid_bdev, raid_bdev_destruct_cb cb_fn,
|
||||
raid_bdev->state = RAID_BDEV_STATE_OFFLINE;
|
||||
assert(raid_bdev->num_base_bdevs_discovered);
|
||||
TAILQ_INSERT_TAIL(&g_raid_bdev_offline_list, raid_bdev, state_link);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid bdev state chaning from online to offline\n");
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid bdev state chaning from online to offline\n");
|
||||
|
||||
spdk_bdev_unregister(&raid_bdev->bdev, cb_fn, cb_arg);
|
||||
}
|
||||
@ -1506,7 +1506,7 @@ raid_bdev_remove_base_bdev(void *ctx)
|
||||
struct raid_bdev *raid_bdev = NULL;
|
||||
struct raid_base_bdev_info *base_info;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid_bdev_remove_base_bdev\n");
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid_bdev_remove_base_bdev\n");
|
||||
|
||||
/* Find the raid_bdev which has claimed this base_bdev */
|
||||
if (!raid_bdev_find_by_base_bdev(base_bdev, &raid_bdev, &base_info)) {
|
||||
@ -1550,11 +1550,11 @@ raid_bdev_remove_base_devices(struct raid_bdev_config *raid_cfg,
|
||||
struct raid_bdev *raid_bdev;
|
||||
struct raid_base_bdev_info *base_info;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid_bdev_remove_base_devices\n");
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid_bdev_remove_base_devices\n");
|
||||
|
||||
raid_bdev = raid_cfg->raid_bdev;
|
||||
if (raid_bdev == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "raid bdev %s doesn't exist now\n", raid_cfg->name);
|
||||
SPDK_DEBUGLOG(bdev_raid, "raid bdev %s doesn't exist now\n", raid_cfg->name);
|
||||
if (cb_fn) {
|
||||
cb_fn(cb_arg, 0);
|
||||
}
|
||||
@ -1562,7 +1562,7 @@ raid_bdev_remove_base_devices(struct raid_bdev_config *raid_cfg,
|
||||
}
|
||||
|
||||
if (raid_bdev->destroy_started) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "destroying raid bdev %s is already started\n",
|
||||
SPDK_DEBUGLOG(bdev_raid, "destroying raid bdev %s is already started\n",
|
||||
raid_cfg->name);
|
||||
if (cb_fn) {
|
||||
cb_fn(cb_arg, -EALREADY);
|
||||
@ -1670,7 +1670,7 @@ raid_bdev_add_base_devices(struct raid_bdev_config *raid_cfg)
|
||||
for (i = 0; i < raid_cfg->num_base_bdevs; i++) {
|
||||
base_bdev = spdk_bdev_get_by_name(raid_cfg->base_bdev[i].name);
|
||||
if (base_bdev == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "base bdev %s doesn't exist now\n",
|
||||
SPDK_DEBUGLOG(bdev_raid, "base bdev %s doesn't exist now\n",
|
||||
raid_cfg->base_bdev[i].name);
|
||||
continue;
|
||||
}
|
||||
@ -1708,7 +1708,7 @@ raid_bdev_examine(struct spdk_bdev *bdev)
|
||||
if (raid_bdev_can_claim_bdev(bdev->name, &raid_cfg, &base_bdev_slot)) {
|
||||
raid_bdev_add_base_device(raid_cfg, bdev, base_bdev_slot);
|
||||
} else {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "bdev %s can't be claimed\n",
|
||||
SPDK_DEBUGLOG(bdev_raid, "bdev %s can't be claimed\n",
|
||||
bdev->name);
|
||||
}
|
||||
|
||||
@ -1716,4 +1716,4 @@ raid_bdev_examine(struct spdk_bdev *bdev)
|
||||
}
|
||||
|
||||
/* Log component for bdev raid bdev module */
|
||||
SPDK_LOG_REGISTER_COMPONENT("bdev_raid", SPDK_LOG_BDEV_RAID)
|
||||
SPDK_LOG_REGISTER_COMPONENT(bdev_raid)
|
||||
|
@ -243,7 +243,7 @@ _raid0_split_io_range(struct raid_bdev_io_range *io_range, uint8_t disk_idx,
|
||||
nblocks_in_disk = (n_strips_in_disk - 1) * io_range->strip_size
|
||||
+ end_offset_in_disk - start_offset_in_disk + 1;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID0,
|
||||
SPDK_DEBUGLOG(bdev_raid0,
|
||||
"raid_bdev (strip_size 0x%lx) splits IO to base_bdev (%u) at (0x%lx, 0x%lx).\n",
|
||||
io_range->strip_size, disk_idx, offset_in_disk, nblocks_in_disk);
|
||||
|
||||
@ -369,7 +369,7 @@ static int raid0_start(struct raid_bdev *raid_bdev)
|
||||
* of raid bdev is the number of base bdev times the minimum block count
|
||||
* of any base bdev.
|
||||
*/
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID0, "min blockcount %lu, numbasedev %u, strip size shift %u\n",
|
||||
SPDK_DEBUGLOG(bdev_raid0, "min blockcount %lu, numbasedev %u, strip size shift %u\n",
|
||||
min_blockcnt, raid_bdev->num_base_bdevs, raid_bdev->strip_size_shift);
|
||||
raid_bdev->bdev.blockcnt = ((min_blockcnt >> raid_bdev->strip_size_shift) <<
|
||||
raid_bdev->strip_size_shift) * raid_bdev->num_base_bdevs;
|
||||
@ -395,4 +395,4 @@ static struct raid_bdev_module g_raid0_module = {
|
||||
};
|
||||
RAID_MODULE_REGISTER(&g_raid0_module)
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("bdev_raid0", SPDK_LOG_BDEV_RAID0)
|
||||
SPDK_LOG_REGISTER_COMPONENT(bdev_raid0)
|
||||
|
@ -111,4 +111,4 @@ static struct raid_bdev_module g_raid5_module = {
|
||||
};
|
||||
RAID_MODULE_REGISTER(&g_raid5_module)
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("bdev_raid5", SPDK_LOG_BDEV_RAID5)
|
||||
SPDK_LOG_REGISTER_COMPONENT(bdev_raid5)
|
||||
|
@ -914,4 +914,4 @@ bdev_rbd_library_fini(void)
|
||||
spdk_io_device_unregister(&rbd_if, NULL);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("bdev_rbd", SPDK_LOG_BDEV_RBD)
|
||||
SPDK_LOG_REGISTER_COMPONENT(bdev_rbd)
|
||||
|
@ -119,7 +119,7 @@ rpc_bdev_rbd_create(struct spdk_jsonrpc_request *request,
|
||||
if (spdk_json_decode_object(params, rpc_create_rbd_decoders,
|
||||
SPDK_COUNTOF(rpc_create_rbd_decoders),
|
||||
&req)) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RBD, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(bdev_rbd, "spdk_json_decode_object failed\n");
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"spdk_json_decode_object failed");
|
||||
goto cleanup;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user