Message ID | 940698fdb1ca47d8c392fa687f971842d215d083.1455467089.git.varun@chelsio.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Sun, Feb 14, 2016 at 11:15:31PM +0530, Varun Prakash wrote: > call validate params function if registered > by transport driver before starting negotiation, > so that transport driver can validate and update > the value of parameters. Should go together with the introduction of the method. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Mar 01, 2016 at 08:33:18PM +0530, Christoph Hellwig wrote: > On Sun, Feb 14, 2016 at 11:15:31PM +0530, Varun Prakash wrote: > > call validate params function if registered > > by transport driver before starting negotiation, > > so that transport driver can validate and update > > the value of parameters. > > Should go together with the introduction of the method. Ok, I will update it in v2 series. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index 616ec9e..83c3643 100644 --- a/drivers/target/iscsi/iscsi_target_login.c +++ b/drivers/target/iscsi/iscsi_target_login.c @@ -1375,6 +1375,16 @@ static int __iscsi_target_login_thread(struct iscsi_np *np) goto old_sess_out; } + if (conn->conn_transport->iscsit_validate_params) { + ret = conn->conn_transport->iscsit_validate_params(conn); + if (ret < 0) { + if (zero_tsih) + goto new_sess_out; + else + goto old_sess_out; + } + } + ret = iscsi_target_start_negotiation(login, conn); if (ret < 0) goto new_sess_out;
call validate params function if registered by transport driver before starting negotiation, so that transport driver can validate and update the value of parameters. Signed-off-by: Varun Prakash <varun@chelsio.com> --- drivers/target/iscsi/iscsi_target_login.c | 10 ++++++++++ 1 file changed, 10 insertions(+)