};
#define is_persistent(_p) (_p->persistent)
-#define is_ephemeral(_p) (!(_p->persistent))
#define is_shared(_p) (_p->shared)
-#define is_private(_p) (!(_p->shared))
struct oid {
uint64_t oid[3];
ASSERT(pgp_lookup_in_obj(pgp->us.obj,pgp->index) == NULL);
ASSERT(pgp->us.obj->pool != NULL);
pool = pgp->us.obj->pool;
- if ( is_ephemeral(pool) )
+ if ( !is_persistent(pool) )
{
ASSERT(list_empty(&pgp->global_eph_pages));
ASSERT(list_empty(&pgp->us.client_eph_pages));
ASSERT(pgp->us.obj->pool != NULL);
client = pgp->us.obj->pool->client;
ASSERT(client != NULL);
- if ( is_ephemeral(pgp->us.obj->pool) )
+ if ( !is_persistent(pgp->us.obj->pool) )
{
if ( !no_eph_lock )
tmem_spin_lock(&eph_lists_spinlock);
}
insert_page:
- if ( is_ephemeral(pool) )
+ if ( !is_persistent(pool) )
{
tmem_spin_lock(&eph_lists_spinlock);
list_add_tail(&pgp->global_eph_pages,
if ( rc <= 0 )
goto bad_copy;
- if ( is_ephemeral(pool) )
+ if ( !is_persistent(pool) )
{
- if ( is_private(pool) )
+ if ( !is_shared(pool) )
{
pgp_delete(pgp,0);
if ( obj->pgp_count == 0 )
tmem_spin_unlock(&obj->obj_spinlock);
}
pool->found_gets++;
- if ( is_ephemeral(pool) )
- client->succ_eph_gets++;
- else
+ if ( is_persistent(pool) )
client->succ_pers_gets++;
+ else
+ client->succ_eph_gets++;
return 1;
bad_copy:
struct tmem_handle h;
unsigned int pagesize;
- if ( pool == NULL || is_ephemeral(pool) )
+ if ( pool == NULL || !is_persistent(pool) )
return -1;
pagesize = 1 << (pool->pageshift + 12);