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,
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,
/* 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);
__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);
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);
*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);
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);
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);
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);
* \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;
continue;
if (!obd_get_info(env, tgt->ltd_exp, keylen, key,
- vallen, val, NULL))
+ vallen, val))
RETURN(0);
}
RETURN(-EINVAL);
* 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);
* \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
* \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;
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;
}
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;
/* 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);
}
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;
}
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;
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);
}
!(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);
}
/* 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)
}
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;
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);
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)) {
* \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;
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;
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)
}
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);
* \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;
};
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);