Whamcloud - gitweb
LU-694 ptlrpc: Job Stats
[fs/lustre-release.git] / lustre / osc / osc_request.c
index 1efb9a2..f1bb130 100644 (file)
@@ -543,7 +543,6 @@ int osc_punch_base(struct obd_export *exp, struct obd_info *oinfo,
 
         ptlrpc_request_set_replen(req);
 
-
         req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_setattr_interpret;
         CLASSERT (sizeof(*sa) <= sizeof(req->rq_async_args));
         sa = ptlrpc_req_async_args(req);
@@ -2379,6 +2378,7 @@ static struct ptlrpc_request *osc_build_req(const struct lu_env *env,
         LASSERT(ops != NULL);
         crattr.cra_oa = oa;
         crattr.cra_capa = NULL;
+       memset(crattr.cra_jobid, 0, JOBSTATS_JOBID_SIZE);
         cl_req_attr_set(env, clerq, &crattr, ~0ULL);
         if (lock) {
                 oa->o_handle = lock->l_remote_handle;
@@ -2410,6 +2410,8 @@ static struct ptlrpc_request *osc_build_req(const struct lu_env *env,
         cl_req_attr_set(env, clerq, &crattr,
                         OBD_MD_FLMTIME|OBD_MD_FLCTIME|OBD_MD_FLATIME);
 
+       lustre_msg_set_jobid(req->rq_reqmsg, crattr.cra_jobid);
+
         CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
         aa = ptlrpc_req_async_args(req);
         CFS_INIT_LIST_HEAD(&aa->aa_oaps);