Signed-off-by: Haomai Wang <haomai@xsky.com>
t->offset = off;
t->len = len;
t->device = this;
- t->return_code = 0;
- t->next = nullptr;
if (buffered) {
- t->ctx = nullptr;
// Only need to push the first entry
driver->queue_task(t);
Mutex::Locker l(buffer_lock);
t->offset = off;
t->len = len;
t->device = this;
- t->return_code = 0;
- t->next = nullptr;
t->ctx = ioc;
Task *first = static_cast<Task*>(ioc->nvme_task_first);
t->len = len;
t->device = this;
t->return_code = 1;
- t->next = nullptr;
++ioc->num_reading;
driver->queue_task(t);
t->len = aligned_len;
t->device = this;
t->return_code = 1;
- t->next = nullptr;
++ioc.num_reading;
driver->queue_task(t);
class NVMEDevice;
struct Task {
- NVMEDevice *device;
- IOContext *ctx;
+ NVMEDevice *device = nullptr;
+ IOContext *ctx = nullptr;
IOCommand command;
- uint64_t offset, len;
- void *buf;
- Task *next;
- int64_t return_code;
+ uint64_t offset = 0;
+ uint64_t len = 0;
+ void *buf = nullptr;
+ Task *next = nullptr;
+ int64_t return_code = 0;
utime_t start;
};