Lines Matching refs:nb

352 inval_range(ml_unit_t *ul, cirbuf_t *cb, off_t lof, off_t nb)
355 off_t elof = lof + nb;
360 * discard all bufs that overlap the range (lof, lof + nb)
486 size_t nb;
509 while ((nb = bufsize) != 0) {
510 if (nb > blksize)
511 nb = blksize;
517 bp->b_bufsize = nb;
526 bufsize -= nb;
527 va += nb;
739 storebuf(ml_unit_t *ul, buf_t *bp, caddr_t va, size_t nb)
744 size_t nb_left = nb;
772 return (nb - nb_left);
780 return (nb - nb_left);
788 return (nb);
968 off_t nb;
974 * round nb up to a sector length plus an extra sector
978 for (nb = DEV_BSIZE; me; me = me->me_hash) {
979 nb += sizeof (struct delta);
981 nb += me->me_nb;
983 nb = P2ROUNDUP(nb, DEV_BSIZE);
991 return (nb < nfb);
999 size_t nb;
1006 nb = sizeof (struct delta);
1010 while (nb) {
1015 actual = storebuf(ul, bp, va, nb);
1018 nb -= actual;
1019 if (nb)
1039 nb = me->me_nb;
1046 while (nb) {
1051 actual = storebuf(ul, bp, va, nb);
1054 nb -= actual;
1055 if (nb)
1082 * seek nb bytes from location lof
1085 logseek(ml_unit_t *ul, off_t lof, size_t nb, off_t *lofp)
1090 while (nb) {
1096 actual = fetchbuf(ul, bp, NULL, nb, &lof);
1098 nb -= actual;
1101 ASSERT(nb == 0);
1110 off_t nb, /* length of buffer */
1121 caddr_t eva = va + nb; /* end of buffer */
1138 MIN(nb, crb->c_nb - skip));
1146 MIN(crb->c_nb, nb - skip));
1156 fetchzeroes(va, mof, nb, me);
1231 off_t nb;
1273 nb = new_lof - ul->un_head_lof;
1274 inval_range(ul, &ul->un_wrbuf, ul->un_head_lof, nb);
1275 inval_range(ul, &ul->un_rdbuf, ul->un_head_lof, nb);
1281 nb = ul->un_eol_lof - ul->un_head_lof;
1282 inval_range(ul, &ul->un_wrbuf, ul->un_head_lof, nb);
1283 inval_range(ul, &ul->un_rdbuf, ul->un_head_lof, nb);
1289 nb = new_lof - ul->un_bol_lof;
1290 inval_range(ul, &ul->un_wrbuf, ul->un_bol_lof, nb);
1291 inval_range(ul, &ul->un_rdbuf, ul->un_bol_lof, nb);
1320 * The tail will be set to the sector following lof+nb
1321 * lof + nb == size of the last delta + commit record
1325 ldl_settail(ml_unit_t *ul, off_t lof, size_t nb)
1349 (void) logseek(ul, lof, nb, &new_lof);
1438 ldl_logscan_read(ml_unit_t *ul, off_t *lofp, size_t nb, caddr_t va)
1449 if (!WITHIN(*lofp, nb, ul->un_head_lof,
1454 if (OVERLAP(*lofp, nb, ul->un_tail_lof,
1460 while (nb) {
1477 actual = fetchbuf(ul, bp, va, nb, lofp);
1480 nb -= actual;
1547 off_t nb;
1556 nb = ul->un_logsize;
1569 return (busybytes > (nb - (nb >> 2)));