Skip to content

Commit

Permalink
improve logging of aio failures in vhost-server (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
budevg committed Jan 24, 2024
1 parent 5c7b6b8 commit c0fae54
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions cloud/blockstore/vhost-server/backend_aio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,15 @@ void TAioBackend::CompletionThreadFunc()
if (events[i].res2 != 0 || events[i].res != sub->u.c.nbytes) {
stats.CompFailed += 1;
result = VHD_BDEV_IOERR;
STORAGE_ERROR("IO request: %s", strerror(-events[i].res));
STORAGE_ERROR(
"IO request: opcode=%d, offset=%lld size=%lu, res=%lu, "
"res2=%lu, %s",
sub->aio_lio_opcode,
sub->u.c.offset,
sub->u.c.nbytes,
events[i].res,
events[i].res2,
strerror(-events[i].res));
}

CompleteRequest(sub, req, result, stats, now);
Expand All @@ -430,7 +438,15 @@ void TAioBackend::CompletionThreadFunc()
{
stats.CompFailed += 1;
result = VHD_BDEV_IOERR;
STORAGE_ERROR("IO request: %s", strerror(-events[i].res));
STORAGE_ERROR(
"IO request: opcode=%d, offset=%lld, size=%llu, res=%lu, "
"res2=%lu, %s",
req->aio_lio_opcode,
req->u.c.offset,
bio->total_sectors * VHD_SECTOR_SIZE,
events[i].res,
events[i].res2,
strerror(-events[i].res));
}

CompleteRequest(req, result, stats, now);
Expand Down

0 comments on commit c0fae54

Please sign in to comment.