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
This commit is contained in:
Alexander Motin 2021-03-05 22:39:52 -05:00
parent e77cf2a4ab
commit 6ed39db257

View File

@ -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;