Check result to be equal to iov_len
This commit is contained in:
+5
-2
@@ -111,9 +111,12 @@ int blockstore::continue_sync(blockstore_operation *op)
|
||||
|
||||
void blockstore::handle_sync_event(ring_data_t *data, blockstore_operation *op)
|
||||
{
|
||||
if (data->res < 0)
|
||||
if (data->res < data->iov.iov_len)
|
||||
{
|
||||
throw std::runtime_error("write operation failed. in-memory state is corrupted. AAAAAAAaaaaaaaaa!!!111");
|
||||
throw std::runtime_error(
|
||||
"write operation failed ("+std::to_string(data->res)+" != "+std::to_string(data->iov.iov_len)+
|
||||
"). in-memory state is corrupted. AAAAAAAaaaaaaaaa!!!111"
|
||||
);
|
||||
}
|
||||
op->pending_ops--;
|
||||
if (op->pending_ops == 0)
|
||||
|
||||
Reference in New Issue
Block a user