Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Sep 2013 19:20:53 +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-9@freebsd.org
Subject:   svn commit: r255479 - stable/9/sys/dev/mfi
Message-ID:  <201309111920.r8BJKrWJ075162@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Wed Sep 11 19:20:53 2013
New Revision: 255479
URL: http://svnweb.freebsd.org/changeset/base/255479

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

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

Modified: stable/9/sys/dev/mfi/mfi_syspd.c
==============================================================================
--- stable/9/sys/dev/mfi/mfi_syspd.c	Wed Sep 11 18:22:30 2013	(r255478)
+++ stable/9/sys/dev/mfi/mfi_syspd.c	Wed Sep 11 19:20:53 2013	(r255479)
@@ -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?201309111920.r8BJKrWJ075162>