From b66aa60591b0bd8ee2f6a7588e54702e10199d3a Mon Sep 17 00:00:00 2001 From: lsy Date: Tue, 7 Nov 2006 03:05:32 +0000 Subject: [PATCH] rename op_mod_capa? to op_capa?. (original mod already means md_op_data) --- lustre/include/lustre/lustre_idl.h | 4 ++-- lustre/llite/file.c | 2 +- lustre/llite/llite_lib.c | 8 ++++---- lustre/mdc/mdc_lib.c | 20 ++++++++++---------- lustre/mdc/mdc_locks.c | 6 +++--- lustre/mdc/mdc_reint.c | 14 +++++++------- lustre/mdc/mdc_request.c | 4 ++-- lustre/obdfilter/filter.c | 6 +++--- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index 0feec4d..5060129 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -663,8 +663,8 @@ struct md_op_data { __u32 op_flags; /* Capa fields */ - struct obd_capa *op_mod_capa1; - struct obd_capa *op_mod_capa2; + struct obd_capa *op_capa1; + struct obd_capa *op_capa2; }; #define MDS_MODE_DONT_LOCK (1 << 30) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 7ea392d..585cefb 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -61,7 +61,7 @@ void ll_pack_inode2opdata(struct inode *inode, struct md_op_data *op_data, ((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags = inode->i_flags; op_data->op_ioepoch = ll_i2info(inode)->lli_ioepoch; memcpy(&op_data->op_handle, fh, sizeof(op_data->op_handle)); - op_data->op_mod_capa1 = ll_mdscapa_get(inode); + op_data->op_capa1 = ll_mdscapa_get(inode); } static void ll_prepare_close(struct inode *inode, struct md_op_data *op_data, diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 195cd7f..9bba794 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -2246,13 +2246,13 @@ ll_prep_md_op_data(struct md_op_data *op_data, struct inode *i1, ll_i2gids(op_data->op_suppgids, i1, i2); op_data->op_fid1 = *ll_inode2fid(i1); - op_data->op_mod_capa1 = ll_mdscapa_get(i1); + op_data->op_capa1 = ll_mdscapa_get(i1); /* @i2 may be NULL. In this case caller itself has to initialize ->fid2 * if needed. */ if (i2) { op_data->op_fid2 = *ll_inode2fid(i2); - op_data->op_mod_capa2 = ll_mdscapa_get(i2); + op_data->op_capa2 = ll_mdscapa_get(i2); } op_data->op_name = name; @@ -2268,8 +2268,8 @@ ll_prep_md_op_data(struct md_op_data *op_data, struct inode *i1, void ll_finish_md_op_data(struct md_op_data *op_data) { - capa_put(op_data->op_mod_capa1); - capa_put(op_data->op_mod_capa2); + capa_put(op_data->op_capa1); + capa_put(op_data->op_capa2); OBD_FREE_PTR(op_data); } diff --git a/lustre/mdc/mdc_lib.c b/lustre/mdc/mdc_lib.c index a828ae5..ee3acf0 100644 --- a/lustre/mdc/mdc_lib.c +++ b/lustre/mdc/mdc_lib.c @@ -129,7 +129,7 @@ void mdc_create_pack(struct ptlrpc_request *req, int offset, rec->cr_suppgid = op_data->op_suppgids[0]; rec->cr_flags = op_data->op_flags; - mdc_pack_capa(req, offset + 1, op_data->op_mod_capa1); + mdc_pack_capa(req, offset + 1, op_data->op_capa1); tmp = lustre_msg_buf(req->rq_reqmsg, offset + 2, op_data->op_namelen + 1); LOGL0(op_data->op_name, op_data->op_namelen, tmp); @@ -195,7 +195,7 @@ void mdc_open_pack(struct ptlrpc_request *req, int offset, rec->cr_time = op_data->op_mod_time; rec->cr_suppgid = op_data->op_suppgids[0]; - mdc_pack_capa(req, offset + 1, op_data->op_mod_capa1); + mdc_pack_capa(req, offset + 1, op_data->op_capa1); /* the next buffer is child capa, which is used for replay, * will be packed from the data in reply message. */ @@ -260,7 +260,7 @@ void mdc_setattr_pack(struct ptlrpc_request *req, int offset, rec = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*rec)); mdc_setattr_pack_rec(rec, op_data); - mdc_pack_capa(req, offset + 1, op_data->op_mod_capa1); + mdc_pack_capa(req, offset + 1, op_data->op_capa1); if (op_data->op_flags & (MF_SOM_CHANGE | MF_EPOCH_OPEN)) { epoch = lustre_msg_buf(req->rq_reqmsg, offset + 2, @@ -298,7 +298,7 @@ void mdc_unlink_pack(struct ptlrpc_request *req, int offset, rec->ul_fid2 = op_data->op_fid2; rec->ul_time = op_data->op_mod_time; - mdc_pack_capa(req, offset + 1, op_data->op_mod_capa1); + mdc_pack_capa(req, offset + 1, op_data->op_capa1); tmp = lustre_msg_buf(req->rq_reqmsg, offset + 2, op_data->op_namelen + 1); LASSERT(tmp != NULL); @@ -323,8 +323,8 @@ void mdc_link_pack(struct ptlrpc_request *req, int offset, rec->lk_fid2 = op_data->op_fid2; rec->lk_time = op_data->op_mod_time; - mdc_pack_capa(req, offset + 1, op_data->op_mod_capa1); - mdc_pack_capa(req, offset + 2, op_data->op_mod_capa2); + mdc_pack_capa(req, offset + 1, op_data->op_capa1); + mdc_pack_capa(req, offset + 2, op_data->op_capa2); tmp = lustre_msg_buf(req->rq_reqmsg, offset + 3, op_data->op_namelen + 1); LOGL0(op_data->op_name, op_data->op_namelen, tmp); @@ -351,8 +351,8 @@ void mdc_rename_pack(struct ptlrpc_request *req, int offset, rec->rn_time = op_data->op_mod_time; rec->rn_mode = op_data->op_mode; - mdc_pack_capa(req, offset + 1, op_data->op_mod_capa1); - mdc_pack_capa(req, offset + 2, op_data->op_mod_capa2); + mdc_pack_capa(req, offset + 1, op_data->op_capa1); + mdc_pack_capa(req, offset + 2, op_data->op_capa2); tmp = lustre_msg_buf(req->rq_reqmsg, offset + 3, oldlen + 1); LOGL0(old, oldlen, tmp); @@ -379,7 +379,7 @@ void mdc_getattr_pack(struct ptlrpc_request *req, int offset, __u64 valid, b->fid1 = op_data->op_fid1; b->fid2 = op_data->op_fid2; - mdc_pack_capa(req, offset + 1, op_data->op_mod_capa1); + mdc_pack_capa(req, offset + 1, op_data->op_capa1); if (op_data->op_name) { char *tmp; @@ -399,7 +399,7 @@ void mdc_close_pack(struct ptlrpc_request *req, int offset, rec = lustre_msg_buf(req->rq_reqmsg, offset + 1, sizeof(*rec)); mdc_setattr_pack_rec(rec, op_data); - mdc_pack_capa(req, offset + 2, op_data->op_mod_capa1); + mdc_pack_capa(req, offset + 2, op_data->op_capa1); mdc_epoch_pack(epoch, op_data); } diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 75c72e5..2b8d6e6 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -290,7 +290,7 @@ int mdc_enqueue(struct obd_export *exp, size[DLM_INTENT_REC_OFF] = sizeof(struct mdt_rec_create); /* parent capability */ - size[DLM_INTENT_REC_OFF + 1] = op_data->op_mod_capa1 ? + size[DLM_INTENT_REC_OFF + 1] = op_data->op_capa1 ? sizeof(struct lustre_capa) : 0; /* child capability, used for replay only */ size[DLM_INTENT_REC_OFF + 2] = sizeof(struct lustre_capa); @@ -349,7 +349,7 @@ int mdc_enqueue(struct obd_export *exp, repsize[repbufcnt++] = sizeof(struct lustre_capa); } else if (it->it_op & IT_UNLINK) { size[DLM_INTENT_REC_OFF] = sizeof(struct mdt_rec_unlink); - size[DLM_INTENT_REC_OFF + 1] = op_data->op_mod_capa1 ? + size[DLM_INTENT_REC_OFF + 1] = op_data->op_capa1 ? sizeof(struct lustre_capa) : 0; size[DLM_INTENT_REC_OFF + 2] = op_data->op_namelen + 1; policy.l_inodebits.bits = MDS_INODELOCK_UPDATE; @@ -374,7 +374,7 @@ int mdc_enqueue(struct obd_export *exp, valid |= client_is_remote(exp) ? OBD_MD_FLRMTPERM : OBD_MD_FLACL; size[DLM_INTENT_REC_OFF] = sizeof(struct mdt_body); - size[DLM_INTENT_REC_OFF + 1] = op_data->op_mod_capa1 ? + size[DLM_INTENT_REC_OFF + 1] = op_data->op_capa1 ? sizeof(struct lustre_capa) : 0; size[DLM_INTENT_REC_OFF + 2] = op_data->op_namelen + 1; diff --git a/lustre/mdc/mdc_reint.c b/lustre/mdc/mdc_reint.c index e8bda7d..99f5c0b 100644 --- a/lustre/mdc/mdc_reint.c +++ b/lustre/mdc/mdc_reint.c @@ -81,7 +81,7 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, LASSERT(op_data != NULL); - size[REQ_REC_OFF + 1] = op_data->op_mod_capa1 ? + size[REQ_REC_OFF + 1] = op_data->op_capa1 ? sizeof(struct lustre_capa) : 0; if (op_data->op_flags & (MF_SOM_CHANGE | MF_EPOCH_OPEN)) @@ -135,7 +135,7 @@ int mdc_create(struct obd_export *exp, struct md_op_data *op_data, struct ptlrpc_request *req; ENTRY; - size[REQ_REC_OFF + 1] = op_data->op_mod_capa1 ? + size[REQ_REC_OFF + 1] = op_data->op_capa1 ? sizeof(struct lustre_capa) : 0; if (data && datalen) { size[bufcount] = datalen; @@ -184,7 +184,7 @@ int mdc_unlink(struct obd_export *exp, struct md_op_data *op_data, LASSERT(req == NULL); - size[REQ_REC_OFF + 1] = op_data->op_mod_capa1 ? + size[REQ_REC_OFF + 1] = op_data->op_capa1 ? sizeof(struct lustre_capa) : 0; req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, @@ -217,9 +217,9 @@ int mdc_link(struct obd_export *exp, struct md_op_data *op_data, int rc; ENTRY; - size[REQ_REC_OFF + 1] = op_data->op_mod_capa1 ? + size[REQ_REC_OFF + 1] = op_data->op_capa1 ? sizeof(struct lustre_capa) : 0; - size[REQ_REC_OFF + 2] = op_data->op_mod_capa2 ? + size[REQ_REC_OFF + 2] = op_data->op_capa2 ? sizeof(struct lustre_capa) : 0; req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, @@ -252,9 +252,9 @@ int mdc_rename(struct obd_export *exp, struct md_op_data *op_data, int rc; ENTRY; - size[REQ_REC_OFF + 1] = op_data->op_mod_capa1 ? + size[REQ_REC_OFF + 1] = op_data->op_capa1 ? sizeof(struct lustre_capa) : 0; - size[REQ_REC_OFF + 2] = op_data->op_mod_capa2 ? + size[REQ_REC_OFF + 2] = op_data->op_capa2 ? sizeof(struct lustre_capa) : 0; req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index ab4f17c..49d956c 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -803,7 +803,7 @@ int mdc_close(struct obd_export *exp, struct md_op_data *op_data, int rc; ENTRY; - reqsize[REQ_REC_OFF + 2] = op_data->op_mod_capa1 ? + reqsize[REQ_REC_OFF + 2] = op_data->op_capa1 ? sizeof(struct lustre_capa) : 0; req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, MDS_CLOSE, 4, reqsize, NULL); @@ -892,7 +892,7 @@ int mdc_done_writing(struct obd_export *exp, struct md_op_data *op_data, int rc; ENTRY; - if (op_data->op_mod_capa1) + if (op_data->op_capa1) size[REQ_REC_OFF + 2] = sizeof(struct lustre_capa); req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, MDS_DONE_WRITING, 4, size, NULL); diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 0349736..c8e699f 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1881,6 +1881,9 @@ int filter_common_setup(struct obd_device *obd, struct lustre_cfg* lcfg, INIT_LIST_HEAD(&filter->fo_llog_list); spin_lock_init(&filter->fo_llog_list_lock); + filter->fo_fl_oss_capa = 0; + INIT_LIST_HEAD(&filter->fo_capa_keys); + sprintf(ns_name, "filter-%s", obd->obd_uuid.uuid); obd->obd_namespace = ldlm_namespace_new(ns_name, LDLM_NAMESPACE_SERVER); if (obd->obd_namespace == NULL) @@ -1934,9 +1937,6 @@ int filter_common_setup(struct obd_device *obd, struct lustre_cfg* lcfg, obd->obd_replayable ? "enabled" : "disabled"); } - filter->fo_fl_oss_capa = 0; - INIT_LIST_HEAD(&filter->fo_capa_keys); - RETURN(0); err_post: -- 1.8.3.1