All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: ibmvscsi_tgt: Remove target_wait_for_sess_cmd()
@ 2018-10-16 17:34 Ly, Bryant
  2018-10-17 17:46 ` Mike Christie
  2018-10-18  0:52 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Ly, Bryant @ 2018-10-16 17:34 UTC (permalink / raw)
  To: target-devel

From: "Bryant G. Ly" <bly@catalogicsoftware.com>

There is currently a bug with the driver where there is never a
call to target_sess_cmd_list_set_waiting(), it only called
target_wait_for_sess_cmd(), which basically means that the
sess_wait_list would always be empty.

Thus, list_empty(&sess->sess_wait_list) = true,
(eg: no se_cmd I/O is quiesced, because no se_cmd in sess_wait_list),
since commit 712db3eb2c35 ("scsi: ibmvscsis: Properly deregister
target sessions") in 4.9.y code.

ibmvscsi_tgt does not remove the I_T Nexus when a VM is
active so we can fix this issue by removing the call to
target_wait_for_sess_cmd() altogether.

Signed-off-by: Bryant G. Ly <bly@catalogicsoftware.com>
---
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index fac3773..2175e9e 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -2266,7 +2266,6 @@ static int ibmvscsis_drop_nexus(struct ibmvscsis_tport *tport)
 	/*
 	 * Release the SCSI I_T Nexus to the emulated ibmvscsis Target Port
 	 */
-	target_wait_for_sess_cmds(se_sess);
 	target_remove_session(se_sess);
 	tport->ibmv_nexus = NULL;
 	kfree(nexus);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: ibmvscsi_tgt: Remove target_wait_for_sess_cmd()
  2018-10-16 17:34 [PATCH] scsi: ibmvscsi_tgt: Remove target_wait_for_sess_cmd() Ly, Bryant
@ 2018-10-17 17:46 ` Mike Christie
  2018-10-18  0:52 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Christie @ 2018-10-17 17:46 UTC (permalink / raw)
  To: target-devel

On 10/16/2018 12:34 PM, Ly, Bryant wrote:
> From: "Bryant G. Ly" <bly@catalogicsoftware.com>
> 
> There is currently a bug with the driver where there is never a
> call to target_sess_cmd_list_set_waiting(), it only called
> target_wait_for_sess_cmd(), which basically means that the
> sess_wait_list would always be empty.
> 
> Thus, list_empty(&sess->sess_wait_list) = true,
> (eg: no se_cmd I/O is quiesced, because no se_cmd in sess_wait_list),
> since commit 712db3eb2c35 ("scsi: ibmvscsis: Properly deregister
> target sessions") in 4.9.y code.
> 
> ibmvscsi_tgt does not remove the I_T Nexus when a VM is
> active so we can fix this issue by removing the call to
> target_wait_for_sess_cmd() altogether.
> 
> Signed-off-by: Bryant G. Ly <bly@catalogicsoftware.com>
> ---
>  drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
> index fac3773..2175e9e 100644
> --- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
> +++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
> @@ -2266,7 +2266,6 @@ static int ibmvscsis_drop_nexus(struct ibmvscsis_tport *tport)
>  	/*
>  	 * Release the SCSI I_T Nexus to the emulated ibmvscsis Target Port
>  	 */
> -	target_wait_for_sess_cmds(se_sess);
>  	target_remove_session(se_sess);
>  	tport->ibmv_nexus = NULL;
>  	kfree(nexus);
> 

Reviewed-by: Mike Christie <mchristi@redhat.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: ibmvscsi_tgt: Remove target_wait_for_sess_cmd()
  2018-10-16 17:34 [PATCH] scsi: ibmvscsi_tgt: Remove target_wait_for_sess_cmd() Ly, Bryant
  2018-10-17 17:46 ` Mike Christie
@ 2018-10-18  0:52 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2018-10-18  0:52 UTC (permalink / raw)
  To: target-devel


Bryant,

> There is currently a bug with the driver where there is never a call
> to target_sess_cmd_list_set_waiting(), it only called
> target_wait_for_sess_cmd(), which basically means that the
> sess_wait_list would always be empty.
>
> Thus, list_empty(&sess->sess_wait_list) = true, (eg: no se_cmd I/O is
> quiesced, because no se_cmd in sess_wait_list), since commit
> 712db3eb2c35 ("scsi: ibmvscsis: Properly deregister target sessions")
> in 4.9.y code.
>
> ibmvscsi_tgt does not remove the I_T Nexus when a VM is active so we
> can fix this issue by removing the call to target_wait_for_sess_cmd()
> altogether.

Applied to 4.20/scsi-queue, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-18  0:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-16 17:34 [PATCH] scsi: ibmvscsi_tgt: Remove target_wait_for_sess_cmd() Ly, Bryant
2018-10-17 17:46 ` Mike Christie
2018-10-18  0:52 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.