diff options
Diffstat (limited to 'drivers/target/target_core_iblock.c')
-rw-r--r-- | drivers/target/target_core_iblock.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index c2d4ccbb7133..eb94367380c1 100644 --- a/drivers/target/target_core_iblock.c +++ b/drivers/target/target_core_iblock.c | |||
@@ -514,9 +514,11 @@ static void iblock_submit_bios(struct bio_list *list, int rw) | |||
514 | blk_finish_plug(&plug); | 514 | blk_finish_plug(&plug); |
515 | } | 515 | } |
516 | 516 | ||
517 | static int iblock_execute_cmd(struct se_cmd *cmd, struct scatterlist *sgl, | 517 | static int iblock_execute_rw(struct se_cmd *cmd) |
518 | u32 sgl_nents, enum dma_data_direction data_direction) | ||
519 | { | 518 | { |
519 | struct scatterlist *sgl = cmd->t_data_sg; | ||
520 | u32 sgl_nents = cmd->t_data_nents; | ||
521 | enum dma_data_direction data_direction = cmd->data_direction; | ||
520 | struct se_device *dev = cmd->se_dev; | 522 | struct se_device *dev = cmd->se_dev; |
521 | struct iblock_req *ibr; | 523 | struct iblock_req *ibr; |
522 | struct bio *bio; | 524 | struct bio *bio; |
@@ -663,6 +665,15 @@ static void iblock_bio_done(struct bio *bio, int err) | |||
663 | iblock_complete_cmd(cmd); | 665 | iblock_complete_cmd(cmd); |
664 | } | 666 | } |
665 | 667 | ||
668 | static struct spc_ops iblock_spc_ops = { | ||
669 | .execute_rw = iblock_execute_rw, | ||
670 | }; | ||
671 | |||
672 | static int iblock_parse_cdb(struct se_cmd *cmd) | ||
673 | { | ||
674 | return sbc_parse_cdb(cmd, &iblock_spc_ops); | ||
675 | } | ||
676 | |||
666 | static struct se_subsystem_api iblock_template = { | 677 | static struct se_subsystem_api iblock_template = { |
667 | .name = "iblock", | 678 | .name = "iblock", |
668 | .owner = THIS_MODULE, | 679 | .owner = THIS_MODULE, |
@@ -674,8 +685,7 @@ static struct se_subsystem_api iblock_template = { | |||
674 | .allocate_virtdevice = iblock_allocate_virtdevice, | 685 | .allocate_virtdevice = iblock_allocate_virtdevice, |
675 | .create_virtdevice = iblock_create_virtdevice, | 686 | .create_virtdevice = iblock_create_virtdevice, |
676 | .free_device = iblock_free_device, | 687 | .free_device = iblock_free_device, |
677 | .parse_cdb = sbc_parse_cdb, | 688 | .parse_cdb = iblock_parse_cdb, |
678 | .execute_cmd = iblock_execute_cmd, | ||
679 | .do_discard = iblock_do_discard, | 689 | .do_discard = iblock_do_discard, |
680 | .do_sync_cache = iblock_emulate_sync_cache, | 690 | .do_sync_cache = iblock_emulate_sync_cache, |
681 | .check_configfs_dev_params = iblock_check_configfs_dev_params, | 691 | .check_configfs_dev_params = iblock_check_configfs_dev_params, |