]> git.pond.sub.org Git - empserver/commit
Generalize ef_extend() to non-file-backed tables
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 21 Feb 2008 20:12:58 +0000 (21:12 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 26 Feb 2008 20:07:55 +0000 (21:07 +0100)
commit2eb8672b5edc1d57383947ff5d938c44d904e709
treed8944cba867f883ff0998b7b6436c6c7ba5226f5
parentf8dcb7b07b342eabc41e820c4f845c0adf510821
Generalize ef_extend() to non-file-backed tables

ef_extend() extended the file bypassing the cache, which screws up the
cache if it's EFF_MEM.  It fixed that by closing and reopening the
table.  Cheesy, and worked only for file-backed tables.

Rewrite ef_extend() to remap the cache properly for EFF_MEM.  While
there, simplify the !EFF_MEM case: steal a cache slot instead of
allocating a buffer.

Factor cache mapping out of ef_open() and ef_extend() into new
ef_realloc_cache().
src/lib/common/file.c