From: John L. Hammond Date: Thu, 26 Mar 2015 03:54:39 +0000 (-0700) Subject: LU-5814 obd: remove unused LSM parameters X-Git-Tag: 2.7.53~2 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=315f6e0237b676a7512a4d2fa5765ad57483676e;ds=sidebyside LU-5814 obd: remove unused LSM parameters Remove unused struct lov_stripe_md * parameters from obd_get_info(), mgc_enqueue(), and osc_brw_prep_request(). Signed-off-by: John L. Hammond Signed-off-by: Jinshan Xiong Change-Id: Iee0be72393c609967ee8dad06f878026ca09821d Reviewed-on: http://review.whamcloud.com/13426 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/include/obd.h b/lustre/include/obd.h index e485c6e..e1c4e73 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -907,9 +907,7 @@ struct obd_ops { int (*o_iocontrol)(unsigned int cmd, struct obd_export *exp, int len, void *karg, void __user *uarg); int (*o_get_info)(const struct lu_env *env, struct obd_export *, - __u32 keylen, void *key, - __u32 *vallen, void *val, - struct lov_stripe_md *lsm); + __u32 keylen, void *key, __u32 *vallen, void *val); int (*o_set_info_async)(const struct lu_env *, struct obd_export *, __u32 keylen, void *key, __u32 vallen, void *val, diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index 8121f80..46a6794 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -482,21 +482,18 @@ static inline int class_devno_max(void) return MAX_OBD_DEVICES; } -static inline int obd_get_info(const struct lu_env *env, - struct obd_export *exp, +static inline int obd_get_info(const struct lu_env *env, struct obd_export *exp, __u32 keylen, void *key, - __u32 *vallen, void *val, - struct lov_stripe_md *lsm) + __u32 *vallen, void *val) { - int rc; - ENTRY; + int rc; + ENTRY; - EXP_CHECK_DT_OP(exp, get_info); - EXP_COUNTER_INCREMENT(exp, get_info); + EXP_CHECK_DT_OP(exp, get_info); + EXP_COUNTER_INCREMENT(exp, get_info); - rc = OBP(exp->exp_obd, get_info)(env, exp, keylen, key, vallen, val, - lsm); - RETURN(rc); + rc = OBP(exp->exp_obd, get_info)(env, exp, keylen, key, vallen, val); + RETURN(rc); } static inline int obd_set_info_async(const struct lu_env *env, diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 6d41cdd..7c3a108 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -1592,8 +1592,8 @@ out_rmdir: /* get ost count when count is zero, get mdt count otherwise */ exp = count ? sbi->ll_md_exp : sbi->ll_dt_exp; vallen = sizeof(count); - rc = obd_get_info(NULL, exp, sizeof(KEY_TGT_COUNT), - KEY_TGT_COUNT, &vallen, &count, NULL); + rc = obd_get_info(NULL, exp, sizeof(KEY_TGT_COUNT), + KEY_TGT_COUNT, &vallen, &count); if (rc) { CERROR("get target count failed: %d\n", rc); RETURN(rc); diff --git a/lustre/llite/lcommon_misc.c b/lustre/llite/lcommon_misc.c index 05a670d..7b24d16 100644 --- a/lustre/llite/lcommon_misc.c +++ b/lustre/llite/lcommon_misc.c @@ -57,8 +57,8 @@ static int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp) __u16 stripes, def_stripes; ENTRY; - rc = obd_get_info(NULL, dt_exp, sizeof(KEY_LOVDESC), KEY_LOVDESC, - &valsize, &desc, NULL); + rc = obd_get_info(NULL, dt_exp, sizeof(KEY_LOVDESC), KEY_LOVDESC, + &valsize, &desc); if (rc) RETURN(rc); diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index eb56578..89a0de2 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -321,7 +321,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, size = sizeof(*data); err = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_CONN_DATA), - KEY_CONN_DATA, &size, data, NULL); + KEY_CONN_DATA, &size, data); if (err) { CERROR("%s: Get connect data failed: rc = %d\n", sbi->ll_md_exp->exp_obd->obd_name, err); @@ -635,7 +635,7 @@ int ll_get_max_mdsize(struct ll_sb_info *sbi, int *lmmsize) *lmmsize = obd_size_diskmd(sbi->ll_dt_exp, NULL); size = sizeof(int); rc = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_MAX_EASIZE), - KEY_MAX_EASIZE, &size, lmmsize, NULL); + KEY_MAX_EASIZE, &size, lmmsize); if (rc) CERROR("Get max mdsize error rc %d\n", rc); @@ -659,7 +659,7 @@ int ll_get_default_mdsize(struct ll_sb_info *sbi, int *lmmsize) size = sizeof(int); rc = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_DEFAULT_EASIZE), - KEY_DEFAULT_EASIZE, &size, lmmsize, NULL); + KEY_DEFAULT_EASIZE, &size, lmmsize); if (rc) CERROR("Get default mdsize error rc %d\n", rc); @@ -698,7 +698,7 @@ int ll_get_max_cookiesize(struct ll_sb_info *sbi, int *lmmsize) size = sizeof(int); rc = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_MAX_COOKIESIZE), - KEY_MAX_COOKIESIZE, &size, lmmsize, NULL); + KEY_MAX_COOKIESIZE, &size, lmmsize); if (rc) CERROR("Get max cookiesize error rc %d\n", rc); @@ -711,7 +711,7 @@ int ll_get_default_cookiesize(struct ll_sb_info *sbi, int *lmmsize) size = sizeof(int); rc = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_DEFAULT_COOKIESIZE), - KEY_DEFAULT_COOKIESIZE, &size, lmmsize, NULL); + KEY_DEFAULT_COOKIESIZE, &size, lmmsize); if (rc) CERROR("Get default cookiesize error rc %d\n", rc); diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index 344424b..ad304b6 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -2763,8 +2763,7 @@ static int lmv_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage) * \retval negative negated errno on failure */ static int lmv_get_info(const struct lu_env *env, struct obd_export *exp, - __u32 keylen, void *key, __u32 *vallen, void *val, - struct lov_stripe_md *lsm) + __u32 keylen, void *key, __u32 *vallen, void *val) { struct obd_device *obd; struct lmv_obd *lmv; @@ -2796,7 +2795,7 @@ static int lmv_get_info(const struct lu_env *env, struct obd_export *exp, continue; if (!obd_get_info(env, tgt->ltd_exp, keylen, key, - vallen, val, NULL)) + vallen, val)) RETURN(0); } RETURN(-EINVAL); @@ -2814,7 +2813,7 @@ static int lmv_get_info(const struct lu_env *env, struct obd_export *exp, * desc. */ rc = obd_get_info(env, lmv->tgts[0]->ltd_exp, keylen, key, - vallen, val, NULL); + vallen, val); if (!rc && KEY_IS(KEY_CONN_DATA)) exp->exp_connect_data = *(struct obd_connect_data *)val; RETURN(rc); diff --git a/lustre/lod/lod_dev.c b/lustre/lod/lod_dev.c index 1c1b6ce..900d41e 100644 --- a/lustre/lod/lod_dev.c +++ b/lustre/lod/lod_dev.c @@ -1075,7 +1075,6 @@ static struct lu_device_type lod_device_type = { * \param[in] key the key * \param[in] vallen not used * \param[in] val not used - * \param[in] lsm not used * * \retval 0 if a connection was seen * \retval -EAGAIN if LOD isn't running yet or no @@ -1083,8 +1082,7 @@ static struct lu_device_type lod_device_type = { * \retval -EINVAL if not supported key is requested **/ static int lod_obd_get_info(const struct lu_env *env, struct obd_export *exp, - __u32 keylen, void *key, __u32 *vallen, void *val, - struct lov_stripe_md *lsm) + __u32 keylen, void *key, __u32 *vallen, void *val) { int rc = -EINVAL; @@ -1105,7 +1103,7 @@ static int lod_obd_get_info(const struct lu_env *env, struct obd_export *exp, LASSERT(ost && ost->ltd_ost); rc = obd_get_info(env, ost->ltd_exp, keylen, key, - vallen, val, lsm); + vallen, val); /* one healthy device is enough */ if (rc == 0) break; diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index ddf0e18..c535557 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -1309,9 +1309,7 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len, } static int lov_get_info(const struct lu_env *env, struct obd_export *exp, - __u32 keylen, void *key, - __u32 *vallen, void *val, - struct lov_stripe_md *lsm) + __u32 keylen, void *key, __u32 *vallen, void *val) { struct obd_device *obddev = class_exp2obd(exp); struct lov_obd *lov = &obddev->u.lov; diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index fa1900e..c1d241f 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -1573,7 +1573,7 @@ static int mdc_ioc_fid2path(struct obd_export *exp, struct getinfo_fid2path *gf) /* Val is struct getinfo_fid2path result plus path */ vallen = sizeof(*gf) + gf->gf_pathlen; - rc = obd_get_info(NULL, exp, keylen, key, &vallen, gf, NULL); + rc = obd_get_info(NULL, exp, keylen, key, &vallen, gf); if (rc != 0 && rc != -EREMOTE) GOTO(out, rc); @@ -2553,9 +2553,7 @@ static int mdc_set_info_async(const struct lu_env *env, } static int mdc_get_info(const struct lu_env *env, struct obd_export *exp, - __u32 keylen, void *key, - __u32 *vallen, void *val, - struct lov_stripe_md *lsm) + __u32 keylen, void *key, __u32 *vallen, void *val) { int rc = -EINVAL; diff --git a/lustre/mdd/mdd_device.c b/lustre/mdd/mdd_device.c index 560329b..9c74601 100644 --- a/lustre/mdd/mdd_device.c +++ b/lustre/mdd/mdd_device.c @@ -1217,8 +1217,7 @@ static int mdd_obd_disconnect(struct obd_export *exp) } static int mdd_obd_get_info(const struct lu_env *env, struct obd_export *exp, - __u32 keylen, void *key, __u32 *vallen, void *val, - struct lov_stripe_md *lsm) + __u32 keylen, void *key, __u32 *vallen, void *val) { int rc = -EINVAL; @@ -1232,7 +1231,7 @@ static int mdd_obd_get_info(const struct lu_env *env, struct obd_export *exp, mdd = lu2mdd_dev(obd->obd_lu_dev); LASSERT(mdd); rc = obd_get_info(env, mdd->mdd_child_exp, keylen, key, vallen, - val, lsm); + val); RETURN(rc); } diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 40f4ca3..e5552a1 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -5021,7 +5021,7 @@ static int mdt_obd_connect(const struct lu_env *env, !(data->ocd_connect_flags & OBD_CONNECT_LIGHTWEIGHT)) { rc = obd_get_info(env, mdt->mdt_child_exp, sizeof(KEY_OSP_CONNECTED), - KEY_OSP_CONNECTED, NULL, NULL, NULL); + KEY_OSP_CONNECTED, NULL, NULL); if (rc) RETURN(-EAGAIN); set_bit(MDT_FL_SYNCED, &mdt->mdt_state); diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index 18da798..ef5d711 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -1067,8 +1067,8 @@ static int mgc_set_mgs_param(struct obd_export *exp, } /* Take a config lock so we can get cancel notifications */ -static int mgc_enqueue(struct obd_export *exp, struct lov_stripe_md *lsm, - __u32 type, ldlm_policy_data_t *policy, __u32 mode, +static int mgc_enqueue(struct obd_export *exp, __u32 type, + ldlm_policy_data_t *policy, __u32 mode, __u64 *flags, void *bl_cb, void *cp_cb, void *gl_cb, void *data, __u32 lvb_len, void *lvb_swabber, struct lustre_handle *lockh) @@ -1283,9 +1283,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp, } static int mgc_get_info(const struct lu_env *env, struct obd_export *exp, - __u32 keylen, void *key, - __u32 *vallen, void *val, - struct lov_stripe_md *unused) + __u32 keylen, void *key, __u32 *vallen, void *val) { int rc = -EINVAL; @@ -1882,10 +1880,10 @@ int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld) CDEBUG(D_MGC, "Process log %s:%p from %d\n", cld->cld_logname, cld->cld_cfg.cfg_instance, cld->cld_cfg.cfg_last_idx + 1); - /* Get the cfg lock on the llog */ - rcl = mgc_enqueue(mgc->u.cli.cl_mgc_mgsexp, NULL, LDLM_PLAIN, NULL, - LCK_CR, &flags, NULL, NULL, NULL, - cld, 0, NULL, &lockh); + /* Get the cfg lock on the llog */ + rcl = mgc_enqueue(mgc->u.cli.cl_mgc_mgsexp, LDLM_PLAIN, NULL, + LCK_CR, &flags, NULL, NULL, NULL, + cld, 0, NULL, &lockh); if (rcl == 0) { /* Get the cld, it will be released in mgc_blocking_ast. */ config_log_get(cld); diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index 6e2e116..bf07a87 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -295,9 +295,9 @@ int lustre_start_mgc(struct super_block *sb) int vallen = sizeof(*data); __u32 *flags = &lsi->lsi_lmd->lmd_flags; - rc = obd_get_info(NULL, obd->obd_self_export, - strlen(KEY_CONN_DATA), KEY_CONN_DATA, - &vallen, data, NULL); + rc = obd_get_info(NULL, obd->obd_self_export, + strlen(KEY_CONN_DATA), KEY_CONN_DATA, + &vallen, data); LASSERT(rc == 0); has_ir = OCD_HAS_FLAG(data, IMP_RECOV); if (has_ir ^ !(*flags & LMD_FLG_NOIR)) { diff --git a/lustre/ofd/ofd_obd.c b/lustre/ofd/ofd_obd.c index 5142680..2d98434 100644 --- a/lustre/ofd/ofd_obd.c +++ b/lustre/ofd/ofd_obd.c @@ -628,14 +628,12 @@ static int ofd_set_info_async(const struct lu_env *env, struct obd_export *exp, * \param[in] key key name * \param[out] vallen length of key value * \param[out] val the key value to return - * \param[in] lsm not used in OFD * * \retval 0 if successful * \retval negative value on error */ static int ofd_get_info(const struct lu_env *env, struct obd_export *exp, - __u32 keylen, void *key, __u32 *vallen, void *val, - struct lov_stripe_md *lsm) + __u32 keylen, void *key, __u32 *vallen, void *val) { struct ofd_thread_info *info; struct ofd_device *ofd; diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 2c31e0b..8234389 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1064,12 +1064,11 @@ static u32 osc_checksum_bulk(int nob, size_t pg_count, return cksum; } -static int osc_brw_prep_request(int cmd, struct client_obd *cli,struct obdo *oa, - struct lov_stripe_md *lsm, u32 page_count, - struct brw_page **pga, - struct ptlrpc_request **reqp, - struct obd_capa *ocapa, int reserve, - int resend) +static int +osc_brw_prep_request(int cmd, struct client_obd *cli, struct obdo *oa, + u32 page_count, struct brw_page **pga, + struct ptlrpc_request **reqp, struct obd_capa *ocapa, + int reserve, int resend) { struct ptlrpc_request *req; struct ptlrpc_bulk_desc *desc; @@ -1480,7 +1479,6 @@ static int osc_brw_redo_request(struct ptlrpc_request *request, rc = osc_brw_prep_request(lustre_msg_get_opc(request->rq_reqmsg) == OST_WRITE ? OBD_BRW_WRITE :OBD_BRW_READ, aa->aa_cli, aa->aa_oa, - NULL /* lsm unused by osc currently */, aa->aa_page_count, aa->aa_ppga, &new_req, aa->aa_ocapa, 0, 1); if (rc) @@ -1822,8 +1820,8 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli, } sort_brw_pages(pga, page_count); - rc = osc_brw_prep_request(cmd, cli, oa, NULL, page_count, - pga, &req, crattr->cra_capa, 1, 0); + rc = osc_brw_prep_request(cmd, cli, oa, page_count, pga, &req, + crattr->cra_capa, 1, 0); if (rc != 0) { CERROR("prep_req failed: %d\n", rc); GOTO(out, rc); diff --git a/lustre/osp/osp_dev.c b/lustre/osp/osp_dev.c index 63af058b..588032d 100644 --- a/lustre/osp/osp_dev.c +++ b/lustre/osp/osp_dev.c @@ -1602,14 +1602,12 @@ static int osp_iocontrol(unsigned int cmd, struct obd_export *exp, int len, * \param[in] key the key * \param[out] vallen length of \a val * \param[out] val holds the value returned by the key - * \param[in] unused necessary for the interface but unused * * \retval 0 0 if getting information succeeded. * \retval negative negative errno if getting information failed. */ static int osp_obd_get_info(const struct lu_env *env, struct obd_export *exp, - __u32 keylen, void *key, __u32 *vallen, void *val, - struct lov_stripe_md *unused) + __u32 keylen, void *key, __u32 *vallen, void *val) { int rc = -EINVAL; diff --git a/lustre/ptlrpc/nrs_orr.c b/lustre/ptlrpc/nrs_orr.c index 9b8ad5d..982fafa 100644 --- a/lustre/ptlrpc/nrs_orr.c +++ b/lustre/ptlrpc/nrs_orr.c @@ -247,7 +247,7 @@ static int nrs_orr_range_fill_physical(struct ptlrpc_nrs_request *nrq, }; rc = obd_get_info(req->rq_svc_thread->t_env, req->rq_export, - sizeof(key), &key, NULL, fiemap, NULL); + sizeof(key), &key, NULL, fiemap); if (rc < 0) GOTO(out, rc);