Fix op validation, fix journal sector usage tracking

Now it runs for a while with fio but then crashes with ENOSPC because
of an apparent bug in the allocator
This commit is contained in:
Vitaliy Filippov
2019-11-26 20:38:25 +03:00
parent a6770f619a
commit b8e53f8c67
5 changed files with 76 additions and 35 deletions
+1 -1
View File
@@ -256,7 +256,7 @@ void blockstore::enqueue_op(blockstore_operation *op)
{
int type = op->flags & OP_TYPE_MASK;
if (type < OP_READ || type > OP_DELETE || (type == OP_READ || type == OP_WRITE) &&
(op->offset >= block_size || op->len >= block_size-op->offset || (op->len % DISK_ALIGNMENT)))
(op->offset >= block_size || op->len > block_size-op->offset || (op->len % DISK_ALIGNMENT)))
{
// Basic verification not passed
op->retval = -EINVAL;