Lines Matching defs:we

342 	 * the same as the new log we just opened.
469 * is the same as the log of the maximum power of two. So we can do
562 struct wapbl_entry *we;
567 * XXX we may consider using upgrade here
568 * if we want to call flush from inside a transaction
595 SIMPLEQ_FOREACH(we, &wl->wl_entries, we_entries) {
599 we->we_bufcount, we->we_reclaimable_bytes,
600 we->we_error, we->we_unsynced_bufbytes));
612 SIMPLEQ_FOREACH(we, &wl->wl_entries, we_entries) {
616 we->we_bufcount, we->we_reclaimable_bytes,
617 we->we_error));
660 while ((we = SIMPLEQ_FIRST(&wl->wl_entries)) != NULL) {
662 /* XXX should we be accumulating wl_error_count
664 we->we_wapbl = NULL;
665 if (we->we_bufcount == 0) {
667 KASSERT(we->we_unsynced_bufbytes == 0);
669 pool_put(&wapbl_entry_pool, we);
675 /* XXX should we clear wl_reserved_bytes? */
841 * If this write goes to an empty buffer we have to
1230 * First check to see if we have to do a commit
1281 * we only call this routine from inside flush itself.
1309 struct wapbl_entry *we = bp->b_private;
1310 struct wapbl *wl = we->we_wapbl;
1320 KASSERT(we->we_bufcount > 0);
1321 we->we_bufcount--;
1323 KASSERT(we->we_unsynced_bufbytes >= bufsize);
1324 we->we_unsynced_bufbytes -= bufsize;
1327 if (we->we_bufcount == 0) {
1329 KASSERT(we->we_unsynced_bufbytes == 0);
1331 pool_put(&wapbl_entry_pool, we);
1368 if (we->we_error == 0) {
1374 we->we_error = bp->b_error;
1392 * log to become empty and we better unbusy the buffer before
1399 KASSERT(we->we_bufcount > 0);
1400 we->we_bufcount--;
1402 KASSERT(we->we_unsynced_bufbytes >= bufsize);
1403 we->we_unsynced_bufbytes -= bufsize;
1411 * transactions. If we successfully reclaim anything,
1414 if (we->we_bufcount == 0) {
1418 KDASSERT(we->we_unsynced_bufbytes == 0);
1424 while ((we = SIMPLEQ_FIRST(&wl->wl_entries)) &&
1425 (we->we_bufcount == 0)) {
1426 delta += we->we_reclaimable_bytes;
1427 if (we->we_error)
1430 pool_put(&wapbl_entry_pool, we);
1451 struct wapbl_entry *we;
1478 * XXX we may consider using LK_UPGRADE here
1479 * if we want to call flush from inside a transaction
1486 * Now that we are fully locked and flushed,
1557 /* Opportunistically move the tail forward if we can */
1570 we = pool_get(&wapbl_entry_pool, PR_WAITOK);
1608 we->we_wapbl = wl;
1609 we->we_bufcount = wl->wl_bufcount;
1611 we->we_unsynced_bufbytes = wl->wl_bufbytes;
1613 we->we_reclaimable_bytes = flushsize;
1614 we->we_error = 0;
1615 SIMPLEQ_INSERT_TAIL(&wl->wl_entries, we, we_entries);
1619 * it shouldn't matter, but if we care we could use TAILQ instead.
1621 * so we might actually want to change this to preserve order.
1628 bp->b_private = we;
1685 SIMPLEQ_FOREACH(we, &wl->wl_entries, we_entries) {
1689 we->we_bufcount, we->we_reclaimable_bytes,
1690 we->we_error, we->we_unsynced_bufbytes));
1704 SIMPLEQ_FOREACH(we, &wl->wl_entries, we_entries) {
1707 "error = %d\n", we->we_bufcount,
1708 we->we_reclaimable_bytes, we->we_error));
1744 struct wapbl_entry *we;
1770 SIMPLEQ_FOREACH(we, &wl->wl_entries, we_entries) {
1774 we->we_bufcount, we->we_reclaimable_bytes,
1775 we->we_error, we->we_unsynced_bufbytes);
1778 we->we_bufcount, we->we_reclaimable_bytes, we->we_error);
2058 * flush disk cache to ensure that blocks we've written are actually
2061 * XXX Calc checksum here, instead we do this for now
2108 * This panic should be able to be removed if we do the
2109 * zero'ing mentioned above, and we are certain to roll
2156 * filesystem requires that we must take the vnode lock
2157 * to call VOP_BMAP, then we can probably do it in
2482 /* Use this until we read the actual log header */
2502 * especially root. However, we might still want to verify
2666 * Keep track of where we found this so location won't be