/* This file is part of the Zebra server.
- Copyright (C) 1995-2008 Index Data
+ Copyright (C) 1994-2010 Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
zint block_no;
block_no = b->file[cat].head.last_block++;
p->pos = block_no * CAT_MAX + cat;
+ if (b->log_freelist)
+ yaz_log(b->log_freelist, "got block "
+ ZINT_FORMAT " from last %d:" ZINT_FORMAT, p->pos,
+ cat, p->pos/CAT_MAX);
}
else
{
zebra_exit("isamb:new_block");
}
}
- yaz_log(b->log_freelist, "got block " ZINT_FORMAT " from freelist %d:" ZINT_FORMAT, p->pos,
- cat, p->pos/CAT_MAX);
+ if (b->log_freelist)
+ yaz_log(b->log_freelist, "got block "
+ ZINT_FORMAT " from freelist %d:" ZINT_FORMAT, p->pos,
+ cat, p->pos/CAT_MAX);
memcpy(&b->file[cat].head.free_list, p->buf, sizeof(zint));
}
p->cat = cat;
p->pos, p->cat, p->pos/CAT_MAX);
memcpy(p->buf, &b->file[p->cat].head.free_list, sizeof(zint));
b->file[p->cat].head.free_list = p->pos;
+ b->file[p->cat].head_dirty = 1;
if (!cache_block(b, p->pos, p->buf, 1))
{
yaz_log(b->log_io, "bf_write: close_block (deleted)");
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab