Remove hardcode of the EC(2+1) scheme, now it supports EC(k+1), fix some bugs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "blockstore_impl.h"
|
||||
|
||||
void blockstore_impl_t::enqueue_write(blockstore_op_t *op)
|
||||
bool blockstore_impl_t::enqueue_write(blockstore_op_t *op)
|
||||
{
|
||||
// Check or assign version number
|
||||
bool found = false, deleted = false, is_del = (op->opcode == BS_OP_DELETE);
|
||||
@@ -40,14 +40,14 @@ void blockstore_impl_t::enqueue_write(blockstore_op_t *op)
|
||||
// Invalid version requested
|
||||
op->retval = -EINVAL;
|
||||
FINISH_OP(op);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
if (deleted && is_del)
|
||||
{
|
||||
// Already deleted
|
||||
op->retval = 0;
|
||||
FINISH_OP(op);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
// Immediately add the operation into dirty_db, so subsequent reads could see it
|
||||
#ifdef BLOCKSTORE_DEBUG
|
||||
@@ -68,6 +68,7 @@ void blockstore_impl_t::enqueue_write(blockstore_op_t *op)
|
||||
.len = is_del ? 0 : op->len,
|
||||
.journal_sector = 0,
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
// First step of the write algorithm: dequeue operation and submit initial write(s)
|
||||
|
||||
Reference in New Issue
Block a user