Use linked list heap in blockstore code

WIP, still slower than the old version :-E
This commit is contained in:
Vitaliy Filippov
2025-11-23 19:07:43 +03:00
parent e2fa675ad0
commit 622cc55924
5 changed files with 46 additions and 25 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ int blockstore_impl_t::dequeue_read(blockstore_op_t *op)
PRIV(op)->pending_ops = 0;
auto & rv = PRIV(op)->read_vec;
uint64_t result_version = 0;
for (heap_write_t *wr = obj->get_writes(); wr < (heap_write_t*)obj->next(); wr = wr->next(heap))
for (auto wr = obj->get_writes(); wr; wr = wr->next())
{
if (op->version < wr->version)
{
@@ -362,7 +362,7 @@ int blockstore_impl_t::read_bitmap(object_id oid, uint64_t target_version, void
heap_object_t *obj = heap->read_entry(oid, NULL);
if (obj)
{
for (heap_write_t *wr = obj->get_writes(); wr < (heap_write_t*)obj->next(); wr = wr->next(heap))
for (auto wr = obj->get_writes(); wr; wr = wr->next())
{
if (target_version < wr->version)
{