bufferptr p = buffer::create_small_page_aligned(len);
char *buf = p.c_str();
- ceph_assert(ioc->nvme_task_first == nullptr);
- ceph_assert(ioc->nvme_task_last == nullptr);
- make_read_tasks(this, off, ioc, buf, len, &t, off, len);
+ // for sync read, need to control IOContext in itself
+ IOContext read_ioc(cct, nullptr);
+ make_read_tasks(this, off, &read_ioc, buf, len, &t, off, len);
dout(5) << __func__ << " " << off << "~" << len << dendl;
- aio_submit(ioc);
+ aio_submit(&read_ioc);
pbl->push_back(std::move(p));
return t.return_code;