svn commit: r268261 - stable/10/sys/cam/ctl
Alexander Motin
mav at FreeBSD.org
Fri Jul 4 16:11:31 UTC 2014
Author: mav
Date: Fri Jul 4 16:11:30 2014
New Revision: 268261
URL: http://svnweb.freebsd.org/changeset/base/268261
Log:
MFC r267641:
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.
Modified:
stable/10/sys/cam/ctl/ctl.c
stable/10/sys/cam/ctl/ctl_backend_block.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/cam/ctl/ctl.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl.c Fri Jul 4 16:10:14 2014 (r268260)
+++ stable/10/sys/cam/ctl/ctl.c Fri Jul 4 16:11:30 2014 (r268261)
@@ -5009,9 +5009,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: stable/10/sys/cam/ctl/ctl_backend_block.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl_backend_block.c Fri Jul 4 16:10:14 2014 (r268260)
+++ stable/10/sys/cam/ctl/ctl_backend_block.c Fri Jul 4 16:11:30 2014 (r268261)
@@ -944,8 +944,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;
}
@@ -1186,8 +1187,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-all
mailing list