bdev/ocf: Fix typo about vbdev_ocf_qctx.
Change vbdev_ocf_qcxt to vbdev_ocf_qctx. Signed-off-by: yidong0635 <dongx.yi@intel.com> Change-Id: Ifdabb911d0ba5279b5ae4bc02a7b0873ba40ca36 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2037 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
33f97fa33a
commit
af039a7a99
@ -589,7 +589,7 @@ io_handle(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io)
|
|||||||
struct vbdev_ocf *vbdev = bdev_io->bdev->ctxt;
|
struct vbdev_ocf *vbdev = bdev_io->bdev->ctxt;
|
||||||
struct ocf_io *io = NULL;
|
struct ocf_io *io = NULL;
|
||||||
struct bdev_ocf_data *data = NULL;
|
struct bdev_ocf_data *data = NULL;
|
||||||
struct vbdev_ocf_qcxt *qctx = spdk_io_channel_get_ctx(ch);
|
struct vbdev_ocf_qctx *qctx = spdk_io_channel_get_ctx(ch);
|
||||||
uint64_t len = bdev_io->u.bdev.num_blocks * bdev_io->bdev->blocklen;
|
uint64_t len = bdev_io->u.bdev.num_blocks * bdev_io->bdev->blocklen;
|
||||||
uint64_t offset = bdev_io->u.bdev.offset_blocks * bdev_io->bdev->blocklen;
|
uint64_t offset = bdev_io->u.bdev.offset_blocks * bdev_io->bdev->blocklen;
|
||||||
int dir, flags = 0;
|
int dir, flags = 0;
|
||||||
@ -774,7 +774,7 @@ static struct spdk_bdev_fn_table cache_dev_fn_table = {
|
|||||||
static int
|
static int
|
||||||
queue_poll(void *opaque)
|
queue_poll(void *opaque)
|
||||||
{
|
{
|
||||||
struct vbdev_ocf_qcxt *qctx = opaque;
|
struct vbdev_ocf_qctx *qctx = opaque;
|
||||||
uint32_t iono = ocf_queue_pending_io(qctx->queue);
|
uint32_t iono = ocf_queue_pending_io(qctx->queue);
|
||||||
int i, max = spdk_min(32, iono);
|
int i, max = spdk_min(32, iono);
|
||||||
|
|
||||||
@ -801,7 +801,7 @@ vbdev_ocf_ctx_queue_kick(ocf_queue_t q)
|
|||||||
static void
|
static void
|
||||||
vbdev_ocf_ctx_queue_stop(ocf_queue_t q)
|
vbdev_ocf_ctx_queue_stop(ocf_queue_t q)
|
||||||
{
|
{
|
||||||
struct vbdev_ocf_qcxt *qctx = ocf_queue_get_priv(q);
|
struct vbdev_ocf_qctx *qctx = ocf_queue_get_priv(q);
|
||||||
|
|
||||||
if (qctx) {
|
if (qctx) {
|
||||||
spdk_put_io_channel(qctx->cache_ch);
|
spdk_put_io_channel(qctx->cache_ch);
|
||||||
@ -827,7 +827,7 @@ static int
|
|||||||
io_device_create_cb(void *io_device, void *ctx_buf)
|
io_device_create_cb(void *io_device, void *ctx_buf)
|
||||||
{
|
{
|
||||||
struct vbdev_ocf *vbdev = io_device;
|
struct vbdev_ocf *vbdev = io_device;
|
||||||
struct vbdev_ocf_qcxt *qctx = ctx_buf;
|
struct vbdev_ocf_qctx *qctx = ctx_buf;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = vbdev_ocf_queue_create(vbdev->ocf_cache, &qctx->queue, &queue_ops);
|
rc = vbdev_ocf_queue_create(vbdev->ocf_cache, &qctx->queue, &queue_ops);
|
||||||
@ -851,8 +851,8 @@ static void
|
|||||||
io_device_destroy_cb(void *io_device, void *ctx_buf)
|
io_device_destroy_cb(void *io_device, void *ctx_buf)
|
||||||
{
|
{
|
||||||
/* Making a copy of context to use it after io channel will be destroyed */
|
/* Making a copy of context to use it after io channel will be destroyed */
|
||||||
struct vbdev_ocf_qcxt *copy = malloc(sizeof(*copy));
|
struct vbdev_ocf_qctx *copy = malloc(sizeof(*copy));
|
||||||
struct vbdev_ocf_qcxt *qctx = ctx_buf;
|
struct vbdev_ocf_qctx *qctx = ctx_buf;
|
||||||
|
|
||||||
if (copy) {
|
if (copy) {
|
||||||
ocf_queue_set_priv(qctx->queue, copy);
|
ocf_queue_set_priv(qctx->queue, copy);
|
||||||
@ -937,7 +937,7 @@ finish_register(struct vbdev_ocf *vbdev)
|
|||||||
|
|
||||||
/* Finally register vbdev in SPDK */
|
/* Finally register vbdev in SPDK */
|
||||||
spdk_io_device_register(vbdev, io_device_create_cb, io_device_destroy_cb,
|
spdk_io_device_register(vbdev, io_device_create_cb, io_device_destroy_cb,
|
||||||
sizeof(struct vbdev_ocf_qcxt), vbdev->name);
|
sizeof(struct vbdev_ocf_qctx), vbdev->name);
|
||||||
result = spdk_bdev_register(&vbdev->exp_bdev);
|
result = spdk_bdev_register(&vbdev->exp_bdev);
|
||||||
if (result) {
|
if (result) {
|
||||||
SPDK_ERRLOG("Could not register exposed bdev %s\n",
|
SPDK_ERRLOG("Could not register exposed bdev %s\n",
|
||||||
|
@ -45,7 +45,7 @@ struct vbdev_ocf;
|
|||||||
|
|
||||||
/* Context for OCF queue poller
|
/* Context for OCF queue poller
|
||||||
* Used for mapping SPDK threads to OCF queues */
|
* Used for mapping SPDK threads to OCF queues */
|
||||||
struct vbdev_ocf_qcxt {
|
struct vbdev_ocf_qctx {
|
||||||
/* OCF queue. Contains OCF requests */
|
/* OCF queue. Contains OCF requests */
|
||||||
struct ocf_queue *queue;
|
struct ocf_queue *queue;
|
||||||
/* Poller for OCF queue. Runs OCF requests */
|
/* Poller for OCF queue. Runs OCF requests */
|
||||||
@ -58,7 +58,7 @@ struct vbdev_ocf_qcxt {
|
|||||||
/* If true, we have to free this context on queue stop */
|
/* If true, we have to free this context on queue stop */
|
||||||
bool allocated;
|
bool allocated;
|
||||||
/* Link to per-bdev list of queue contexts */
|
/* Link to per-bdev list of queue contexts */
|
||||||
TAILQ_ENTRY(vbdev_ocf_qcxt) tailq;
|
TAILQ_ENTRY(vbdev_ocf_qctx) tailq;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Important states */
|
/* Important states */
|
||||||
|
@ -204,7 +204,7 @@ static int
|
|||||||
prepare_submit(struct ocf_io *io)
|
prepare_submit(struct ocf_io *io)
|
||||||
{
|
{
|
||||||
struct ocf_io_ctx *io_ctx = ocf_get_io_ctx(io);
|
struct ocf_io_ctx *io_ctx = ocf_get_io_ctx(io);
|
||||||
struct vbdev_ocf_qcxt *qctx;
|
struct vbdev_ocf_qctx *qctx;
|
||||||
struct vbdev_ocf_base *base;
|
struct vbdev_ocf_base *base;
|
||||||
ocf_queue_t q = io->io_queue;
|
ocf_queue_t q = io->io_queue;
|
||||||
ocf_cache_t cache;
|
ocf_cache_t cache;
|
||||||
|
Loading…
Reference in New Issue
Block a user