Lines Matching defs:crb
65 uint64_t ufs_crb_size = 0; /* current size of all crb buffers */
66 uint64_t ufs_crb_max_size = 0; /* highest crb buffer use so far */
68 uint64_t ufs_crb_alloc_fails = 0; /* crb allocation failures stat */
77 #define CRB_FREE(crb, me) \
78 kmem_free(crb->c_buf, crb->c_nb); \
79 atomic_add_64(&ufs_crb_size, -(uint64_t)crb->c_nb); \
80 kmem_free(crb, sizeof (crb_t)); \
84 crb_t *crb = (me)->me_crb; \
85 if (crb && (--crb->c_refcnt == 0)) { \
86 CRB_FREE(crb, me) \
687 crb_t *crb;
734 crb = me->me_crb;
735 if (crb) {
736 if (DATAwithinCRB(savmof, savnb, crb)) {
761 crb_t *crb = NULL;
816 crb = age->me_crb;
817 if (crb && !(crb->c_invalid)) {
819 if (me->me_crb != crb) {
820 crb = NULL;
824 rbp->rb_crb = crb;
881 crb_t *crb;
896 crb = me->me_crb;
897 if (crb) {
898 nb = crb->c_nb;
899 mof = crb->c_mof;
1222 crb_t *crb;
1256 crb = me->me_crb;
1280 if (crb && (--crb->c_refcnt == 0)) {
1282 (crb->c_nb != bufsz)) {
1283 CRB_FREE(crb, me);
1285 bcopy(buf, crb->c_buf,
1287 crb->c_invalid = 0;
1288 crb->c_mof = bufmof;
1289 crbsav = crb;
1305 * existing entry where we can re-use the crb.
1308 !crbsav && crb &&
1309 WITHIN(mof, nb, crb->c_mof, crb->c_nb)) {
1310 ASSERT(crb->c_mof == bufmof);
1311 ASSERT(crb->c_nb == bufsz);
1312 bcopy(buf, crb->c_buf, bufsz);
1313 crbsav = crb;
1320 * If we don't already have a crb then allocate one
1727 crb_t *crb;
1755 crb = me->me_crb;
1756 if (crb) {
1757 crb->c_invalid = 1;