[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ba71030-982b-c98b-78ee-ceca74da3b57@oracle.com>
Date: Thu, 11 Aug 2022 22:25:48 -0500
From: Mike Christie <michael.christie@...cle.com>
To: Wenchao Hao <haowenchao@...wei.com>, Lee Duncan <lduncan@...e.com>,
Chris Leech <cleech@...hat.com>,
"James E . J . Bottomley" <jejb@...ux.ibm.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
open-iscsi@...glegroups.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: linfeilong@...wei.com
Subject: Re: [PATCH v3] scsi: iscsi: Fix multiple iscsi session unbind event
sent to userspace
On 8/1/22 10:47 PM, Wenchao Hao wrote:
> I found an issue that kernel would send ISCSI_KEVENT_UNBIND_SESSION
> for multiple times which should be fixed.
>
> This patch introduce target_state in iscsi_cls_session to make
> sure session would send only one ISCSI_KEVENT_UNBIND_SESSION.
>
> But this would break issue fixed in commit 13e60d3ba287 ("scsi: iscsi:
> Report unbind session event when the target has been removed"). The issue
> is iscsid died for any reason after it send unbind session to kernel, once
> iscsid restart again, it loss kernel's ISCSI_KEVENT_UNBIND_SESSION event.
>
> Now kernel think iscsi_cls_session has already sent an
> ISCSI_KEVENT_UNBIND_SESSION event and would not send it any more. Which
> would cause userspace unable to logout. Actually the session is in
> invalid state(it's target_id is INVALID), iscsid should not sync this
> session in it's restart.
>
> So we need to check session's target state during iscsid restart,
> if session is in unbound state, do not sync this session and perform
> session teardown. It's reasonable because once a session is unbound, we
> can not recover it any more(mainly because it's target id is INVALID)
>
I think we are ok now. Do you have a link to the userspace parts so
I can make sure we have everything covered now?
Powered by blists - more mailing lists