From 40b5a643d51b678b7a0e9970c80740cea04b4837 Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Fri, 6 Nov 2015 10:43:37 -0600 Subject: [PATCH] LU-7403 llite: change it_data to it_request Change the void *it_data member of struct lookup_intent to struct ptlrpc_request *it_request. Signed-off-by: John L. Hammond Change-Id: If3eb215620dfd376a18e4b15d7ab9f346468add0 Reviewed-on: http://review.whamcloud.com/17070 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: James Simmons --- lustre/include/lustre_intent.h | 2 +- lustre/llite/dcache.c | 6 +++--- lustre/llite/file.c | 13 ++++++------- lustre/llite/namei.c | 2 +- lustre/llite/xattr_cache.c | 2 +- lustre/lmv/lmv_intent.c | 4 ++-- lustre/mdc/mdc_locks.c | 6 +++--- lustre/mdc/mdc_request.c | 2 +- 8 files changed, 18 insertions(+), 19 deletions(-) diff --git a/lustre/include/lustre_intent.h b/lustre/include/lustre_intent.h index a8eac3f..5616735 100644 --- a/lustre/include/lustre_intent.h +++ b/lustre/include/lustre_intent.h @@ -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; }; diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c index ee0c70c..8c3db0a 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -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; } diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 3bbe2ad..4a58632 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -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); diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index eabbbab..3cb0398 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -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) diff --git a/lustre/llite/xattr_cache.c b/lustre/llite/xattr_cache.c index 3444058..a619db3 100644 --- a/lustre/llite/xattr_cache.c +++ b/lustre/llite/xattr_cache.c @@ -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); diff --git a/lustre/lmv/lmv_intent.c b/lustre/lmv/lmv_intent.c index 566f191..bf3ed35 100644 --- a/lustre/lmv/lmv_intent.c +++ b/lustre/lmv/lmv_intent.c @@ -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]; diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 4f6b14ee..8c3cacd 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -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); } diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 725510c..e189c1f 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -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; -- 1.8.3.1