Commit 2798cd1b authored by Philip Pronin's avatar Philip Pronin Committed by Facebook GitHub Bot

expose AsyncIOOp::getIocb

Summary:
Similarly to `IoUringOp::getSqe()`, expose underlying submission data
structure.  The end goal is to perform certain introspection in client code to
report aggregated stats (number of IO, total size of IO, ...).

Reviewed By: ot

Differential Revision: D28022188

fbshipit-source-id: edc51420ed901f0a0d9b5b1338308ad680371298
parent 9eff0218
...@@ -52,6 +52,8 @@ class AsyncIOOp : public AsyncBaseOp { ...@@ -52,6 +52,8 @@ class AsyncIOOp : public AsyncBaseOp {
void toStream(std::ostream& os) const override; void toStream(std::ostream& os) const override;
const iocb& getIocb() const { return iocb_; }
private: private:
iocb iocb_; iocb iocb_;
}; };
...@@ -76,10 +78,11 @@ class AsyncIO : public AsyncBase { ...@@ -76,10 +78,11 @@ class AsyncIO : public AsyncBase {
void initializeContext() override; void initializeContext() override;
private: protected:
int submitOne(AsyncBase::Op* op) override; int submitOne(AsyncBase::Op* op) override;
int submitRange(Range<AsyncBase::Op**> ops) override; int submitRange(Range<AsyncBase::Op**> ops) override;
private:
Range<AsyncBase::Op**> doWait( Range<AsyncBase::Op**> doWait(
WaitType type, WaitType type,
size_t minRequests, size_t minRequests,
......
...@@ -98,10 +98,11 @@ class IoUring : public AsyncBase { ...@@ -98,10 +98,11 @@ class IoUring : public AsyncBase {
void initializeContext() override; void initializeContext() override;
private: protected:
int submitOne(AsyncBase::Op* op) override; int submitOne(AsyncBase::Op* op) override;
int submitRange(Range<AsyncBase::Op**> ops) override; int submitRange(Range<AsyncBase::Op**> ops) override;
private:
Range<AsyncBase::Op**> doWait( Range<AsyncBase::Op**> doWait(
WaitType type, WaitType type,
size_t minRequests, size_t minRequests,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment