collect
RB_ENTRY(collect) entry;
collect_t collect;
collect = collect_get(layer1.phys_offset); /* layer2 address */
track2 = collect_get_track(collect, result_offset, zone, &layer2);
collect_t collect;
collect = RB_LOOKUP(collect_rb_tree, &CollectTree, phys_offset);
if (collect)
return(collect);
collect = calloc(1, sizeof(*collect));
collect->track2 = calloc(1, HAMMER_BIGBLOCK_SIZE); /* 1<<23 bytes */
collect->layer2 = calloc(1, HAMMER_BIGBLOCK_SIZE); /* 1<<23 bytes */
collect->offsets = calloc(HAMMER_BLOCKMAP_RADIX2, sizeof(hammer_off_t));
collect->phys_offset = phys_offset;
RB_INSERT(collect_rb_tree, &CollectTree, collect);
return (collect);
collect_rel(collect_t collect)
free(collect->offsets);
free(collect->layer2);
free(collect->track2);
free(collect);
collect_get_track(collect_t collect, hammer_off_t offset, int zone,
track2 = &collect->track2[i];
collect->layer2[i] = *layer2;
collect->offsets[i] = offset & ~HAMMER_BIGBLOCK_MASK64;
collect_compare(struct collect *c1, struct collect *c2)
collect_t collect;
RB_FOREACH(collect, collect_rb_tree, &CollectTree) {
dump_collect(collect, stats);
error += collect->error;
while ((collect = RB_ROOT(&CollectTree)) != NULL) {
RB_REMOVE(collect_rb_tree, &CollectTree, collect);
collect_rel(collect);
dump_collect(collect_t collect, zone_stat_t stats)
track2 = &collect->track2[i];
layer2 = &collect->layer2[i];
offset = collect->offsets[i];
collect->error++;
collect->error++;
static RB_HEAD(collect_rb_tree, collect) CollectTree =
RB_PROTOTYPE2(collect_rb_tree, collect, entry, collect_compare, hammer_off_t);
RB_GENERATE2(collect_rb_tree, collect, entry, collect_compare, hammer_off_t,
collect_t collect, hammer_off_t offset, int zone,
static void dump_collect(collect_t collect, zone_stat_t stats);
hammer2_xop_fifo_t collect[HAMMER2_MAXCLUSTER];
TAILQ_FOREACH(xop, &thr->xopq, collect[clindex].entry) {
if (xop->collect[clindex].flags & HAMMER2_XOP_FIFO_RUN)
atomic_set_int(&xop->collect[clindex].flags,
TAILQ_REMOVE(&thr->xopq, xop, collect[clindex].entry);
atomic_clear_int(&xop->collect[clindex].flags,
collect[thr->clindex].entry);
xop->collect[i].thr = thr;
TAILQ_INSERT_TAIL(&thr->xopq, xop, collect[i].entry);
hammer2_xop_fifo_t *fifo = &xop->collect[i];
fifo = &xop->collect[clindex];
fifo = &xop->collect[i];
FILE *collect(struct header *, int);
if ((mtf = collect(hp, printheaders)) == NULL)
hammer2_xop_fifo_t collect[HAMMER2_MAXCLUSTER];
TAILQ_FOREACH(xop, &thr->xopq, collect[clindex].entry) {
if (xop->collect[clindex].flags & HAMMER2_XOP_FIFO_RUN)
atomic_set_int(&xop->collect[clindex].flags,
TAILQ_REMOVE(&thr->xopq, xop, collect[clindex].entry);
atomic_clear_int(&xop->collect[clindex].flags,
collect[thr->clindex].entry);
hammer2_xop_fifo_t *fifo = &xop->head.collect[0];
xop->collect[i].thr = thr;
TAILQ_INSERT_TAIL(&thr->xopq, xop, collect[i].entry);
hammer2_xop_fifo_t *fifo = &xop->collect[i];
kfree(xop->collect[i].array, M_HAMMER2);
kfree(xop->collect[i].errors, M_HAMMER2);
fifo = &xop->collect[clindex];
fifo = &xop->collect[i];