X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=io_uring_engine.cpp;fp=io_uring_engine.cpp;h=116cf85f285ab15b1a85a6a39f59741271422e06;hb=de3bb58078cdcaf357a9a0c37648596c85615bc2;hp=ab9f411c7774ad7905bfbde901459540ee3c4a23;hpb=d8b761f706a9f3d317f90fddfba7537fd81deedf;p=plocate diff --git a/io_uring_engine.cpp b/io_uring_engine.cpp index ab9f411..116cf85 100644 --- a/io_uring_engine.cpp +++ b/io_uring_engine.cpp @@ -46,7 +46,7 @@ IOUringEngine::IOUringEngine(size_t slop_bytes) #endif } -void IOUringEngine::submit_stat(const char *path, std::function cb) +void IOUringEngine::submit_stat(const char *path, std::function cb) { assert(supports_stat); @@ -115,7 +115,7 @@ void IOUringEngine::submit_read_internal(io_uring_sqe *sqe, int fd, size_t len, ++pending_reads; } -void IOUringEngine::submit_stat_internal(io_uring_sqe *sqe, char *path, std::function cb) +void IOUringEngine::submit_stat_internal(io_uring_sqe *sqe, char *path, std::function cb) { PendingRead *pending = new PendingRead; pending->op = OP_STAT; @@ -166,7 +166,7 @@ void IOUringEngine::finish() --pending_reads; size_t old_pending_reads = pending_reads; - pending->stat_cb(); + pending->stat_cb(cqe->res == 0); free(pending->stat.pathname); delete pending->stat.buf; delete pending;