On Jul 12, 2012, at 5:56 PM, Nicholas A. Bellinger wrote: > On Sun, 2012-07-08 at 15:58 -0400, Christoph Hellwig wrote: >> plain text document attachment (tcm-fc-use-target_execute_cmd) >> Defer the write processing to the internal to be able to use >> target_execute_cmd. I'm not even entirely sure the calling code requires >> this due to the convoluted structure in libfc, but let's be safe for now. >> >> Signed-off-by: Christoph Hellwig <hch@xxxxxx> > > Looks fine. Adding a little more to the comment, and CC'ing MDR for > good measure. Right at the moment I have to say that I don't know. I've been working on some other things and so my repo is a bit behind the times (mine doesn't have target_execute_cmd). I will find time to take a look at it, and probably run some tests to be sure, later today. >> --- >> drivers/target/tcm_fc/tfc_io.c | 13 +++++++++++-- >> 1 file changed, 11 insertions(+), 2 deletions(-) >> >> Index: lio-core/drivers/target/tcm_fc/tfc_io.c >> =================================================================== >> --- lio-core.orig/drivers/target/tcm_fc/tfc_io.c 2012-07-01 14:29:04.400928679 +0200 >> +++ lio-core/drivers/target/tcm_fc/tfc_io.c 2012-07-01 14:29:37.147595150 +0200 >> @@ -183,6 +183,13 @@ int ft_queue_data_in(struct se_cmd *se_c >> return ft_queue_status(se_cmd); >> } >> >> +static void ft_execute_work(struct work_struct *work) >> +{ >> + struct ft_cmd *cmd = container_of(work, struct ft_cmd, work); >> + >> + target_execute_cmd(&cmd->se_cmd); >> +} >> + >> /* >> * Receive write data frame. >> */ >> @@ -307,8 +314,10 @@ void ft_recv_write_data(struct ft_cmd *c >> cmd->write_data_len += tlen; >> } >> last_frame: >> - if (cmd->write_data_len == se_cmd->data_length) >> - transport_generic_handle_data(se_cmd); >> + if (cmd->write_data_len == se_cmd->data_length) { >> + INIT_WORK(&cmd->work, ft_execute_work); >> + queue_work(cmd->sess->tport->tpg->workqueue, &cmd->work); >> + } >> drop: >> fc_frame_free(fp); >> } -- Mark Rustad, LAN Access Division, Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html