[block-cache] Fix error handling in reading libaio events
io_event::res is a signed int64 in kernel, but libaio defines it as unsigned long. We should cast it to a signed value.
This commit is contained in:
parent
49bfc12e9c
commit
6c1be8d6fa
@ -213,7 +213,7 @@ block_cache::wait_io()
|
|||||||
if (e.res == block_size_ << SECTOR_SHIFT)
|
if (e.res == block_size_ << SECTOR_SHIFT)
|
||||||
complete_io(*b, 0);
|
complete_io(*b, 0);
|
||||||
|
|
||||||
else if (e.res < 0)
|
else if (static_cast<long>(e.res) < 0)
|
||||||
complete_io(*b, e.res);
|
complete_io(*b, e.res);
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user