Commit 34b4ceec authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

Fix up placement of root fifo. Addresses #1000, #1080, #1131.

git-svn-id: file:///svn/tokudb.1131b+1080a@6159 c7de825b-a66e-492c-adef-691d508d4ae1
parent cae56019
......@@ -770,7 +770,7 @@ int deserialize_brtheader (u_int32_t size, int fd, DISKOFF off, struct brt_heade
toku_free(rc.buf);
{
int r;
if ((r = deserialize_fifo_at(fd, h->unused_blocks.b*h->nodesize, &h->fifo))) return r;
if ((r = deserialize_fifo_at(fd, block_allocator_allocated_limit(h->block_allocator), &h->fifo))) return r;
}
*brth = h;
return 0;
......
......@@ -218,9 +218,11 @@ void toku_brtheader_free (struct brt_header *h) {
int toku_brtheader_close (CACHEFILE cachefile, void *header_v) {
struct brt_header *h = header_v;
printf("%s:%d allocated_limit=%lu writing queue to %lu\n", __FILE__, __LINE__,
block_allocator_allocated_limit(h->block_allocator), h->unused_blocks.b*h->nodesize);
if (h->dirty) {
toku_serialize_brt_header_to(toku_cachefile_fd(cachefile), h);
toku_serialize_fifo_at(toku_cachefile_fd(cachefile), h->unused_blocks.b*h->nodesize, h->fifo);
toku_serialize_fifo_at(toku_cachefile_fd(cachefile), block_allocator_allocated_limit(h->block_allocator), h->fifo);
}
toku_brtheader_free(h);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment