Date: Tue, 19 Jan 2010 12:33:17 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 173362 for review Message-ID: <201001191233.o0JCXHAt045240@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=173362 Change 173362 by mav@mav_mavtest on 2010/01/19 12:32:25 Reserve some CCBs, to not allocate in case of error recovery. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/cam_sim.c#13 edit .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#142 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/cam_sim.c#13 (text+ko) ==== @@ -69,7 +69,7 @@ return (NULL); sim = (struct cam_sim *)malloc(sizeof(struct cam_sim), - M_CAMSIM, M_NOWAIT); + M_CAMSIM, M_ZERO | M_NOWAIT); if (sim == NULL) return (NULL); @@ -86,6 +86,7 @@ sim->flags = 0; sim->refcount = 1; sim->devq = queue; + sim->max_ccbs = 8; /* Reserve for management purposes. */ sim->mtx = mtx; if (mtx == &Giant) { sim->flags |= 0; ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#142 (text+ko) ==== @@ -926,8 +926,6 @@ if (xpt_sim == NULL) return (ENOMEM); - xpt_sim->max_ccbs = 16; - mtx_lock(&xsoftc.xpt_lock); if ((status = xpt_bus_register(xpt_sim, NULL, 0)) != CAM_SUCCESS) { mtx_unlock(&xsoftc.xpt_lock); @@ -4435,7 +4433,7 @@ device->mintags = 1; device->maxtags = 1; - bus->sim->max_ccbs = device->ccbq.devq_openings; + bus->sim->max_ccbs += device->ccbq.devq_openings; cur_device = TAILQ_FIRST(&target->ed_entries); while (cur_device != NULL && cur_device->lun_id < lun_id) cur_device = TAILQ_NEXT(cur_device, links);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001191233.o0JCXHAt045240>