Author: mav
Date: Sat Jul 26 13:43:25 2014
New Revision: 269122
URL: http://svnweb.freebsd.org/changeset/base/269122
Log:
Fix infinite loop, when doing WRITE SAME on file-backed LUN.
MFC after: 3 days
Modified:
head/sys/cam/ctl/ctl_backend_block.c
Modified: head/sys/cam/ctl/ctl_backend_block.c
==============================================================================
--- head/sys/cam/ctl/ctl_backend_block.c Sat Jul 26 13:37:25 2014
(r269121)
+++ head/sys/cam/ctl/ctl_backend_block.c Sat Jul 26 13:43:25 2014
(r269122)
@@ -722,10 +722,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 {
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"