From 244271120e7cdc77ddecc1b5ecf3b6052b7b84d0 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Tue, 26 Jul 2016 01:42:26 +0000 Subject: [PATCH] iscsi-scst: increase past CmdSN window to 2048 On modern storage there might be more, than 128, commands queued, so previous CmdSN window might be too small and on unstable networks lead to infinite retries. For more infor see thread https://sourceforge.net/p/scst/mailman/message/35238904. Reported-By: Lev Vainblat git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6917 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/iscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index 834e93ddb..4dc07f0b4 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -2458,9 +2458,9 @@ static int cmnd_abort_pre_checks(struct iscsi_cmnd *req, int *status) * Management function request is outside the valid CmdSN window, * then targets must return the "Task does not exist" response. * - * 128 seems to be a good "window". + * 2048 seems to be a good "window". */ - if (between(req_hdr->ref_cmd_sn, req_hdr->cmd_sn - 128, + if (between(req_hdr->ref_cmd_sn, req_hdr->cmd_sn - 2048, req_hdr->cmd_sn)) { *status = ISCSI_RESPONSE_FUNCTION_COMPLETE; res = 0;