mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
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: John L. Hammond <john.hammond@intel.com> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814 Reviewed-on: http://review.whamcloud.com/13426 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6ffa4ec96c
commit
7c6564d02a
11 changed files with 21 additions and 32 deletions
|
|
@ -845,8 +845,7 @@ struct obd_ops {
|
|||
int (*iocontrol)(unsigned int cmd, struct obd_export *exp, int len,
|
||||
void *karg, void __user *uarg);
|
||||
int (*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 (*set_info_async)(const struct lu_env *, struct obd_export *,
|
||||
__u32 keylen, void *key,
|
||||
__u32 vallen, void *val,
|
||||
|
|
|
|||
|
|
@ -415,16 +415,14 @@ static inline int class_devno_max(void)
|
|||
|
||||
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)
|
||||
void *key, __u32 *vallen, void *val)
|
||||
{
|
||||
int rc;
|
||||
|
||||
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);
|
||||
rc = OBP(exp->exp_obd, get_info)(env, exp, keylen, key, vallen, val);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1535,7 +1535,7 @@ out_quotactl:
|
|||
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);
|
||||
KEY_TGT_COUNT, &vallen, &count);
|
||||
if (rc) {
|
||||
CERROR("get target count failed: %d\n", rc);
|
||||
return rc;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp)
|
|||
__u16 stripes, def_stripes;
|
||||
|
||||
rc = obd_get_info(NULL, dt_exp, sizeof(KEY_LOVDESC), KEY_LOVDESC,
|
||||
&valsize, &desc, NULL);
|
||||
&valsize, &desc);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
|
|
|||
|
|
@ -285,7 +285,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);
|
||||
|
|
@ -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);
|
||||
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);
|
||||
|
||||
|
|
@ -587,7 +587,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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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] vallen size of \a val
|
||||
* \param[out] val pointer to storage location for value
|
||||
* \param[in] lsm optional striping metadata of object
|
||||
*
|
||||
* \retval 0 on success
|
||||
* \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;
|
||||
|
|
@ -2667,7 +2665,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;
|
||||
|
|
@ -2683,7 +2681,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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
__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;
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
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;
|
||||
|
||||
|
|
@ -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,
|
||||
__u32 keylen, void *key, __u32 *vallen, void *val,
|
||||
struct lov_stripe_md *lsm)
|
||||
__u32 keylen, void *key, __u32 *vallen, void *val)
|
||||
{
|
||||
int rc = -EINVAL;
|
||||
|
||||
|
|
|
|||
|
|
@ -887,8 +887,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)
|
||||
|
|
@ -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,
|
||||
__u32 keylen, void *key, __u32 *vallen, void *val,
|
||||
struct lov_stripe_md *unused)
|
||||
__u32 keylen, void *key, __u32 *vallen, void *val)
|
||||
{
|
||||
int rc = -EINVAL;
|
||||
|
||||
|
|
@ -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);
|
||||
|
||||
/* 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,
|
||||
cld, 0, NULL, &lockh);
|
||||
if (rcl == 0) {
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ int lustre_start_mgc(struct super_block *sb)
|
|||
|
||||
rc = obd_get_info(NULL, obd->obd_self_export,
|
||||
strlen(KEY_CONN_DATA), KEY_CONN_DATA,
|
||||
&vallen, data, NULL);
|
||||
&vallen, data);
|
||||
LASSERT(rc == 0);
|
||||
has_ir = OCD_HAS_FLAG(data, IMP_RECOV);
|
||||
if (has_ir ^ !(*flags & LMD_FLG_NOIR)) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
struct obdo *oa,
|
||||
struct lov_stripe_md *lsm, u32 page_count,
|
||||
struct obdo *oa, u32 page_count,
|
||||
struct brw_page **pga,
|
||||
struct ptlrpc_request **reqp,
|
||||
int reserve,
|
||||
|
|
@ -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) ==
|
||||
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, 0, 1);
|
||||
if (rc)
|
||||
|
|
@ -1902,8 +1900,7 @@ 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, 1, 0);
|
||||
rc = osc_brw_prep_request(cmd, cli, oa, page_count, pga, &req, 1, 0);
|
||||
if (rc != 0) {
|
||||
CERROR("prep_req failed: %d\n", rc);
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in a new issue