Re: [PATCH 05/12] iscsit: use target_execute_cmd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2012-07-08 at 15:58 -0400, Christoph Hellwig wrote:
> plain text document attachment (iscsit-use-target_execute_cmd)
> All three callers of transport_generic_handle_data are from user context
> and can use target_execute_cmd directly.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> 

Looks good.  CC'ing Agrover for good measure.

Also, added a little more to the comment here to be more specific (eg:
it's only for backend I/O submission of WRITEs).

> ---
>  drivers/target/iscsi/iscsi_target.c      |    6 ++++--
>  drivers/target/iscsi/iscsi_target_erl1.c |    4 ++--
>  drivers/target/iscsi/iscsi_target_tmr.c  |    3 ++-
>  3 files changed, 8 insertions(+), 5 deletions(-)
> 
> Index: lio-core/drivers/target/iscsi/iscsi_target.c
> ===================================================================
> --- lio-core.orig/drivers/target/iscsi/iscsi_target.c	2012-07-01 14:29:18.684261928 +0200
> +++ lio-core/drivers/target/iscsi/iscsi_target.c	2012-07-01 14:29:29.674261861 +0200
> @@ -1413,8 +1413,10 @@ static int iscsit_handle_data_out(struct
>  		spin_unlock_bh(&cmd->istate_lock);
>  
>  		iscsit_stop_dataout_timer(cmd);
> -		return (!ooo_cmdsn) ? transport_generic_handle_data(
> -					&cmd->se_cmd) : 0;
> +		if (ooo_cmdsn)
> +			return 0;
> +		target_execute_cmd(&cmd->se_cmd);
> +		return 0;
>  	} else /* DATAOUT_CANNOT_RECOVER */
>  		return -1;
>  
> Index: lio-core/drivers/target/iscsi/iscsi_target_erl1.c
> ===================================================================
> --- lio-core.orig/drivers/target/iscsi/iscsi_target_erl1.c	2012-07-01 14:29:18.684261928 +0200
> +++ lio-core/drivers/target/iscsi/iscsi_target_erl1.c	2012-07-01 14:29:29.674261861 +0200
> @@ -965,8 +965,8 @@ int iscsit_execute_cmd(struct iscsi_cmd
>  		if (cmd->immediate_data) {
>  			if (cmd->cmd_flags & ICF_GOT_LAST_DATAOUT) {
>  				spin_unlock_bh(&cmd->istate_lock);
> -				return transport_generic_handle_data(
> -						&cmd->se_cmd);
> +				target_execute_cmd(&cmd->se_cmd);
> +				return 0;
>  			}
>  			spin_unlock_bh(&cmd->istate_lock);
>  
> Index: lio-core/drivers/target/iscsi/iscsi_target_tmr.c
> ===================================================================
> --- lio-core.orig/drivers/target/iscsi/iscsi_target_tmr.c	2012-07-01 14:29:18.500928595 +0200
> +++ lio-core/drivers/target/iscsi/iscsi_target_tmr.c	2012-07-01 14:29:29.677595194 +0200
> @@ -257,7 +257,8 @@ static int iscsit_task_reassign_complete
>  			pr_debug("WRITE ITT: 0x%08x: t_state: %d"
>  				" never sent to transport\n",
>  				cmd->init_task_tag, cmd->se_cmd.t_state);
> -			return transport_generic_handle_data(se_cmd);
> +			target_execute_cmd(se_cmd);
> +			return 0;
>  		}
>  
>  		cmd->i_state = ISTATE_SEND_STATUS;
> 
> --
> 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


--
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


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux