From: Lee Duncan <lduncan@suse.com>
To: Mike Christie <michael.christie@oracle.com>,
cleech@redhat.com, njavali@marvell.com, mrangankar@marvell.com,
GR-QLogic-Storage-Upstream@marvell.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
jejb@linux.ibm.com
Subject: Re: [PATCH 04/28] scsi: iscsi: Force immediate failure during shutdown
Date: Mon, 24 May 2021 09:00:48 -0700 [thread overview]
Message-ID: <5587904a-2d5c-a9ad-bb0d-265cfee9a60f@suse.com> (raw)
In-Reply-To: <20210523175739.360324-5-michael.christie@oracle.com>
On 5/23/21 10:57 AM, Mike Christie wrote:
> If the system is not up, we can just fail immediately since iscsid is not
> going to ever answer our netlink events. We are already setting the
> recovery_tmo to 0, but by passing stop_conn STOP_CONN_TERM we never will
> block the session and start the recovery timer, because for that flag
> userspace will do the unbind and destroy events which would remove the
> devices and wake up and kill the eh.
>
> Since the conn is dead and the system is going dowm this just has us use
> STOP_CONN_RECOVER with recovery_tmo=0 so we fail immediately. However, if
> the user has set the recovery_tmo=-1 we let the system hang like they
> requested since they might have used that setting for specific reasons
> (one known is reason is for buggy cluster software).
Typo: extra "is" in the above sentence. Not a big deal. :)
>
> Signed-off-by: Mike Christie <michael.christie@oracle.com>
> ---
> drivers/scsi/scsi_transport_iscsi.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
> index 82491343e94a..d134156d67f0 100644
> --- a/drivers/scsi/scsi_transport_iscsi.c
> +++ b/drivers/scsi/scsi_transport_iscsi.c
> @@ -2513,11 +2513,17 @@ static void stop_conn_work_fn(struct work_struct *work)
> session = iscsi_session_lookup(sid);
> if (session) {
> if (system_state != SYSTEM_RUNNING) {
> - session->recovery_tmo = 0;
> - iscsi_if_stop_conn(conn, STOP_CONN_TERM);
> - } else {
> - iscsi_if_stop_conn(conn, STOP_CONN_RECOVER);
> + /*
> + * If the user has set up for the session to
> + * never timeout then hang like they wanted.
> + * For all other cases fail right away since
> + * userspace is not going to relogin.
> + */
> + if (session->recovery_tmo > 0)
> + session->recovery_tmo = 0;
> }
> +
> + iscsi_if_stop_conn(conn, STOP_CONN_RECOVER);
> }
>
> list_del_init(&conn->conn_list_err);
>
Reviewed-by: Lee Duncan <lduncan@suse.com>
next prev parent reply other threads:[~2021-05-24 16:01 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-23 17:57 iscsi error handler fixes Mike Christie
2021-05-23 17:57 ` [PATCH 01/28] scsi: iscsi: Add task completion helper Mike Christie
2021-05-23 17:57 ` [PATCH 02/28] scsi: iscsi: Stop queueing during ep_disconnect Mike Christie
2021-05-23 17:57 ` [PATCH 03/28] scsi: iscsi: Drop suspend calls from ep_disconnect Mike Christie
2021-05-23 17:57 ` [PATCH 04/28] scsi: iscsi: Force immediate failure during shutdown Mike Christie
2021-05-24 16:00 ` Lee Duncan [this message]
2021-05-23 17:57 ` [PATCH 05/28] scsi: iscsi: Use system_unbound_wq for destroy_work Mike Christie
2021-05-23 17:57 ` [PATCH 06/28] scsi: iscsi: Rel ref after iscsi_lookup_endpoint Mike Christie
2021-05-23 17:57 ` [PATCH 07/28] scsi: iscsi: Fix in-kernel conn failure handling Mike Christie
2021-05-24 18:22 ` Lee Duncan
2021-05-23 17:57 ` [PATCH 08/28] scsi: iscsi_tcp: Set no linger Mike Christie
2021-05-23 17:57 ` [PATCH 09/28] scsi: iscsi_tcp: Start socket shutdown during conn stop Mike Christie
2021-05-23 17:57 ` [PATCH 10/28] scsi: iscsi: Add iscsi_cls_conn refcount helpers Mike Christie
2021-05-24 18:34 ` Lee Duncan
2021-05-23 17:57 ` [PATCH 11/28] scsi: iscsi: Have abort handler get ref to conn Mike Christie
2021-05-24 18:36 ` Lee Duncan
2021-05-23 17:57 ` [PATCH 12/28] scsi: iscsi: Get ref to conn during reset handling Mike Christie
2021-05-24 18:37 ` Lee Duncan
2021-05-23 17:57 ` [PATCH 13/28] scsi: iscsi: Fix conn use after free during resets Mike Christie
2021-05-23 17:57 ` [PATCH 14/28] scsi: iscsi: Fix shost->max_id use Mike Christie
2021-05-23 17:57 ` [PATCH 15/28] scsi: iscsi: Fix completion check during abort races Mike Christie
2021-05-24 18:38 ` Lee Duncan
2021-05-23 17:57 ` [PATCH 16/28] scsi: iscsi: Flush block work before unblock Mike Christie
2021-05-24 18:43 ` Lee Duncan
2021-05-23 17:57 ` [PATCH 17/28] scsi: iscsi: Hold task ref during TMF timeout handling Mike Christie
2021-05-24 18:45 ` Lee Duncan
2021-05-23 17:57 ` [PATCH 18/28] scsi: iscsi: Move pool freeing Mike Christie
2021-05-23 17:57 ` [PATCH 19/28] scsi: qedi: Fix null ref during abort handling Mike Christie
2021-05-23 17:57 ` [PATCH 20/28] scsi: qedi: Fix race during abort timeouts Mike Christie
2021-05-23 17:57 ` [PATCH 21/28] scsi: qedi: Fix use after free during abort cleanup Mike Christie
2021-05-23 17:57 ` [PATCH 22/28] scsi: qedi: Fix TMF tid allocation Mike Christie
2021-05-23 17:57 ` [PATCH 23/28] scsi: qedi: Use GFP_NOIO for TMF allocation Mike Christie
2021-05-23 17:57 ` [PATCH 24/28] scsi: qedi: Fix TMF session block/unblock use Mike Christie
2021-05-23 17:57 ` [PATCH 25/28] scsi: qedi: Fix cleanup " Mike Christie
2021-05-23 17:57 ` [PATCH 26/28] scsi: qedi: Pass send_iscsi_tmf task to abort Mike Christie
2021-05-23 17:57 ` [PATCH 27/28] scsi: qedi: Complete TMF works before disconnect Mike Christie
2021-05-23 17:57 ` [PATCH 28/28] scsi: qedi: Wake up if cmd_cleanup_req is set Mike Christie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5587904a-2d5c-a9ad-bb0d-265cfee9a60f@suse.com \
--to=lduncan@suse.com \
--cc=GR-QLogic-Storage-Upstream@marvell.com \
--cc=cleech@redhat.com \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@oracle.com \
--cc=mrangankar@marvell.com \
--cc=njavali@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).