This makes all the IOs effectively synchronous (while holding the lock),
which isn't great, but at least it's correct. We can contemplate async
later..
Signed-off-by: Sage Weil <sage@redhat.com>
}
}
dout(20) << __func__ << " h " << h << " pos now " << h->pos << dendl;
+ _flush_wait(h);
return 0;
}
+void BlueFS::_flush_wait(FileWriter *h)
+{
+ dout(10) << __func__ << " " << h << dendl;
+ utime_t start = ceph_clock_now(NULL);
+ for (auto p : h->iocv) {
+ p->aio_wait();
+ }
+ utime_t end = ceph_clock_now(NULL);
+ utime_t dur = end - start;
+ dout(10) << __func__ << " " << h << " done in " << dur << dendl;
+}
+
int BlueFS::_flush(FileWriter *h, bool force)
{
uint64_t length = h->buffer.length();
int _allocate(unsigned bdev, uint64_t len, vector<bluefs_extent_t> *ev);
int _flush_range(FileWriter *h, uint64_t offset, uint64_t length);
int _flush(FileWriter *h, bool force);
+ void _flush_wait(FileWriter *h);
void _fsync(FileWriter *h);
int _flush_log();