enum dt_bufs_type dbt = DT_BUFS_TYPE_READ;
int maxlnb = *nr_local;
__u64 begin, end;
+ ktime_t kstart = ktime_get();
ENTRY;
LASSERT(env != NULL);
if (unlikely(rc))
GOTO(buf_put, rc);
- ofd_access(ofd,
+ ofd_access(env, ofd,
&(struct lu_fid) {
.f_seq = oa->o_parent_seq,
.f_oid = oa->o_parent_oid,
niocount,
READ);
- ofd_counter_incr(exp, LPROC_OFD_STATS_READ, jobid, tot_bytes);
+ ofd_counter_incr(exp, LPROC_OFD_STATS_READ_BYTES, jobid, tot_bytes);
+ ofd_counter_incr(exp, LPROC_OFD_STATS_READ, jobid,
+ ktime_us_delta(ktime_get(), kstart));
RETURN(0);
buf_put:
enum dt_bufs_type dbt = DT_BUFS_TYPE_WRITE;
int maxlnb = *nr_local;
__u64 begin, end;
+ ktime_t kstart = ktime_get();
ENTRY;
LASSERT(env != NULL);
ofd_read_unlock(env, fo);
- ofd_access(ofd,
+ ofd_access(env, ofd,
&(struct lu_fid) {
.f_seq = oa->o_parent_seq,
.f_oid = oa->o_parent_oid,
obj->ioo_bufcnt,
WRITE);
- ofd_counter_incr(exp, LPROC_OFD_STATS_WRITE, jobid, tot_bytes);
+ ofd_counter_incr(exp, LPROC_OFD_STATS_WRITE_BYTES, jobid, tot_bytes);
+ ofd_counter_incr(exp, LPROC_OFD_STATS_WRITE, jobid,
+ ktime_us_delta(ktime_get(), kstart));
RETURN(0);
err:
dt_bufs_put(env, ofd_object_child(fo), lnb, *nr_local);
GOTO(out_unlock, rc = -ENOENT);
if (likely(!fake_write)) {
- rc = dt_write_commit(env, o, lnb, niocount, th);
+ OBD_FAIL_TIMEOUT_ORSET(OBD_FAIL_OST_WR_ATTR_DELAY,
+ OBD_FAIL_ONCE, cfs_fail_val);
+ rc = dt_write_commit(env, o, lnb, niocount, th, oa->o_size);
if (rc)
GOTO(out_unlock, rc);
}