Re: [PATCH] target:fix target hung at iscsit_close_session()

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

 



On 08/29/2016 01:24 AM, Zhu Lingshan wrote:
> This commit wants to add a missed complete operation in
> function iscsit_close_connection().
> Under heavy IO pressure against one HDD target LUN, I find in
> error recovery process, function iscsit_close_session() may
> stuck at wating for completion session_wait_comp. The only
> function would complete it is iscsit_close_connection(),
> but when return at the code routine session_fall_back_to_erl0,
> it will return without completing session_wait_comp, cause
> iscsit_close_session() hung, left D status threads.

I'd like to see this description cleaned up a little bit,
but it may just be me.

This fixed an issue where IO testing on top of ocfs2,
on top of an iSCSI target, caused the target to
deadlock, requiring a reboot.

Functionally, I've reviewed the changes, as I spent a bit
of time in this code recently, so you can add
my Reviewed-by tag.

> 
> Signed-off-by: Zhu Lingshan <lszhu@xxxxxxxx>
> ---
>  drivers/target/iscsi/iscsi_target.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
> index d57d10c..e0b86bb 100644
> --- a/drivers/target/iscsi/iscsi_target.c
> +++ b/drivers/target/iscsi/iscsi_target.c
> @@ -4142,6 +4142,8 @@ int iscsit_close_connection(
>  	     atomic_read(&sess->session_fall_back_to_erl0)) {
>  		spin_unlock_bh(&sess->conn_lock);
>  		target_put_session(sess->se_sess);
> +		if (atomic_read(&sess->sleep_on_sess_wait_comp))
> +			complete(&sess->session_wait_comp);
>  
>  		return 0;
>  	} else if (atomic_read(&sess->session_logout)) {
> 

-- 
Lee Duncan
SUSE Labs
--
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