diff options
author | mav <mav@FreeBSD.org> | 2015-10-05 09:19:14 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-10-05 09:19:14 +0000 |
commit | aa4a28b040c873ded06e7e1c4ed52deb584834c3 (patch) | |
tree | 6cef77236f13eb6836b043a6b6e3e975757498af | |
parent | 7a6cfae08e15c467682e110765fbb333a8086fdb (diff) | |
download | FreeBSD-src-aa4a28b040c873ded06e7e1c4ed52deb584834c3.zip FreeBSD-src-aa4a28b040c873ded06e7e1c4ed52deb584834c3.tar.gz |
MFC r287783: Implement data/status aggregation for camsim backend.
This is almost pointless for primary HA node, but useful for secondary,
where between fe_datamove and fe_done calls goes another link roundtrip.
-rw-r--r-- | sys/cam/ctl/ctl_frontend_cam_sim.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/cam/ctl/ctl_frontend_cam_sim.c b/sys/cam/ctl/ctl_frontend_cam_sim.c index 01807de..f0a8b7a 100644 --- a/sys/cam/ctl/ctl_frontend_cam_sim.c +++ b/sys/cam/ctl/ctl_frontend_cam_sim.c @@ -435,6 +435,13 @@ cfcs_datamove(union ctl_io *io) io->scsiio.ext_data_filled += len_copied; + if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { + io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; + io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; + ccb->ccb_h.status = CAM_REQ_CMP; + xpt_done(ccb); + } + io->scsiio.be_move_done(io); } |