git: 6ed39db2573b - main - Do not exit ctl_be_block_worker() prematurely.
Alexander Motin
mav at FreeBSD.org
Sat Mar 6 03:46:02 UTC 2021
The branch main has been updated by mav:
URL: https://cgit.FreeBSD.org/src/commit/?id=6ed39db2573bb808ac2c206cd6c831f0be86219c
commit 6ed39db2573bb808ac2c206cd6c831f0be86219c
Author: Alexander Motin <mav at FreeBSD.org>
AuthorDate: 2021-03-06 03:39:52 +0000
Commit: Alexander Motin <mav at FreeBSD.org>
CommitDate: 2021-03-06 03:45:47 +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
---
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 3663bff10f2a..9f96c157d5ae 100644
--- a/sys/cam/ctl/ctl_backend_block.c
+++ b/sys/cam/ctl/ctl_backend_block.c
@@ -1672,7 +1672,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;
@@ -1685,7 +1685,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;
@@ -1698,7 +1698,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;
@@ -1711,7 +1711,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;
More information about the dev-commits-src-main
mailing list