svn commit: r255479 - stable/9/sys/dev/mfi

Sean Bruno sbruno at FreeBSD.org
Wed Sep 11 19:20:54 UTC 2013


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;


More information about the svn-src-stable-9 mailing list