Skip to content

Commit e89b8d6

Browse files
authored
Add EREMOTEIO to known errors into pdisk_aio library (#12041)
1 parent b4d276d commit e89b8d6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ydb/library/pdisk_io/aio.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ enum class EIoResult : i64 {
101101
// From kernel maillist: "this error is not fatal. One can fix it easily by rewriting affected sector"
102102
InvalidSequence = 14, // aka EILSEQ: GetEvents
103103
// for broken disk's error-log: "READ_ERROR: The read data could not be recovered from the media"
104-
NoData = 15 // aka ENODATA: GetEvents
104+
NoData = 15, // aka ENODATA: GetEvents
105+
RemoteIOError = 16 // aka EREMOTEIO: GetEvents
105106
};
106107

107108
struct TAsyncIoOperationResult {

ydb/library/pdisk_io/aio_linux.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ class TAsyncIoContextLibaio : public IAsyncIoContext {
212212
case ENOSYS: return EIoResult::FunctionNotImplemented;
213213
case EILSEQ: return EIoResult::InvalidSequence;
214214
case ENODATA: return EIoResult::NoData;
215+
case EREMOTEIO: return EIoResult::RemoteIOError;
215216
default: Y_FAIL_S(PDiskInfo << " unexpected error in " << info << ", error# " << -ret
216217
<< " strerror# " << strerror(-ret));
217218
}
@@ -546,7 +547,7 @@ class TAsyncIoContextLiburing : public IAsyncIoContext {
546547
tOp->IsReadOp = true;
547548
tOp->DataPtr = destination;
548549
tOp->DataSize = size;
549-
tOp->DataOffset = offset;
550+
tOp->DataOffset = offset;
550551
}
551552

552553
void PreparePWrite(IAsyncIoOperation *op, const void *source, size_t size, size_t offset) override {

0 commit comments

Comments
 (0)