From owner-dev-commits-src-all@freebsd.org Tue Mar 9 03:16:12 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C59C5567181; Tue, 9 Mar 2021 03:16:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DvgMw5CXJz4kH8; Tue, 9 Mar 2021 03:16:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3CDC14C79; Tue, 9 Mar 2021 03:16:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1293GCJ9010496; Tue, 9 Mar 2021 03:16:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1293GCmv010495; Tue, 9 Mar 2021 03:16:12 GMT (envelope-from git) Date: Tue, 9 Mar 2021 03:16:12 GMT Message-Id: <202103090316.1293GCmv010495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 84e5f9455a18 - releng/13.0 - Do not exit ctl_be_block_worker() prematurely. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 84e5f9455a181a792dfea7bbf3d43a3e2777c436 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2021 03:16:12 -0000 The branch releng/13.0 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=84e5f9455a181a792dfea7bbf3d43a3e2777c436 commit 84e5f9455a181a792dfea7bbf3d43a3e2777c436 Author: Alexander Motin AuthorDate: 2021-03-06 03:39:52 +0000 Commit: Alexander Motin CommitDate: 2021-03-09 03:15:38 +0000 Do not exit ctl_be_block_worker() prematurely. Return while there are any I/Os in a queue may result in them stuck indefinitely, since there is only one taskqueue task for all of them. I think I've reproduced this by switching ha_role to secondary under heavy load. Approved by: re (delphij) (cherry picked from commit 6ed39db2573bb808ac2c206cd6c831f0be86219c) (cherry picked from commit a3d416f3daafc59bc2f4ee278593c8a3f7a30d2b) --- sys/cam/ctl/ctl_backend_block.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c index cd4fab766844..92fee127c233 100644 --- a/sys/cam/ctl/ctl_backend_block.c +++ b/sys/cam/ctl/ctl_backend_block.c @@ -1705,7 +1705,7 @@ ctl_be_block_worker(void *context, int pending) if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); ctl_complete_beio(beio); - return; + continue; } be_lun->dispatch(be_lun, beio); continue; @@ -1719,7 +1719,7 @@ ctl_be_block_worker(void *context, int pending) if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); ctl_config_write_done(io); - return; + continue; } ctl_be_block_cw_dispatch(be_lun, io); continue; @@ -1733,7 +1733,7 @@ ctl_be_block_worker(void *context, int pending) if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); ctl_config_read_done(io); - return; + continue; } ctl_be_block_cr_dispatch(be_lun, io); continue; @@ -1747,7 +1747,7 @@ ctl_be_block_worker(void *context, int pending) if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); ctl_data_submit_done(io); - return; + continue; } ctl_be_block_dispatch(be_lun, io); continue;