rem: panic("*** set_block_info can't find bnum %ld!\n", blocks[i]);
add: panic("*** set_block_info can't find bnum %Ld!\n", blocks[i]);
context: set_blocks_info(int dev, fs_off_t *blocks, int nblocks,               void (*func)(fs_off_t bnum, size_t nblocks, void *arg), void *arg){    int        i, j, cur;    cache_ent *ce;    cache_ent *ents[NUM_FLUSH_BLOCKS];    LOCK(bc.lock);        for(i=0, cur=0; i < nblocks; i++) {        /* printf("sbi:   %ld (arg 0x%x)\n", blocks[i], arg); */        ce = block_lookup(dev, blocks[i]);        if (ce == NULL) {            panic("*** set_block_info can't find bnum %ld!\n", blocks[i]);            UNLOCK(bc.lock);            return ENOENT;   /* hopefully this doesn't happen... */        }        if (blocks[i] != ce->block_num || dev != ce->dev) {            UNLOCK(bc.lock);            panic("** error1: looked up dev %d block %ld but found dev %d "                    "bnum %ld\n", dev, blocks[i], ce->dev, ce->block_num);            return EBADF;        }        if (ce->lock == 0) {            panic("* set_block_info on bnum %ld (%d) but it's not locked!\n",                    blocks[i], nblocks);        }        if ((ce->flags & CE_DIRTY) == 0) {            panic("*** set_block_info on non-dirty block bnum %ld (%d)!\n",                    blocks[i], nblocks);        }        ce->flags |= CE_BUSY;     /* mark all blocks as busy till we're done */        /* if there is cloned data, it needs to be flushed now */        if (ce->clone && ce->func) {            ents[cur++] = ce;            if (cur >= NUM_FLUSH_BLOCKS) {                UNLOCK(bc.lock);                qsort(ents, cur, sizeof(cache_ent **), cache_ent_cmp);                flush_ents(ents, cur);                LOCK(bc.lock);                for(j=0; j < cur; j++)                    ents[j]->flags &= ~CE_BUSY;                cur = 0;            }        }    }        if (cur != 0) {        UNLOCK(bc.lock);        qsort(ents, cur, sizeof(cache_ent **), cache_ent_cmp);        flush_ents(ents, cur);        LOCK(bc.lock);        for(j=0; j < cur; j++)            ents[j]->flags &= ~CE_BUSY;        cur = 0;    }    /* now go through and set the info that we were asked to */    for(i=0; i < nblocks; i++) {        /* we can call hash_lookup() here because we know it's around */        ce = hash_lookup(&bc.ht, dev, blocks[i]);        if (ce == NULL) {            panic("*** set_block_info can't find bnum %ld!\n", blocks[i]);            UNLOCK(bc.lock);            return ENOENT;   /* hopefully this doesn't happen... */        }        ce->flags &= ~(CE_DIRTY | CE_BUSY);        if (ce->func != NULL) {            panic("*** set_block_info non-null callback on bnum %ld\n",                    ce->block_num);        }                if (ce->clone != NULL) {            panic("*** ce->clone == 0x%lx, not NULL in set_block_info\n",                    (ulong)ce->clone);        }                ce->clone = (void *)malloc(ce->bsize);        if (ce->clone == NULL)            panic("*** can't clone bnum %ld (bsize %d)\n",                    ce->block_num, ce->bsize);        memcpy(ce->clone, ce->data, ce->bsize);        ce->func   = func;        ce->arg    = arg;                ce->logged_bnum = blocks[i];        ce->lock--;        if (ce->lock < 0) {            printf("sbi: whoa nellie! ce @ 0x%lx (%ld) has lock == %d\n",                   (ulong)ce, ce->block_num, ce->lock);        }        if (ce->lock == 0) {            delete_from_list(&bc.locked, ce);            add_to_head(&bc.normal, ce);        }    }    UNLOCK(bc.lock);    return 0;}