If sys/param.h MAXPHYS has been tuned to exceed MFI_MAXPHYS, the mfi(4)

real JBOD mode (SYS PD) would fail fairly reliably during I/O.

Steal the mfi_disk.c check for this condition (indirectly) when establishing
d_maxsize.

Reviewed by:	ambrisko@
MFC after:	4 weeks
Sponsored by:	Yahoo! Inc.
This commit is contained in:
Sean Bruno 2013-08-14 15:50:34 +00:00
parent dce643c85f
commit a2bc8a1d0c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254330

View File

@ -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;