svn commit: r267641 - head/sys/cam/ctl
Alexander Motin
mav at FreeBSD.org
Thu Jun 19 12:43:42 UTC 2014
Author: mav
Date: Thu Jun 19 12:43:41 2014
New Revision: 267641
URL: http://svnweb.freebsd.org/changeset/base/267641
Log:
Add some more CTL_FLAG_ABORT check points.
This should allow to abort commands doing mostly disk I/O, such as VERIFY
or WRITE SAME. Before this change CTL_FLAG_ABORT was only checked around
data moves, which for these commands may not happen for a very long time.
MFC after: 2 weeks
Modified:
head/sys/cam/ctl/ctl.c
head/sys/cam/ctl/ctl_backend_block.c
Modified: head/sys/cam/ctl/ctl.c
==============================================================================
--- head/sys/cam/ctl/ctl.c Thu Jun 19 11:49:36 2014 (r267640)
+++ head/sys/cam/ctl/ctl.c Thu Jun 19 12:43:41 2014 (r267641)
@@ -5003,9 +5003,10 @@ ctl_data_submit_done(union ctl_io *io)
* If there is an error, though, we don't want to keep processing.
* Instead, just send status back to the initiator.
*/
- if ((io->io_hdr.flags & CTL_FLAG_IO_CONT)
- && (((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)
- || ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS))) {
+ if ((io->io_hdr.flags & CTL_FLAG_IO_CONT) &&
+ (io->io_hdr.flags & CTL_FLAG_ABORT) == 0 &&
+ ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE ||
+ (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) {
io->scsiio.io_cont(io);
return;
}
Modified: head/sys/cam/ctl/ctl_backend_block.c
==============================================================================
--- head/sys/cam/ctl/ctl_backend_block.c Thu Jun 19 11:49:36 2014 (r267640)
+++ head/sys/cam/ctl/ctl_backend_block.c Thu Jun 19 12:43:41 2014 (r267641)
@@ -942,8 +942,9 @@ ctl_be_block_cw_done_ws(struct ctl_be_bl
io = beio->io;
ctl_free_beio(beio);
- if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE)
- && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) {
+ if ((io->io_hdr.flags & CTL_FLAG_ABORT) ||
+ ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE &&
+ (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) {
ctl_config_write_done(io);
return;
}
@@ -1184,8 +1185,9 @@ ctl_be_block_next(struct ctl_be_block_io
io = beio->io;
be_lun = beio->lun;
ctl_free_beio(beio);
- if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE)
- && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) {
+ if ((io->io_hdr.flags & CTL_FLAG_ABORT) ||
+ ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE &&
+ (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) {
ctl_data_submit_done(io);
return;
}
More information about the svn-src-head
mailing list