|
|
9e325d |
Index: lock/lock.c
|
|
|
9e325d |
===================================================================
|
|
|
9e325d |
RCS file: /a/CVSROOT/db/lock/lock.c,v
|
|
|
9e325d |
retrieving revision 12.61
|
|
|
9e325d |
diff -c -r12.61 lock.c
|
|
|
9e325d |
*** lock/lock.c 22 Jul 2008 12:08:53 -0000 12.61
|
|
|
9e325d |
--- lock/lock.c 19 Aug 2008 17:28:24 -0000
|
|
|
9e325d |
***************
|
|
|
9e325d |
*** 1278,1287 ****
|
|
|
9e325d |
SH_TAILQ_REMOVE(
|
|
|
9e325d |
<->obj_tab[obj_ndx], sh_obj, links, __db_lockobj);
|
|
|
9e325d |
if (sh_obj->lockobj.size > sizeof(sh_obj->objdata)) {
|
|
|
9e325d |
! LOCK_REGION_LOCK(env);
|
|
|
9e325d |
__env_alloc_free(<->reginfo,
|
|
|
9e325d |
SH_DBT_PTR(&sh_obj->lockobj));
|
|
|
9e325d |
! LOCK_REGION_UNLOCK(env);
|
|
|
9e325d |
}
|
|
|
9e325d |
SH_TAILQ_INSERT_HEAD(
|
|
|
9e325d |
&FREE_OBJS(lt, part_id), sh_obj, links, __db_lockobj);
|
|
|
9e325d |
--- 1278,1289 ----
|
|
|
9e325d |
SH_TAILQ_REMOVE(
|
|
|
9e325d |
<->obj_tab[obj_ndx], sh_obj, links, __db_lockobj);
|
|
|
9e325d |
if (sh_obj->lockobj.size > sizeof(sh_obj->objdata)) {
|
|
|
9e325d |
! if (region->part_t_size != 1)
|
|
|
9e325d |
! LOCK_REGION_LOCK(env);
|
|
|
9e325d |
__env_alloc_free(<->reginfo,
|
|
|
9e325d |
SH_DBT_PTR(&sh_obj->lockobj));
|
|
|
9e325d |
! if (region->part_t_size != 1)
|
|
|
9e325d |
! LOCK_REGION_UNLOCK(env);
|
|
|
9e325d |
}
|
|
|
9e325d |
SH_TAILQ_INSERT_HEAD(
|
|
|
9e325d |
&FREE_OBJS(lt, part_id), sh_obj, links, __db_lockobj);
|
|
|
9e325d |
***************
|
|
|
9e325d |
*** 1470,1484 ****
|
|
|
9e325d |
if (obj->size <= sizeof(sh_obj->objdata))
|
|
|
9e325d |
p = sh_obj->objdata;
|
|
|
9e325d |
else {
|
|
|
9e325d |
! LOCK_REGION_LOCK(env);
|
|
|
9e325d |
if ((ret =
|
|
|
9e325d |
__env_alloc(<->reginfo, obj->size, &p)) != 0) {
|
|
|
9e325d |
__db_errx(env,
|
|
|
9e325d |
"No space for lock object storage");
|
|
|
9e325d |
! LOCK_REGION_UNLOCK(env);
|
|
|
9e325d |
goto err;
|
|
|
9e325d |
}
|
|
|
9e325d |
! LOCK_REGION_UNLOCK(env);
|
|
|
9e325d |
}
|
|
|
9e325d |
|
|
|
9e325d |
memcpy(p, obj->data, obj->size);
|
|
|
9e325d |
--- 1472,1492 ----
|
|
|
9e325d |
if (obj->size <= sizeof(sh_obj->objdata))
|
|
|
9e325d |
p = sh_obj->objdata;
|
|
|
9e325d |
else {
|
|
|
9e325d |
! /*
|
|
|
9e325d |
! * If we have only one partition, the region is locked.
|
|
|
9e325d |
! */
|
|
|
9e325d |
! if (region->part_t_size != 1)
|
|
|
9e325d |
! LOCK_REGION_LOCK(env);
|
|
|
9e325d |
if ((ret =
|
|
|
9e325d |
__env_alloc(<->reginfo, obj->size, &p)) != 0) {
|
|
|
9e325d |
__db_errx(env,
|
|
|
9e325d |
"No space for lock object storage");
|
|
|
9e325d |
! if (region->part_t_size != 1)
|
|
|
9e325d |
! LOCK_REGION_UNLOCK(env);
|
|
|
9e325d |
goto err;
|
|
|
9e325d |
}
|
|
|
9e325d |
! if (region->part_t_size != 1)
|
|
|
9e325d |
! LOCK_REGION_UNLOCK(env);
|
|
|
9e325d |
}
|
|
|
9e325d |
|
|
|
9e325d |
memcpy(p, obj->data, obj->size);
|