Re: [PATCH 22/42] target: Remove iscsi_session.ooo_cmdsn_count

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

 



On Fri, 2011-05-27 at 12:07 -0700, Andy Grover wrote:
> It's marginally useful for debugging, but modulo bugs, all we need
> to know is if there are a nonzero number entries on the ooo list to
> handle things properly.
> 
> Signed-off-by: Andy Grover <agrover@xxxxxxxxxx>
> ---

Looks fine.  Committed as 5ece32ec2a

Thanks,

--nab

>  drivers/target/iscsi/iscsi_target_core.h |    1 -
>  drivers/target/iscsi/iscsi_target_erl1.c |    4 ----
>  drivers/target/iscsi/iscsi_target_erl2.c |    1 -
>  drivers/target/iscsi/iscsi_target_util.c |   24 +++++++++---------------
>  4 files changed, 9 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/target/iscsi/iscsi_target_core.h b/drivers/target/iscsi/iscsi_target_core.h
> index 1779f07..0eaf86b 100644
> --- a/drivers/target/iscsi/iscsi_target_core.h
> +++ b/drivers/target/iscsi/iscsi_target_core.h
> @@ -611,7 +611,6 @@ struct iscsi_session {
>  	u32			max_cmd_sn;
>  	struct list_head	sess_ooo_cmdsn_list;
>  
> -	u32			ooo_cmdsn_count;
>  	/* LIO specific session ID */
>  	u32			sid;
>  	char			auth_type[8];
> diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
> index 67f5541..0902457 100644
> --- a/drivers/target/iscsi/iscsi_target_erl1.c
> +++ b/drivers/target/iscsi/iscsi_target_erl1.c
> @@ -844,10 +844,6 @@ static int iscsit_attach_ooo_cmdsn(
>  			}
>  		}
>  	}
> -	sess->ooo_cmdsn_count++;
> -
> -	TRACE(TRACE_CMDSN, "Set out of order CmdSN count for SID:"
> -		" %u to %hu.\n", sess->sid, sess->ooo_cmdsn_count);
>  
>  	return 0;
>  }
> diff --git a/drivers/target/iscsi/iscsi_target_erl2.c b/drivers/target/iscsi/iscsi_target_erl2.c
> index 9c24873..ad7d7ce 100644
> --- a/drivers/target/iscsi/iscsi_target_erl2.c
> +++ b/drivers/target/iscsi/iscsi_target_erl2.c
> @@ -313,7 +313,6 @@ int iscsit_discard_unacknowledged_ooo_cmdsns_for_conn(struct iscsi_conn *conn)
>  			ooo_cmdsn->cmdsn, conn->cid);
>  		iscsit_remove_ooo_cmdsn(sess, ooo_cmdsn);
>  	}
> -	conn->sess->ooo_cmdsn_count -= dropped_count;
>  	spin_unlock(&sess->cmdsn_lock);
>  
>  	spin_lock_bh(&conn->cmd_lock);
> diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c
> index 2348ad2..144f555 100644
> --- a/drivers/target/iscsi/iscsi_target_util.c
> +++ b/drivers/target/iscsi/iscsi_target_util.c
> @@ -461,23 +461,17 @@ inline int iscsit_check_received_cmdsn(
>  			return CMDSN_ERROR_CANNOT_RECOVER;
>  		}
>  
> -		if (counter == conn->sess->ooo_cmdsn_count) {
> -			if (conn->sess->ooo_cmdsn_count == 1) {
> -				TRACE(TRACE_CMDSN, "Received final missing"
> -					" CmdSN: 0x%08x.\n", old_expcmdsn);
> -			} else {
> -				TRACE(TRACE_CMDSN, "Received final missing"
> -					" CmdSNs: 0x%08x->0x%08x.\n",
> -				old_expcmdsn, (conn->sess->exp_cmd_sn - 1));
> -			}
> -
> -			conn->sess->ooo_cmdsn_count = 0;
> +#ifdef CONFIG_ISCSI_TARGET_DEBUG
> +		if (list_empty(&conn->sess->sess_ooo_cmdsn_list)) {
> +			TRACE(TRACE_CMDSN, "Received final missing"
> +			      " CmdSNs: 0x%08x->0x%08x.\n",
> +			      old_expcmdsn, (conn->sess->exp_cmd_sn - 1));
>  		} else {
> -			conn->sess->ooo_cmdsn_count -= counter;
> -			TRACE(TRACE_CMDSN, "Still missing %hu CmdSN(s),"
> -				" continuing out of order operation.\n",
> -				conn->sess->ooo_cmdsn_count);
> +			TRACE(TRACE_CMDSN, "Still missing CmdSN(s),"
> +				" continuing out of order operation.\n");
>  		}
> +#endif
> +
>  		spin_unlock(&conn->sess->cmdsn_lock);
>  		return CMDSN_NORMAL_OPERATION;
>  	}
> -- 
> 1.7.1
> 

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