PERFORCE change 173362 for review
Alexander Motin
mav at FreeBSD.org
Tue Jan 19 12:33:18 UTC 2010
http://p4web.freebsd.org/chv.cgi?CH=173362
Change 173362 by mav at 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);
More information about the p4-projects
mailing list