ibmvscsis: Fix srp_transfer_data fail return code
Subsystems (3)
PATCH 1/1 ibmvscsis: Fix srp_transfer_data fail return code
From: "Bryant G. Ly" <[email protected]>
If srp_transfer_data fails within ibmvscsis_write_pending, then the most likely scenario is that the client timed out the op and removed the TCE mapping. Thus it will loop forever retrying the op that is pretty much guaranteed to fail forever. A better return code would be EIO instead of EAGAIN.
--- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +1 -1
@@ -3585,7 +3585,7 @@ static int ibmvscsis_write_pending(struct se_cmd *se_cmd) 1, 1);if (rc) {pr_err ("srp_transfer_data() failed: %d\n" , rc); -return -EAGAIN ; +return -EIO ; }/* * We now tell TCM to add this WRITE CDB directly into the TCM storage
Signature · 1 line
2.5.4 (Apple Git-61)
Greg KH
maintainerQuoted 8 lines · Bryant G. Ly
From: "Bryant G. Ly" <[email protected]>
If
srp_transfer_datafails withinibmvscsis_write_pending, then the most likely scenario is that the client timed out the op and removed the TCE mapping. Thus it will loop forever retrying the op that is pretty much guaranteed to fail forever. A better return code would be EIO instead of EAGAIN.
Quoted 7 lines
Reported-by Steven Royer <[email protected]>Tested-by Steven Royer <[email protected]>Signed-off-by Bryant G. Ly <[email protected]>--- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Why are you sending this to me?
confused,
greg k-h
Quoted 16 lines · Greg KH
Quoted 8 lines · Bryant G. Ly
From: "Bryant G. Ly" <[email protected]>
If
srp_transfer_datafails withinibmvscsis_write_pending, then the most likely scenario is that the client timed out the op and removed the TCE mapping. Thus it will loop forever retrying the op that is pretty much guaranteed to fail forever. A better return code would be EIO instead of EAGAIN.Quoted 7 lines
Reported-by Steven Royer <[email protected]>Tested-by Steven Royer <[email protected]>Signed-off-by Bryant G. Ly <[email protected]>--- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 5 lines
Why are you sending this to me?
confused,
greg k-h
Sorry I meant to put --to [email protected], and just --cc you.
-Bryant
Greg KH
maintainerQuoted 18 lines · Bryant G. Ly
Quoted 16 lines · Greg KH
Quoted 15 lines · Bryant G. Ly
From: "Bryant G. Ly" <[email protected]>
If
srp_transfer_datafails withinibmvscsis_write_pending, then the most likely scenario is that the client timed out the op and removed the TCE mapping. Thus it will loop forever retrying the op that is pretty much guaranteed to fail forever. A better return code would be EIO instead of EAGAIN.Reported-by Steven Royer <[email protected]>Tested-by Steven Royer <[email protected]>Signed-off-by Bryant G. Ly <[email protected]>--- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 6 lines
Quoted 5 lines
Why are you sending this to me?
confused,
greg k-h
Sorry I meant to put --to [email protected], and just --cc you.
Why even cc: me?
Quoted 21 lines · Bryant G. Ly
From: "Bryant G. Ly" <[email protected]>
If
srp_transfer_datafails withinibmvscsis_write_pending, then the most likely scenario is that the client timed out the op and removed the TCE mapping. Thus it will loop forever retrying the op that is pretty much guaranteed to fail forever. A better return code would be EIO instead of EAGAIN.Reported-by Steven Royer <[email protected]>Tested-by Steven Royer <[email protected]>Signed-off-by Bryant G. Ly <[email protected]>---
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +0
-0
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c static int ibmvscsis_write_pending(struct se_cmd *se_cmd) · line 3591
Quoted 8 lines
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +1
-1@@ -3585,7 +3585,7 @@ static int ibmvscsis_write_pending(struct se_cmd *se_cmd) 1, 1); if (rc) { pr_err("srp_transfer_data() failed: %d\n", rc); -return -EAGAIN ; +return -EIO ; } /** We now tell TCM to add this WRITE CDB directly into the TCM storage
Using the "Cc: [email protected]" tag is fine but please do not add [email protected] to the CC-list of the e-mail header. Anyway, thanks for the patch. It has been applied on my for-v4.10 branch.
Bart.