Remove in_progress_ops

blocking-uring-test
Vitaliy Filippov 2019-11-10 12:48:09 +03:00
parent ae56fe1067
commit 2d0334f9b9
4 changed files with 0 additions and 9 deletions

View File

@ -233,7 +233,6 @@ class blockstore
std::deque<obj_ver_id> unsynced_big_writes; std::deque<obj_ver_id> unsynced_big_writes;
int unsynced_small_writes = 0; int unsynced_small_writes = 0;
std::list<blockstore_operation*> in_progress_syncs; std::list<blockstore_operation*> in_progress_syncs;
std::set<blockstore_operation*> in_progress_ops; // FIXME purpose of tracking this is unclear
uint32_t block_order, block_size; uint32_t block_order, block_size;
uint64_t block_count; uint64_t block_count;
allocator *data_alloc; allocator *data_alloc;

View File

@ -126,7 +126,6 @@ int blockstore::dequeue_read(blockstore_operation *read_op)
} }
read_op->retval = 0; read_op->retval = 0;
read_op->pending_ops = read_op->read_vec.size(); read_op->pending_ops = read_op->read_vec.size();
in_progress_ops.insert(read_op);
return 1; return 1;
} }
@ -143,6 +142,5 @@ void blockstore::handle_read_event(ring_data_t *data, blockstore_operation *op)
if (op->retval == 0) if (op->retval == 0)
op->retval = op->len; op->retval = op->len;
op->callback(op); op->callback(op);
in_progress_ops.erase(op);
} }
} }

View File

@ -29,7 +29,6 @@ int blockstore::dequeue_sync(blockstore_operation *op)
int done = ack_sync(op); int done = ack_sync(op);
if (!done) if (!done)
{ {
in_progress_ops.insert(op);
op->prev_sync_count = in_progress_syncs.size(); op->prev_sync_count = in_progress_syncs.size();
op->in_progress_ptr = in_progress_syncs.insert(in_progress_syncs.end(), op); op->in_progress_ptr = in_progress_syncs.insert(in_progress_syncs.end(), op);
} }
@ -206,14 +205,12 @@ int blockstore::ack_sync(blockstore_operation *op)
done_syncs++; done_syncs++;
// Acknowledge next_sync // Acknowledge next_sync
in_progress_syncs.erase(next_sync->in_progress_ptr); in_progress_syncs.erase(next_sync->in_progress_ptr);
in_progress_ops.erase(next_sync);
next_sync->retval = 0; next_sync->retval = 0;
next_sync->callback(next_sync); next_sync->callback(next_sync);
} }
} }
// Acknowledge sync // Acknowledge sync
in_progress_syncs.erase(op->in_progress_ptr); in_progress_syncs.erase(op->in_progress_ptr);
in_progress_ops.erase(op);
op->retval = 0; op->retval = 0;
op->callback(op); op->callback(op);
return 1; return 1;

View File

@ -29,7 +29,6 @@ int blockstore::dequeue_write(blockstore_operation *op)
); );
op->pending_ops = 1; op->pending_ops = 1;
op->min_used_journal_sector = op->max_used_journal_sector = 0; op->min_used_journal_sector = op->max_used_journal_sector = 0;
in_progress_ops.insert(op);
} }
else else
{ {
@ -111,7 +110,6 @@ int blockstore::dequeue_write(blockstore_operation *op)
journal.sector_info[journal.cur_sector].usage_count++; journal.sector_info[journal.cur_sector].usage_count++;
op->pending_ops = 2; op->pending_ops = 2;
op->min_used_journal_sector = op->max_used_journal_sector = 1 + journal.cur_sector; op->min_used_journal_sector = op->max_used_journal_sector = 1 + journal.cur_sector;
in_progress_ops.insert(op);
} }
return 1; return 1;
} }
@ -146,7 +144,6 @@ void blockstore::handle_write_event(ring_data_t *data, blockstore_operation *op)
// Acknowledge write without sync // Acknowledge write without sync
op->retval = op->len; op->retval = op->len;
op->callback(op); op->callback(op);
in_progress_ops.erase(op);
// Remember write as unsynced // Remember write as unsynced
if (IS_BIG_WRITE(dirty_it->second.state)) if (IS_BIG_WRITE(dirty_it->second.state))
{ {