Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Aug 2017 13:07:54 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r321872 - stable/11/sys/cam/ctl
Message-ID:  <201708011307.v71D7sqU035600@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Aug  1 13:07:54 2017
New Revision: 321872
URL: https://svnweb.freebsd.org/changeset/base/321872

Log:
  MFC r320495: Allow status aggregation for ramdisk reads.

Modified:
  stable/11/sys/cam/ctl/ctl_backend_ramdisk.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/ctl/ctl_backend_ramdisk.c
==============================================================================
--- stable/11/sys/cam/ctl/ctl_backend_ramdisk.c	Tue Aug  1 13:07:05 2017	(r321871)
+++ stable/11/sys/cam/ctl/ctl_backend_ramdisk.c	Tue Aug  1 13:07:54 2017	(r321872)
@@ -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?201708011307.v71D7sqU035600>