Date: Tue, 9 Mar 2021 02:47:58 GMT From: Alexander Motin <mav@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: c120ef9e141e - stable/12 - Do not exit ctl_be_block_worker() prematurely. Message-ID: <202103090247.1292lwI5069584@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=c120ef9e141e3c8b9b6025aa947dcc7c693ee2b8 commit c120ef9e141e3c8b9b6025aa947dcc7c693ee2b8 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2021-03-06 03:39:52 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2021-03-09 02:47:53 +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. MFC after: 3 days (cherry picked from commit 6ed39db2573bb808ac2c206cd6c831f0be86219c) --- 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 85787d35eb6c..d876691a9fa1 100644 --- a/sys/cam/ctl/ctl_backend_block.c +++ b/sys/cam/ctl/ctl_backend_block.c @@ -1696,7 +1696,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; @@ -1710,7 +1710,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; @@ -1724,7 +1724,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; @@ -1738,7 +1738,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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103090247.1292lwI5069584>