void *key, *val = NULL;
int keylen, vallen, rc = 0;
bool is_grant_shrink;
+ ktime_t kstart = ktime_get();
ENTRY;
rc = -EOPNOTSUPP;
}
ofd_counter_incr(tsi->tsi_exp, LPROC_OFD_STATS_SET_INFO,
- tsi->tsi_jobid, 1);
+ tsi->tsi_jobid, ktime_us_delta(ktime_get(), kstart));
RETURN(rc);
}
void *key;
int keylen;
int replylen, rc = 0;
+ ktime_t kstart = ktime_get();
ENTRY;
rc = -EOPNOTSUPP;
}
ofd_counter_incr(tsi->tsi_exp, LPROC_OFD_STATS_GET_INFO,
- tsi->tsi_jobid, 1);
+ tsi->tsi_jobid, ktime_us_delta(ktime_get(), kstart));
RETURN(rc);
}
struct ofd_object *fo;
__u64 flags = 0;
enum ldlm_mode lock_mode = LCK_PR;
+ ktime_t kstart = ktime_get();
bool srvlock;
int rc;
ENTRY;
tgt_extent_unlock(&lh, lock_mode);
ofd_counter_incr(tsi->tsi_exp, LPROC_OFD_STATS_GETATTR,
- tsi->tsi_jobid, 1);
+ tsi->tsi_jobid, ktime_us_delta(ktime_get(), kstart));
repbody->oa.o_valid |= OBD_MD_FLFLAGS;
repbody->oa.o_flags = OBD_FL_FLUSH;
struct ost_body *repbody;
struct ldlm_resource *res;
struct ofd_object *fo;
+ ktime_t kstart = ktime_get();
int rc = 0;
ENTRY;
OFD_VALID_FLAGS | LA_UID | LA_GID | LA_PROJID);
ofd_counter_incr(tsi->tsi_exp, LPROC_OFD_STATS_SETATTR,
- tsi->tsi_jobid, 1);
+ tsi->tsi_jobid, ktime_us_delta(ktime_get(), kstart));
EXIT;
out_put:
ofd_object_put(tsi->tsi_env, fo);
u64 seq = ostid_seq(&oa->o_oi);
u64 oid = ostid_id(&oa->o_oi);
struct ofd_seq *oseq;
- s64 diff;
- int rc = 0;
int sync_trans = 0;
long granted = 0;
+ ktime_t kstart = ktime_get();
+ s64 diff;
+ int rc = 0;
ENTRY;
}
EXIT;
ofd_counter_incr(exp, LPROC_OFD_STATS_CREATE,
- tsi->tsi_jobid, 1);
+ tsi->tsi_jobid, ktime_us_delta(ktime_get(), kstart));
if (unlikely(!oseq->os_last_id_synced))
oseq->os_last_id_synced = 1;
out:
struct ofd_device *ofd = ofd_exp(tsi->tsi_exp);
struct ofd_thread_info *fti = tsi2ofd_info(tsi);
struct lu_fid *fid = &fti->fti_fid;
+ ktime_t kstart = ktime_get();
u64 oid;
u32 count;
int rc = 0;
}
ofd_counter_incr(tsi->tsi_exp, LPROC_OFD_STATS_DESTROY,
- tsi->tsi_jobid, 1);
+ tsi->tsi_jobid, ktime_us_delta(ktime_get(), kstart));
GOTO(out, rc);
*/
static int ofd_statfs_hdl(struct tgt_session_info *tsi)
{
+ ktime_t kstart = ktime_get();
struct obd_statfs *osfs;
int rc;
rc = -EINPROGRESS;
ofd_counter_incr(tsi->tsi_exp, LPROC_OFD_STATS_STATFS,
- tsi->tsi_jobid, 1);
+ tsi->tsi_jobid, ktime_us_delta(ktime_get(), kstart));
RETURN(rc);
}
struct ofd_thread_info *fti = tsi2ofd_info(tsi);
struct ofd_device *ofd = ofd_exp(tsi->tsi_exp);
struct ofd_object *fo = NULL;
+ ktime_t kstart = ktime_get();
int rc = 0;
ENTRY;
GOTO(put, rc);
ofd_counter_incr(tsi->tsi_exp, LPROC_OFD_STATS_SYNC,
- tsi->tsi_jobid, 1);
+ tsi->tsi_jobid, ktime_us_delta(ktime_get(), kstart));
if (fo == NULL)
RETURN(0);
int rc, mode;
__u64 start, end;
bool srvlock;
+ ktime_t kstart = ktime_get();
repbody = req_capsule_server_get(tsi->tsi_pill, &RMF_OST_BODY);
if (repbody == NULL)
rc = 0;
ofd_counter_incr(tsi->tsi_exp, LPROC_OFD_STATS_PREALLOC,
- tsi->tsi_jobid, 1);
+ tsi->tsi_jobid, ktime_us_delta(ktime_get(), kstart));
EXIT;
out_put:
struct ofd_object *fo;
__u64 flags = 0;
struct lustre_handle lh = { 0, };
- int rc;
__u64 start, end;
bool srvlock;
+ ktime_t kstart = ktime_get();
+ int rc;
ENTRY;
GOTO(out_put, rc);
ofd_counter_incr(tsi->tsi_exp, LPROC_OFD_STATS_PUNCH,
- tsi->tsi_jobid, 1);
+ tsi->tsi_jobid, ktime_us_delta(ktime_get(), kstart));
EXIT;
out_put:
ofd_object_put(tsi->tsi_env, fo);
{
struct obd_quotactl *oqctl, *repoqc;
struct lu_nodemap *nodemap;
+ ktime_t kstart = ktime_get();
int id;
int rc;
rc = lquotactl_slv(tsi->tsi_env, tsi->tsi_tgt->lut_bottom, repoqc);
ofd_counter_incr(tsi->tsi_exp, LPROC_OFD_STATS_QUOTACTL,
- tsi->tsi_jobid, 1);
+ tsi->tsi_jobid, ktime_us_delta(ktime_get(), kstart));
if (repoqc->qc_id != id)
swap(repoqc->qc_id, id);