svn commit: r269226 - stable/10/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Tue Jul 29 07:40:15 UTC 2014


Author: mav
Date: Tue Jul 29 07:40:14 2014
New Revision: 269226
URL: http://svnweb.freebsd.org/changeset/base/269226

Log:
  MFC r269122:
  Fix infinite loop, when doing WRITE SAME on file-backed LUN.

Modified:
  stable/10/sys/cam/ctl/ctl_backend_block.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl_backend_block.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl_backend_block.c	Tue Jul 29 07:36:38 2014	(r269225)
+++ stable/10/sys/cam/ctl/ctl_backend_block.c	Tue Jul 29 07:40:14 2014	(r269226)
@@ -725,10 +725,11 @@ ctl_be_block_dispatch_file(struct ctl_be
 	}
 
 	/*
-	 * If this is a write, we're all done.
+	 * If this is a write or a verify, we're all done.
 	 * If this is a read, we can now send the data to the user.
 	 */
-	if (ARGS(io)->flags & (CTL_LLF_WRITE | CTL_LLF_VERIFY)) {
+	if ((beio->bio_cmd == BIO_WRITE) ||
+	    (ARGS(io)->flags & CTL_LLF_VERIFY)) {
 		ctl_set_success(&io->scsiio);
 		ctl_complete_beio(beio);
 	} else {


More information about the svn-src-stable mailing list