Lines Matching defs:elt
70 #define UAO_SWHASH_ELT_PAGESLOT(elt, idx) \
71 ((elt)->slots[UAO_SWHASH_ELT_PAGESLOT_IDX(idx)])
74 #define UAO_SWHASH_ELT_PAGEIDX_BASE(elt) \
75 ((elt)->tag << UAO_SWHASH_CLUSTER_SHIFT)
203 struct uao_swhash_elt *elt;
212 LIST_FOREACH(elt, swhash, list) {
213 if (elt->tag == page_tag)
214 return elt;
223 elt = pool_get(&uao_swhash_elt_pool, PR_NOWAIT | PR_ZERO);
232 if (elt == NULL)
234 LIST_INSERT_HEAD(swhash, elt, list);
235 elt->tag = page_tag;
237 return elt;
260 struct uao_swhash_elt *elt =
263 if (elt)
264 return UAO_SWHASH_ELT_PAGESLOT(elt, pageidx);
313 struct uao_swhash_elt *elt =
315 if (elt == NULL) {
320 oldslot = UAO_SWHASH_ELT_PAGESLOT(elt, pageidx);
321 UAO_SWHASH_ELT_PAGESLOT(elt, pageidx) = slot;
324 * now adjust the elt's reference counter and free it if we've
329 elt->count++;
332 elt->count--;
334 if (elt->count == 0) {
335 LIST_REMOVE(elt, list);
336 pool_put(&uao_swhash_elt_pool, elt);
408 struct uao_swhash_elt *elt;
437 elt = LIST_FIRST(&aobj->u_swhash[i]);
438 LIST_REMOVE(elt, list);
439 LIST_INSERT_HEAD(&new_swhash[i], elt, list);
456 struct uao_swhash_elt *elt;
468 elt = uao_find_swhash_elt(aobj, i, FALSE);
469 if (elt != NULL) {
470 new_swslots[i] = UAO_SWHASH_ELT_PAGESLOT(elt, i);
472 elt->count--;
473 if (elt->count == 0) {
474 LIST_REMOVE(elt, list);
475 pool_put(&uao_swhash_elt_pool, elt);
570 struct uao_swhash_elt *elt;
594 elt = LIST_FIRST(&aobj->u_swhash[i]);
595 LIST_REMOVE(elt, list);
596 LIST_INSERT_HEAD(&new_swhash[i], elt, list);
614 struct uao_swhash_elt *elt;
630 elt = uao_find_swhash_elt(aobj, i, TRUE);
631 elt->count++;
632 UAO_SWHASH_ELT_PAGESLOT(elt, i) = old_swslots[i];
1303 struct uao_swhash_elt *elt;
1308 for (elt = LIST_FIRST(&aobj->u_swhash[bucket]);
1309 elt != NULL;
1310 elt = LIST_NEXT(elt, list)) {
1314 int slot = elt->slots[i];
1327 * since the swhash elt
1331 UAO_SWHASH_ELT_PAGEIDX_BASE(elt) + i);
1448 struct uao_swhash_elt *elt, *next;
1450 for (elt = LIST_FIRST(&aobj->u_swhash[i]);
1451 elt != NULL;
1452 elt = next) {
1456 next = LIST_NEXT(elt, list);
1458 if (elt->tag < taglo || taghi < elt->tag) {
1462 if (elt->tag == taglo) {
1469 if (elt->tag == taghi) {
1477 int slot = elt->slots[j];
1480 (voff_t)(UAO_SWHASH_ELT_PAGEIDX_BASE(elt)
1486 KASSERT(elt->count > 0);
1487 elt->slots[j] = 0;
1488 elt->count--;
1492 if (elt->count == 0) {
1493 LIST_REMOVE(elt, list);
1494 pool_put(&uao_swhash_elt_pool, elt);