Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2017 07:48:08 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320495 - head/sys/cam/ctl
Message-ID:  <201706300748.v5U7m8Yb082099@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Fri Jun 30 07:48:08 2017
New Revision: 320495
URL: https://svnweb.freebsd.org/changeset/base/320495

Log:
  Allow status aggregation for ramdisk reads.

Modified:
  head/sys/cam/ctl/ctl_backend_ramdisk.c

Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c
==============================================================================
--- head/sys/cam/ctl/ctl_backend_ramdisk.c	Fri Jun 30 07:04:10 2017	(r320494)
+++ head/sys/cam/ctl/ctl_backend_ramdisk.c	Fri Jun 30 07:48:08 2017	(r320495)
@@ -525,6 +525,11 @@ nospc:
 	io->scsiio.kern_sg_entries = sgs;
 	io->io_hdr.flags |= CTL_FLAG_ALLOCATED;
 	PRIV(io)->len += lbas;
+	if ((ARGS(io)->flags & CTL_LLF_READ) &&
+	    ARGS(io)->len <= PRIV(io)->len) {
+		ctl_set_success(&io->scsiio);
+		ctl_serseq_done(io);
+	}
 #ifdef CTL_TIME_IO
 	getbinuptime(&io->io_hdr.dma_start_bt);
 #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706300748.v5U7m8Yb082099>