- if (ddir == DDIR_WRITE) {
- if (f) {
- if (f->first_write == -1ULL ||
- io_u->offset < f->first_write)
- f->first_write = io_u->offset;
- if (f->last_write == -1ULL ||
- ((io_u->offset + bytes) > f->last_write))
- f->last_write = io_u->offset + bytes;
- }
- if (td->last_write_comp) {
- int idx = td->last_write_idx++;
-
- td->last_write_comp[idx] = io_u->offset;
- if (td->last_write_idx == td->o.iodepth)
- td->last_write_idx = 0;
- }
- }
+ if (ddir == DDIR_WRITE)
+ file_log_write_comp(td, f, io_u->offset, bytes);