Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Sep 2013 21:45:03 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r255480 - stable/8/sys/dev/mfi
Message-ID:  <201309112145.r8BLj30O064551@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Wed Sep 11 21:45:02 2013
New Revision: 255480
URL: http://svnweb.freebsd.org/changeset/base/255480

Log:
  MFC r254330 -- allow users to run SYS_PD mode JBOD with a non-default MAXPHYS

Modified:
  stable/8/sys/dev/mfi/mfi_syspd.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/mfi/   (props changed)

Modified: stable/8/sys/dev/mfi/mfi_syspd.c
==============================================================================
--- stable/8/sys/dev/mfi/mfi_syspd.c	Wed Sep 11 19:20:53 2013	(r255479)
+++ stable/8/sys/dev/mfi/mfi_syspd.c	Wed Sep 11 21:45:02 2013	(r255480)
@@ -126,7 +126,8 @@ mfi_syspd_attach(device_t dev)
 		      sectors / (1024 * 1024 / secsize), sectors, sc->pd_id);
 	sc->pd_disk = disk_alloc();
 	sc->pd_disk->d_drv1 = sc;
-	sc->pd_disk->d_maxsize = sc->pd_controller->mfi_max_io * secsize;
+	sc->pd_disk->d_maxsize = min(sc->pd_controller->mfi_max_io * secsize,
+		(sc->pd_controller->mfi_max_sge - 1) * PAGE_SIZE);
 	sc->pd_disk->d_name = "mfisyspd";
 	sc->pd_disk->d_open = mfi_syspd_open;
 	sc->pd_disk->d_close = mfi_syspd_close;



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