Whamcloud - gitweb
LU-7403 llite: change it_data to it_request 70/17070/5
authorJohn L. Hammond <john.hammond@intel.com>
Fri, 6 Nov 2015 16:43:37 +0000 (10:43 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 21 May 2016 02:31:07 +0000 (02:31 +0000)
Change the void *it_data member of struct lookup_intent to struct
ptlrpc_request *it_request.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: If3eb215620dfd376a18e4b15d7ab9f346468add0
Reviewed-on: http://review.whamcloud.com/17070
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
lustre/include/lustre_intent.h
lustre/llite/dcache.c
lustre/llite/file.c
lustre/llite/namei.c
lustre/llite/xattr_cache.c
lustre/lmv/lmv_intent.c
lustre/mdc/mdc_locks.c
lustre/mdc/mdc_request.c

index a8eac3f..5616735 100644 (file)
@@ -50,7 +50,7 @@ struct lookup_intent {
        int                      it_lock_mode;
        int                      it_remote_lock_mode;
        __u64                    it_remote_lock_handle;
-       void                    *it_data;
+       struct ptlrpc_request   *it_request;
        unsigned int             it_lock_set:1;
 };
 
index ee0c70c..8c3db0a 100644 (file)
@@ -235,13 +235,13 @@ void ll_intent_release(struct lookup_intent *it)
         ll_intent_drop_lock(it);
         /* We are still holding extra reference on a request, need to free it */
         if (it_disposition(it, DISP_ENQ_OPEN_REF))
-               ptlrpc_req_finished(it->it_data); /* ll_file_open */
+               ptlrpc_req_finished(it->it_request); /* ll_file_open */
 
        if (it_disposition(it, DISP_ENQ_CREATE_REF)) /* create rec */
-               ptlrpc_req_finished(it->it_data);
+               ptlrpc_req_finished(it->it_request);
 
        it->it_disposition = 0;
-       it->it_data = NULL;
+       it->it_request = NULL;
        EXIT;
 }
 
index 3bbe2ad..4a58632 100644 (file)
@@ -434,10 +434,9 @@ out:
 static int ll_och_fill(struct obd_export *md_exp, struct lookup_intent *it,
                       struct obd_client_handle *och)
 {
-       struct ptlrpc_request *req = it->it_data;
        struct mdt_body *body;
 
-       body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
+       body = req_capsule_server_get(&it->it_request->rq_pill, &RMF_MDT_BODY);
        och->och_fh = body->mbo_handle;
        och->och_fid = body->mbo_fid1;
        och->och_lease_handle.cookie = it->it_lock_handle;
@@ -664,7 +663,7 @@ out_openerr:
         }
 
        if (it && it_disposition(it, DISP_ENQ_OPEN_REF)) {
-               ptlrpc_req_finished(it->it_data);
+               ptlrpc_req_finished(it->it_request);
                it_clear_disposition(it, DISP_ENQ_OPEN_REF);
        }
 
@@ -1746,7 +1745,7 @@ int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it)
 out:
        /* this one is in place of ll_file_open */
        if (it_disposition(it, DISP_ENQ_OPEN_REF)) {
-               ptlrpc_req_finished(it->it_data);
+               ptlrpc_req_finished(it->it_request);
                it_clear_disposition(it, DISP_ENQ_OPEN_REF);
        }
        RETURN(rc);
@@ -4119,9 +4118,9 @@ again:
                          PFID(&lli->lli_fid), inode);
 
        rc = md_enqueue(sbi->ll_md_exp, &einfo, NULL, &it, op_data, &lockh, 0);
-       if (it.it_data != NULL)
-               ptlrpc_req_finished(it.it_data);
-       it.it_data = NULL;
+       if (it.it_request != NULL)
+               ptlrpc_req_finished(it.it_request);
+       it.it_request = NULL;
 
        ll_finish_md_op_data(op_data);
 
index eabbbab..3cb0398 100644 (file)
@@ -862,7 +862,7 @@ static struct inode *ll_create_node(struct inode *dir, struct lookup_intent *it)
        LASSERT(it && it->it_disposition);
 
        LASSERT(it_disposition(it, DISP_ENQ_CREATE_REF));
-       request = it->it_data;
+       request = it->it_request;
         it_clear_disposition(it, DISP_ENQ_CREATE_REF);
         rc = ll_prep_inode(&inode, request, dir->i_sb, it);
         if (rc)
index 3444058..a619db3 100644 (file)
@@ -363,7 +363,7 @@ static int ll_xattr_find_get_lock(struct inode *inode,
                RETURN(rc);
        }
 
-       *req = (struct ptlrpc_request *)oit->it_data;
+       *req = oit->it_request;
 out:
        down_write(&lli->lli_xattrs_list_rwsem);
        mutex_unlock(&lli->lli_xattrs_enq_lock);
index 566f191..bf3ed35 100644 (file)
@@ -92,7 +92,7 @@ static int lmv_intent_remote(struct obd_export *exp, struct lookup_intent *it,
        if (pmode) {
                plock.cookie = it->it_lock_handle;
                it->it_lock_mode = 0;
-               it->it_data = NULL;
+               it->it_request = NULL;
        }
 
        LASSERT(fid_is_sane(&body->mbo_fid1));
@@ -424,7 +424,7 @@ lmv_intent_lookup(struct obd_export *exp, struct md_op_data *op_data,
 
                        /* release the previous request */
                        ptlrpc_req_finished(*reqp);
-                       it->it_data = NULL;
+                       it->it_request = NULL;
                        *reqp = NULL;
 
                        oinfo = &lsm->lsm_md_oinfo[stripe_index];
index 4f6b14e..8c3cacd 100644 (file)
@@ -568,7 +568,7 @@ static int mdc_finish_enqueue(struct obd_export *exp,
        it->it_status = (int)lockrep->lock_policy_res2;
        it->it_lock_mode = einfo->ei_mode;
        it->it_lock_handle = lockh->cookie;
-       it->it_data = req;
+       it->it_request = req;
 
        /* Technically speaking rq_transno must already be zero if
         * it_status is in error, so the check is a bit redundant */
@@ -881,7 +881,7 @@ resend:
 
                it->it_lock_handle = 0;
                it->it_lock_mode = 0;
-               it->it_data = NULL;
+               it->it_request = NULL;
        }
 
        RETURN(rc);
@@ -1123,7 +1123,7 @@ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data,
        if (rc < 0)
                RETURN(rc);
 
-       *reqp = it->it_data;
+       *reqp = it->it_request;
         rc = mdc_finish_intent_lock(exp, *reqp, op_data, it, &lockh);
         RETURN(rc);
 }
index 725510c..e189c1f 100644 (file)
@@ -656,7 +656,7 @@ int mdc_set_open_replay_data(struct obd_export *exp,
        struct md_open_data     *mod;
        struct mdt_rec_create   *rec;
        struct mdt_body         *body;
-       struct ptlrpc_request   *open_req = it->it_data;
+       struct ptlrpc_request   *open_req = it->it_request;
        struct obd_import       *imp = open_req->rq_import;
        ENTRY;