Commit 7c6564d0 authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman

staging: lustre: 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: default avatarJohn L. Hammond <john.hammond@intel.com>
Signed-off-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814
Reviewed-on: http://review.whamcloud.com/13426Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarLai Siyao <lai.siyao@intel.com>
Reviewed-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6ffa4ec9
...@@ -845,8 +845,7 @@ struct obd_ops { ...@@ -845,8 +845,7 @@ struct obd_ops {
int (*iocontrol)(unsigned int cmd, struct obd_export *exp, int len, int (*iocontrol)(unsigned int cmd, struct obd_export *exp, int len,
void *karg, void __user *uarg); void *karg, void __user *uarg);
int (*get_info)(const struct lu_env *env, struct obd_export *, int (*get_info)(const struct lu_env *env, struct obd_export *,
__u32 keylen, void *key, __u32 *vallen, void *val, __u32 keylen, void *key, __u32 *vallen, void *val);
struct lov_stripe_md *lsm);
int (*set_info_async)(const struct lu_env *, struct obd_export *, int (*set_info_async)(const struct lu_env *, struct obd_export *,
__u32 keylen, void *key, __u32 keylen, void *key,
__u32 vallen, void *val, __u32 vallen, void *val,
......
...@@ -415,16 +415,14 @@ static inline int class_devno_max(void) ...@@ -415,16 +415,14 @@ static inline int class_devno_max(void)
static inline int obd_get_info(const struct lu_env *env, static inline int obd_get_info(const struct lu_env *env,
struct obd_export *exp, __u32 keylen, struct obd_export *exp, __u32 keylen,
void *key, __u32 *vallen, void *val, void *key, __u32 *vallen, void *val)
struct lov_stripe_md *lsm)
{ {
int rc; int rc;
EXP_CHECK_DT_OP(exp, get_info); EXP_CHECK_DT_OP(exp, get_info);
EXP_COUNTER_INCREMENT(exp, get_info); EXP_COUNTER_INCREMENT(exp, get_info);
rc = OBP(exp->exp_obd, get_info)(env, exp, keylen, key, vallen, val, rc = OBP(exp->exp_obd, get_info)(env, exp, keylen, key, vallen, val);
lsm);
return rc; return rc;
} }
......
...@@ -1535,7 +1535,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -1535,7 +1535,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
exp = count ? sbi->ll_md_exp : sbi->ll_dt_exp; exp = count ? sbi->ll_md_exp : sbi->ll_dt_exp;
vallen = sizeof(count); vallen = sizeof(count);
rc = obd_get_info(NULL, exp, sizeof(KEY_TGT_COUNT), rc = obd_get_info(NULL, exp, sizeof(KEY_TGT_COUNT),
KEY_TGT_COUNT, &vallen, &count, NULL); KEY_TGT_COUNT, &vallen, &count);
if (rc) { if (rc) {
CERROR("get target count failed: %d\n", rc); CERROR("get target count failed: %d\n", rc);
return rc; return rc;
......
...@@ -54,7 +54,7 @@ int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp) ...@@ -54,7 +54,7 @@ int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp)
__u16 stripes, def_stripes; __u16 stripes, def_stripes;
rc = obd_get_info(NULL, dt_exp, sizeof(KEY_LOVDESC), KEY_LOVDESC, rc = obd_get_info(NULL, dt_exp, sizeof(KEY_LOVDESC), KEY_LOVDESC,
&valsize, &desc, NULL); &valsize, &desc);
if (rc) if (rc)
return rc; return rc;
......
...@@ -285,7 +285,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, ...@@ -285,7 +285,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
size = sizeof(*data); size = sizeof(*data);
err = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_CONN_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) { if (err) {
CERROR("%s: Get connect data failed: rc = %d\n", CERROR("%s: Get connect data failed: rc = %d\n",
sbi->ll_md_exp->exp_obd->obd_name, err); sbi->ll_md_exp->exp_obd->obd_name, err);
...@@ -563,7 +563,7 @@ int ll_get_max_mdsize(struct ll_sb_info *sbi, int *lmmsize) ...@@ -563,7 +563,7 @@ int ll_get_max_mdsize(struct ll_sb_info *sbi, int *lmmsize)
*lmmsize = obd_size_diskmd(sbi->ll_dt_exp, NULL); *lmmsize = obd_size_diskmd(sbi->ll_dt_exp, NULL);
size = sizeof(int); size = sizeof(int);
rc = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_MAX_EASIZE), 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) if (rc)
CERROR("Get max mdsize error rc %d\n", rc); CERROR("Get max mdsize error rc %d\n", rc);
...@@ -587,7 +587,7 @@ int ll_get_default_mdsize(struct ll_sb_info *sbi, int *lmmsize) ...@@ -587,7 +587,7 @@ int ll_get_default_mdsize(struct ll_sb_info *sbi, int *lmmsize)
size = sizeof(int); size = sizeof(int);
rc = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_DEFAULT_EASIZE), 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) if (rc)
CERROR("Get default mdsize error rc %d\n", rc); CERROR("Get default mdsize error rc %d\n", rc);
......
...@@ -2628,14 +2628,12 @@ static int lmv_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage) ...@@ -2628,14 +2628,12 @@ static int lmv_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
* \param[in] key identifier of key to get value for * \param[in] key identifier of key to get value for
* \param[in] vallen size of \a val * \param[in] vallen size of \a val
* \param[out] val pointer to storage location for value * \param[out] val pointer to storage location for value
* \param[in] lsm optional striping metadata of object
* *
* \retval 0 on success * \retval 0 on success
* \retval negative negated errno on failure * \retval negative negated errno on failure
*/ */
static int lmv_get_info(const struct lu_env *env, struct obd_export *exp, static int lmv_get_info(const struct lu_env *env, struct obd_export *exp,
__u32 keylen, void *key, __u32 *vallen, void *val, __u32 keylen, void *key, __u32 *vallen, void *val)
struct lov_stripe_md *lsm)
{ {
struct obd_device *obd; struct obd_device *obd;
struct lmv_obd *lmv; struct lmv_obd *lmv;
...@@ -2667,7 +2665,7 @@ static int lmv_get_info(const struct lu_env *env, struct obd_export *exp, ...@@ -2667,7 +2665,7 @@ static int lmv_get_info(const struct lu_env *env, struct obd_export *exp,
continue; continue;
if (!obd_get_info(env, tgt->ltd_exp, keylen, key, if (!obd_get_info(env, tgt->ltd_exp, keylen, key,
vallen, val, NULL)) vallen, val))
return 0; return 0;
} }
return -EINVAL; return -EINVAL;
...@@ -2683,7 +2681,7 @@ static int lmv_get_info(const struct lu_env *env, struct obd_export *exp, ...@@ -2683,7 +2681,7 @@ static int lmv_get_info(const struct lu_env *env, struct obd_export *exp,
* desc. * desc.
*/ */
rc = obd_get_info(env, lmv->tgts[0]->ltd_exp, keylen, key, rc = obd_get_info(env, lmv->tgts[0]->ltd_exp, keylen, key,
vallen, val, NULL); vallen, val);
if (!rc && KEY_IS(KEY_CONN_DATA)) if (!rc && KEY_IS(KEY_CONN_DATA))
exp->exp_connect_data = *(struct obd_connect_data *)val; exp->exp_connect_data = *(struct obd_connect_data *)val;
return rc; return rc;
......
...@@ -1310,8 +1310,7 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len, ...@@ -1310,8 +1310,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, static int lov_get_info(const struct lu_env *env, struct obd_export *exp,
__u32 keylen, void *key, __u32 *vallen, void *val, __u32 keylen, void *key, __u32 *vallen, void *val)
struct lov_stripe_md *lsm)
{ {
struct obd_device *obddev = class_exp2obd(exp); struct obd_device *obddev = class_exp2obd(exp);
struct lov_obd *lov = &obddev->u.lov; struct lov_obd *lov = &obddev->u.lov;
......
...@@ -1456,7 +1456,7 @@ static int mdc_ioc_fid2path(struct obd_export *exp, struct getinfo_fid2path *gf) ...@@ -1456,7 +1456,7 @@ static int mdc_ioc_fid2path(struct obd_export *exp, struct getinfo_fid2path *gf)
/* Val is struct getinfo_fid2path result plus path */ /* Val is struct getinfo_fid2path result plus path */
vallen = sizeof(*gf) + gf->gf_pathlen; 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) if (rc != 0 && rc != -EREMOTE)
goto out; goto out;
...@@ -2436,8 +2436,7 @@ static int mdc_set_info_async(const struct lu_env *env, ...@@ -2436,8 +2436,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, static int mdc_get_info(const struct lu_env *env, struct obd_export *exp,
__u32 keylen, void *key, __u32 *vallen, void *val, __u32 keylen, void *key, __u32 *vallen, void *val)
struct lov_stripe_md *lsm)
{ {
int rc = -EINVAL; int rc = -EINVAL;
......
...@@ -887,8 +887,8 @@ static int mgc_set_mgs_param(struct obd_export *exp, ...@@ -887,8 +887,8 @@ static int mgc_set_mgs_param(struct obd_export *exp,
} }
/* Take a config lock so we can get cancel notifications */ /* Take a config lock so we can get cancel notifications */
static int mgc_enqueue(struct obd_export *exp, struct lov_stripe_md *lsm, static int mgc_enqueue(struct obd_export *exp, __u32 type,
__u32 type, ldlm_policy_data_t *policy, __u32 mode, ldlm_policy_data_t *policy, __u32 mode,
__u64 *flags, void *bl_cb, void *cp_cb, void *gl_cb, __u64 *flags, void *bl_cb, void *cp_cb, void *gl_cb,
void *data, __u32 lvb_len, void *lvb_swabber, void *data, __u32 lvb_len, void *lvb_swabber,
struct lustre_handle *lockh) struct lustre_handle *lockh)
...@@ -1059,8 +1059,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp, ...@@ -1059,8 +1059,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, static int mgc_get_info(const struct lu_env *env, struct obd_export *exp,
__u32 keylen, void *key, __u32 *vallen, void *val, __u32 keylen, void *key, __u32 *vallen, void *val)
struct lov_stripe_md *unused)
{ {
int rc = -EINVAL; int rc = -EINVAL;
...@@ -1582,7 +1581,7 @@ int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld) ...@@ -1582,7 +1581,7 @@ int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld)
cld->cld_cfg.cfg_instance, cld->cld_cfg.cfg_last_idx + 1); cld->cld_cfg.cfg_instance, cld->cld_cfg.cfg_last_idx + 1);
/* Get the cfg lock on the llog */ /* Get the cfg lock on the llog */
rcl = mgc_enqueue(mgc->u.cli.cl_mgc_mgsexp, NULL, LDLM_PLAIN, NULL, rcl = mgc_enqueue(mgc->u.cli.cl_mgc_mgsexp, LDLM_PLAIN, NULL,
LCK_CR, &flags, NULL, NULL, NULL, LCK_CR, &flags, NULL, NULL, NULL,
cld, 0, NULL, &lockh); cld, 0, NULL, &lockh);
if (rcl == 0) { if (rcl == 0) {
......
...@@ -261,7 +261,7 @@ int lustre_start_mgc(struct super_block *sb) ...@@ -261,7 +261,7 @@ int lustre_start_mgc(struct super_block *sb)
rc = obd_get_info(NULL, obd->obd_self_export, rc = obd_get_info(NULL, obd->obd_self_export,
strlen(KEY_CONN_DATA), KEY_CONN_DATA, strlen(KEY_CONN_DATA), KEY_CONN_DATA,
&vallen, data, NULL); &vallen, data);
LASSERT(rc == 0); LASSERT(rc == 0);
has_ir = OCD_HAS_FLAG(data, IMP_RECOV); has_ir = OCD_HAS_FLAG(data, IMP_RECOV);
if (has_ir ^ !(*flags & LMD_FLG_NOIR)) { if (has_ir ^ !(*flags & LMD_FLG_NOIR)) {
......
...@@ -1139,8 +1139,7 @@ static u32 osc_checksum_bulk(int nob, u32 pg_count, ...@@ -1139,8 +1139,7 @@ static u32 osc_checksum_bulk(int nob, u32 pg_count,
} }
static int osc_brw_prep_request(int cmd, struct client_obd *cli, static int osc_brw_prep_request(int cmd, struct client_obd *cli,
struct obdo *oa, struct obdo *oa, u32 page_count,
struct lov_stripe_md *lsm, u32 page_count,
struct brw_page **pga, struct brw_page **pga,
struct ptlrpc_request **reqp, struct ptlrpc_request **reqp,
int reserve, int reserve,
...@@ -1557,7 +1556,6 @@ static int osc_brw_redo_request(struct ptlrpc_request *request, ...@@ -1557,7 +1556,6 @@ static int osc_brw_redo_request(struct ptlrpc_request *request,
rc = osc_brw_prep_request(lustre_msg_get_opc(request->rq_reqmsg) == rc = osc_brw_prep_request(lustre_msg_get_opc(request->rq_reqmsg) ==
OST_WRITE ? OBD_BRW_WRITE : OBD_BRW_READ, OST_WRITE ? OBD_BRW_WRITE : OBD_BRW_READ,
aa->aa_cli, aa->aa_oa, aa->aa_cli, aa->aa_oa,
NULL /* lsm unused by osc currently */,
aa->aa_page_count, aa->aa_ppga, aa->aa_page_count, aa->aa_ppga,
&new_req, 0, 1); &new_req, 0, 1);
if (rc) if (rc)
...@@ -1902,8 +1900,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli, ...@@ -1902,8 +1900,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli,
} }
sort_brw_pages(pga, page_count); sort_brw_pages(pga, page_count);
rc = osc_brw_prep_request(cmd, cli, oa, NULL, page_count, rc = osc_brw_prep_request(cmd, cli, oa, page_count, pga, &req, 1, 0);
pga, &req, 1, 0);
if (rc != 0) { if (rc != 0) {
CERROR("prep_req failed: %d\n", rc); CERROR("prep_req failed: %d\n", rc);
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment