lvol: remove lvol_task structure
Last and only usage of struct lvol_task was removed in previous patch. Since it is no longer used, remove the structure itself. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I3612106de2ab3a9197245de078c73c53beeff443 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1971 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
4e4c293b9a
commit
b31b4229a7
@ -116,10 +116,6 @@ struct spdk_lvol {
|
||||
TAILQ_ENTRY(spdk_lvol) link;
|
||||
};
|
||||
|
||||
struct lvol_task {
|
||||
enum spdk_bdev_io_status status;
|
||||
};
|
||||
|
||||
struct lvol_store_bdev *vbdev_lvol_store_first(void);
|
||||
struct lvol_store_bdev *vbdev_lvol_store_next(struct lvol_store_bdev *prev);
|
||||
|
||||
|
@ -747,8 +747,7 @@ vbdev_lvol_io_type_supported(void *ctx, enum spdk_bdev_io_type io_type)
|
||||
static void
|
||||
lvol_op_comp(void *cb_arg, int bserrno)
|
||||
{
|
||||
struct lvol_task *task = cb_arg;
|
||||
struct spdk_bdev_io *bdev_io = spdk_bdev_io_from_ctx(task);
|
||||
struct spdk_bdev_io *bdev_io = cb_arg;
|
||||
enum spdk_bdev_io_status status = SPDK_BDEV_IO_STATUS_SUCCESS;
|
||||
|
||||
if (bserrno != 0) {
|
||||
@ -769,7 +768,6 @@ lvol_unmap(struct spdk_lvol *lvol, struct spdk_io_channel *ch, struct spdk_bdev_
|
||||
{
|
||||
uint64_t start_page, num_pages;
|
||||
struct spdk_blob *blob = lvol->blob;
|
||||
struct lvol_task *task = (struct lvol_task *)bdev_io->driver_ctx;
|
||||
|
||||
start_page = bdev_io->u.bdev.offset_blocks;
|
||||
num_pages = bdev_io->u.bdev.num_blocks;
|
||||
@ -777,7 +775,7 @@ lvol_unmap(struct spdk_lvol *lvol, struct spdk_io_channel *ch, struct spdk_bdev_
|
||||
SPDK_INFOLOG(SPDK_LOG_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, task);
|
||||
spdk_blob_io_unmap(blob, ch, start_page, num_pages, lvol_op_comp, bdev_io);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -785,7 +783,6 @@ lvol_write_zeroes(struct spdk_lvol *lvol, struct spdk_io_channel *ch, struct spd
|
||||
{
|
||||
uint64_t start_page, num_pages;
|
||||
struct spdk_blob *blob = lvol->blob;
|
||||
struct lvol_task *task = (struct lvol_task *)bdev_io->driver_ctx;
|
||||
|
||||
start_page = bdev_io->u.bdev.offset_blocks;
|
||||
num_pages = bdev_io->u.bdev.num_blocks;
|
||||
@ -793,7 +790,7 @@ lvol_write_zeroes(struct spdk_lvol *lvol, struct spdk_io_channel *ch, struct spd
|
||||
SPDK_INFOLOG(SPDK_LOG_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, task);
|
||||
spdk_blob_io_write_zeroes(blob, ch, start_page, num_pages, lvol_op_comp, bdev_io);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -802,7 +799,6 @@ lvol_read(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io)
|
||||
uint64_t start_page, num_pages;
|
||||
struct spdk_lvol *lvol = bdev_io->bdev->ctxt;
|
||||
struct spdk_blob *blob = lvol->blob;
|
||||
struct lvol_task *task = (struct lvol_task *)bdev_io->driver_ctx;
|
||||
|
||||
start_page = bdev_io->u.bdev.offset_blocks;
|
||||
num_pages = bdev_io->u.bdev.num_blocks;
|
||||
@ -811,7 +807,7 @@ lvol_read(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io)
|
||||
"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,
|
||||
num_pages, lvol_op_comp, task);
|
||||
num_pages, lvol_op_comp, bdev_io);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -819,7 +815,6 @@ lvol_write(struct spdk_lvol *lvol, struct spdk_io_channel *ch, struct spdk_bdev_
|
||||
{
|
||||
uint64_t start_page, num_pages;
|
||||
struct spdk_blob *blob = lvol->blob;
|
||||
struct lvol_task *task = (struct lvol_task *)bdev_io->driver_ctx;
|
||||
|
||||
start_page = bdev_io->u.bdev.offset_blocks;
|
||||
num_pages = bdev_io->u.bdev.num_blocks;
|
||||
@ -828,7 +823,7 @@ lvol_write(struct spdk_lvol *lvol, struct spdk_io_channel *ch, struct spdk_bdev_
|
||||
"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,
|
||||
num_pages, lvol_op_comp, task);
|
||||
num_pages, lvol_op_comp, bdev_io);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -1206,7 +1201,7 @@ vbdev_lvs_init(void)
|
||||
static int
|
||||
vbdev_lvs_get_ctx_size(void)
|
||||
{
|
||||
return sizeof(struct lvol_task);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -51,7 +51,6 @@ struct lvol_store_bdev *g_lvs_bdev = NULL;
|
||||
struct spdk_bdev *g_base_bdev = NULL;
|
||||
struct spdk_bdev_io *g_io = NULL;
|
||||
struct spdk_io_channel *g_ch = NULL;
|
||||
struct lvol_task *g_task = NULL;
|
||||
|
||||
static struct spdk_bdev g_bdev = {};
|
||||
static struct spdk_lvol_store *g_lvol_store = NULL;
|
||||
@ -1309,7 +1308,7 @@ ut_vbdev_lvol_io_type_supported(void)
|
||||
static void
|
||||
ut_lvol_read_write(void)
|
||||
{
|
||||
g_io = calloc(1, sizeof(struct spdk_bdev_io) + sizeof(struct lvol_task));
|
||||
g_io = calloc(1, sizeof(struct spdk_bdev_io));
|
||||
SPDK_CU_ASSERT_FATAL(g_io != NULL);
|
||||
g_base_bdev = calloc(1, sizeof(struct spdk_bdev));
|
||||
SPDK_CU_ASSERT_FATAL(g_base_bdev != NULL);
|
||||
@ -1336,11 +1335,10 @@ static void
|
||||
ut_vbdev_lvol_submit_request(void)
|
||||
{
|
||||
struct spdk_lvol request_lvol = {};
|
||||
g_io = calloc(1, sizeof(struct spdk_bdev_io) + sizeof(struct lvol_task));
|
||||
g_io = calloc(1, sizeof(struct spdk_bdev_io));
|
||||
SPDK_CU_ASSERT_FATAL(g_io != NULL);
|
||||
g_base_bdev = calloc(1, sizeof(struct spdk_bdev));
|
||||
SPDK_CU_ASSERT_FATAL(g_base_bdev != NULL);
|
||||
g_task = (struct lvol_task *)g_io->driver_ctx;
|
||||
g_io->bdev = g_base_bdev;
|
||||
|
||||
g_io->type = SPDK_BDEV_IO_TYPE_READ;
|
||||
|
Loading…
Reference in New Issue
Block a user