【问题标题】:fio error checking for write operations写操作的 fio 错误检查
【发布时间】:2017-03-28 04:07:48
【问题描述】:

我正在尝试确定 fio (github.com/axboe/fio) 如何确定使用 libaio ioengine 时是否存在写入错误。

linux kernel aio functionality 的帖子中,我看到回调函数work_done() 中的错误检查示例,该函数检查io_getevents() 返回的事件。

但我在 libaio.c (https://github.com/axboe/fio/blob/master/engines/libaio.c#L145) 的 fio_libaio_getevents() 函数中找不到任何类似的错误检查。

我已经从https://github.com/axboe/fio/blob/fio-2.17/README#L77 写信到邮件列表 (fio@vger.kernel.org),但邮件被退回。所以任何帮助将不胜感激。

提前致谢。

【问题讨论】:

  • 是来自用户空间还是内核空间的调用?

标签: c io linux-kernel aio


【解决方案1】:

错误在struct iocb 中返回为resres2。在该 fio 代码中,您可以看到此处传入的 iocb 数组,为 ld->aio_events + events

        r = io_getevents(ld->aio_ctx, actual_min,
            max, ld->aio_events + events, lt);

在文件前面的函数fio_libaio_event 中检查了实际错误。

【讨论】:

  • 感谢您的指点。另外,我在发送电子邮件 fio@vger.kernel.org 时遇到问题的原因是我的电子邮件是 HTML 格式的,出于安全原因,它被拒绝了。
猜你喜欢
  • 1970-01-01
  • 2021-05-30
  • 1970-01-01
  • 2015-08-02
  • 2020-11-18
  • 1970-01-01
  • 2020-07-05
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多