@@ -605,7 +605,8 @@ struct dentry *ll_splice_alias(struct inode *inode, struct dentry *de)
static int ll_lookup_it_finish(struct ptlrpc_request *request,
struct lookup_intent *it,
struct inode *parent, struct dentry **de,
- void *secctx, u32 secctxlen)
+ void *secctx, u32 secctxlen,
+ ktime_t kstart)
{
struct inode *inode = NULL;
u64 bits = 0;
@@ -708,6 +709,11 @@ static int ll_lookup_it_finish(struct ptlrpc_request *request,
}
}
+ if (it_disposition(it, DISP_OPEN_CREATE)) {
+ ll_stats_ops_tally(ll_i2sbi(parent), LPROC_LL_MKNOD,
+ ktime_us_delta(ktime_get(), kstart));
+ }
+
out:
if (rc != 0 && it->it_op & IT_OPEN) {
ll_intent_drop_lock(it);
@@ -722,6 +728,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
u32 *secctxlen,
struct pcc_create_attach *pca)
{
+ ktime_t kstart = ktime_get();
struct lookup_intent lookup_it = { .it_op = IT_LOOKUP };
struct dentry *save = dentry, *retval;
struct ptlrpc_request *req = NULL;
@@ -887,7 +894,8 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
ll_unlock_md_op_lsm(op_data);
rc = ll_lookup_it_finish(req, it, parent, &dentry,
secctx ? *secctx : NULL,
- secctxlen ? *secctxlen : 0);
+ secctxlen ? *secctxlen : 0,
+ kstart);
if (rc != 0) {
ll_intent_release(it);
retval = ERR_PTR(rc);
@@ -733,6 +733,12 @@ static int mdc_finish_enqueue(struct obd_export *exp,
mdc_set_open_replay_data(NULL, NULL, it);
}
+ if (it_disposition(it, DISP_OPEN_CREATE) &&
+ !it_open_error(DISP_OPEN_CREATE, it)) {
+ lprocfs_counter_incr(exp->exp_obd->obd_md_stats,
+ LPROC_MD_CREATE);
+ }
+
if (body->mbo_valid & (OBD_MD_FLDIREA | OBD_MD_FLEASIZE)) {
void *eadata;