summaryrefslogtreecommitdiffstats
path: root/sys/cam/ctl/ctl_backend_block.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-10-05 10:41:08 +0000
committermav <mav@FreeBSD.org>2015-10-05 10:41:08 +0000
commite6730078eb600c022e751c91cc886aa4a5b09e4f (patch)
treec80b3d940c419abcf84ccebef20900dd0969f1ff /sys/cam/ctl/ctl_backend_block.c
parentcfbb7640a74a9b74f45fb2fcd3bc27b11f1476e4 (diff)
downloadFreeBSD-src-e6730078eb600c022e751c91cc886aa4a5b09e4f.zip
FreeBSD-src-e6730078eb600c022e751c91cc886aa4a5b09e4f.tar.gz
MFC r287967: Relax serseq option operation for reads.
Previously, with serseq enabled, next command was unblocked only after previous completed. With this change, for read operations, next command is unblocked as soon as last media read completed. This is important for frontends that actually wait for data move completion (like camtgt), or when data are moved through the HA link, or especially when both.
Diffstat (limited to 'sys/cam/ctl/ctl_backend_block.c')
-rw-r--r--sys/cam/ctl/ctl_backend_block.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c
index 140bdc8..4edf039 100644
--- a/sys/cam/ctl/ctl_backend_block.c
+++ b/sys/cam/ctl/ctl_backend_block.c
@@ -565,8 +565,10 @@ ctl_be_block_biodone(struct bio *bio)
ctl_complete_beio(beio);
} else {
if ((ARGS(io)->flags & CTL_LLF_READ) &&
- beio->beio_cont == NULL)
+ beio->beio_cont == NULL) {
ctl_set_success(&io->scsiio);
+ ctl_serseq_done(io);
+ }
#ifdef CTL_TIME_IO
getbintime(&io->io_hdr.dma_start_bt);
#endif
@@ -785,8 +787,10 @@ ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun,
ctl_complete_beio(beio);
} else {
if ((ARGS(io)->flags & CTL_LLF_READ) &&
- beio->beio_cont == NULL)
+ beio->beio_cont == NULL) {
ctl_set_success(&io->scsiio);
+ ctl_serseq_done(io);
+ }
#ifdef CTL_TIME_IO
getbintime(&io->io_hdr.dma_start_bt);
#endif
@@ -954,8 +958,10 @@ ctl_be_block_dispatch_zvol(struct ctl_be_block_lun *be_lun,
ctl_complete_beio(beio);
} else {
if ((ARGS(io)->flags & CTL_LLF_READ) &&
- beio->beio_cont == NULL)
+ beio->beio_cont == NULL) {
ctl_set_success(&io->scsiio);
+ ctl_serseq_done(io);
+ }
#ifdef CTL_TIME_IO
getbintime(&io->io_hdr.dma_start_bt);
#endif
OpenPOWER on IntegriCloud