Nobody needs it. Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> --- usr/bs_aio.c | 6 ------ usr/bs_null.c | 6 ------ usr/bs_rdwr.c | 6 ------ usr/bs_sg.c | 7 ------- usr/bs_ssc.c | 6 ------ usr/target.c | 15 ++++----------- usr/tgtd.h | 1 - 7 files changed, 4 insertions(+), 43 deletions(-) diff --git a/usr/bs_aio.c b/usr/bs_aio.c index 7acbb75..2828961 100644 --- a/usr/bs_aio.c +++ b/usr/bs_aio.c @@ -231,11 +231,6 @@ static int bs_aio_cmd_submit(struct scsi_cmd *cmd) return ret; } -static int bs_aio_cmd_done(struct scsi_cmd *cmd) -{ - return 0; -} - static struct backingstore_template aio_bst = { .bs_name = "aio", .bs_datasize = sizeof(struct bs_aio_info), @@ -244,7 +239,6 @@ static struct backingstore_template aio_bst = { .bs_open = bs_aio_open, .bs_close = bs_aio_close, .bs_cmd_submit = bs_aio_cmd_submit, - .bs_cmd_done = bs_aio_cmd_done, }; __attribute__((constructor)) static void bs_rdwr_constructor(void) diff --git a/usr/bs_null.c b/usr/bs_null.c index 00137ff..d463f18 100644 --- a/usr/bs_null.c +++ b/usr/bs_null.c @@ -48,18 +48,12 @@ static void bs_null_close(struct scsi_lu *lu) { } -static int bs_null_cmd_done(struct scsi_cmd *cmd) -{ - return 0; -} - static struct backingstore_template null_bst = { .bs_name = "null", .bs_datasize = 0, .bs_open = bs_null_open, .bs_close = bs_null_close, .bs_cmd_submit = bs_null_cmd_submit, - .bs_cmd_done = bs_null_cmd_done, }; __attribute__((constructor)) static void bs_null_constructor(void) diff --git a/usr/bs_rdwr.c b/usr/bs_rdwr.c index 1ee044a..29db403 100644 --- a/usr/bs_rdwr.c +++ b/usr/bs_rdwr.c @@ -162,11 +162,6 @@ static void bs_rdwr_exit(struct scsi_lu *lu) bs_thread_close(info); } -static int bs_rdwr_cmd_done(struct scsi_cmd *cmd) -{ - return 0; -} - static struct backingstore_template rdwr_bst = { .bs_name = "rdwr", .bs_datasize = sizeof(struct bs_thread_info), @@ -175,7 +170,6 @@ static struct backingstore_template rdwr_bst = { .bs_init = bs_rdwr_init, .bs_exit = bs_rdwr_exit, .bs_cmd_submit = bs_thread_cmd_submit, - .bs_cmd_done = bs_rdwr_cmd_done, .bs_oflags_supported = O_SYNC | O_DIRECT, }; diff --git a/usr/bs_sg.c b/usr/bs_sg.c index c4c9ca0..53e9e0f 100644 --- a/usr/bs_sg.c +++ b/usr/bs_sg.c @@ -463,11 +463,6 @@ static void bs_sg_close(struct scsi_lu *lu) close(lu->fd); } -static int bs_sg_cmd_done(struct scsi_cmd *cmd) -{ - return 0; -} - static int bs_sg_lu_init(struct scsi_lu *lu) { if (spc_lu_init(lu)) @@ -483,7 +478,6 @@ static struct backingstore_template sg_bst = { .bs_open = bs_sg_open, .bs_close = bs_sg_close, .bs_cmd_submit = bs_sg_cmd_submit, - .bs_cmd_done = bs_sg_cmd_done, }; static struct backingstore_template bsg_bst = { @@ -493,7 +487,6 @@ static struct backingstore_template bsg_bst = { .bs_open = bs_sg_open, .bs_close = bs_sg_close, .bs_cmd_submit = bs_bsg_cmd_submit, - .bs_cmd_done = bs_sg_cmd_done, }; static struct device_type_template sg_template = { diff --git a/usr/bs_ssc.c b/usr/bs_ssc.c index 8e57c1c..b80ece8 100644 --- a/usr/bs_ssc.c +++ b/usr/bs_ssc.c @@ -686,11 +686,6 @@ static void bs_ssc_close(struct scsi_lu *lu) close(lu->fd); } -static int bs_ssc_cmd_done(struct scsi_cmd *cmd) -{ - return 0; -} - static struct backingstore_template ssc_bst = { .bs_name = "ssc", .bs_datasize = sizeof(struct bs_thread_info), @@ -699,7 +694,6 @@ static struct backingstore_template ssc_bst = { .bs_open = bs_ssc_open, .bs_close = bs_ssc_close, .bs_cmd_submit = bs_thread_cmd_submit, - .bs_cmd_done = bs_ssc_cmd_done, }; __attribute__((constructor)) static void bs_ssc_constructor(void) diff --git a/usr/target.c b/usr/target.c index 21575dc..5f04cf9 100644 --- a/usr/target.c +++ b/usr/target.c @@ -1055,15 +1055,12 @@ static void post_cmd_done(struct tgt_cmd_queue *q) static void __cmd_done(struct target *target, struct scsi_cmd *cmd) { struct tgt_cmd_queue *q; - int err; cmd_hlist_remove(cmd); - err = target->bst->bs_cmd_done(cmd); - - dprintf("%p %p %u %u %d\n", scsi_get_out_buffer(cmd), + dprintf("%p %p %u %u\n", scsi_get_out_buffer(cmd), scsi_get_in_buffer(cmd), scsi_get_out_length(cmd), - scsi_get_in_length(cmd), err); + scsi_get_in_length(cmd)); q = &cmd->dev->cmd_queue; q->active_cmd--; @@ -1082,13 +1079,9 @@ static void __cmd_done(struct target *target, struct scsi_cmd *cmd) */ void __cmd_done_passthrough(struct target *target, struct scsi_cmd *cmd) { - int err; - - err = target->bst->bs_cmd_done(cmd); - - dprintf("%p %p %u %u %d\n", scsi_get_out_buffer(cmd), + dprintf("%p %p %u %u\n", scsi_get_out_buffer(cmd), scsi_get_in_buffer(cmd), scsi_get_out_length(cmd), - scsi_get_in_length(cmd), err); + scsi_get_in_length(cmd)); } struct scsi_cmd *target_cmd_lookup(int tid, uint64_t itn_id, uint64_t tag) diff --git a/usr/tgtd.h b/usr/tgtd.h index 47824dc..3f1eb5b 100644 --- a/usr/tgtd.h +++ b/usr/tgtd.h @@ -124,7 +124,6 @@ struct backingstore_template { int (*bs_init)(struct scsi_lu *dev); void (*bs_exit)(struct scsi_lu *dev); int (*bs_cmd_submit)(struct scsi_cmd *cmd); - int (*bs_cmd_done)(struct scsi_cmd *cmd); int bs_oflags_supported; struct list_head backingstore_siblings; -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html