Commit 5dc8d7b4 authored by Luca Ceresoli's avatar Luca Ceresoli Committed by Greg Kroah-Hartman

staging: lustre: lmv: declare internal symbols as static

Fixes sparse warnings like:
  warning: symbol '...' was not declared. Should it be static?
Signed-off-by: default avatarLuca Ceresoli <luca@lucaceresoli.net>
Cc: Peng Tao <bergwolf@gmail.com>
Cc: Jinshan Xiong <jinshan.xiong@intel.com>
Cc: Srikrishan Malik <srikrishanmalik@gmail.com>
Cc: HPDD-discuss@lists.01.org
Cc: devel@driverdev.osuosl.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f6219c16
...@@ -128,7 +128,7 @@ static int lmv_set_mdc_active(struct lmv_obd *lmv, struct obd_uuid *uuid, ...@@ -128,7 +128,7 @@ static int lmv_set_mdc_active(struct lmv_obd *lmv, struct obd_uuid *uuid,
return rc; return rc;
} }
struct obd_uuid *lmv_get_uuid(struct obd_export *exp) static struct obd_uuid *lmv_get_uuid(struct obd_export *exp)
{ {
struct lmv_obd *lmv = &exp->exp_obd->u.lmv; struct lmv_obd *lmv = &exp->exp_obd->u.lmv;
...@@ -335,7 +335,7 @@ static int lmv_init_ea_size(struct obd_export *exp, int easize, ...@@ -335,7 +335,7 @@ static int lmv_init_ea_size(struct obd_export *exp, int easize,
#define MAX_STRING_SIZE 128 #define MAX_STRING_SIZE 128
int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt) static int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
{ {
struct proc_dir_entry *lmv_proc_dir; struct proc_dir_entry *lmv_proc_dir;
struct lmv_obd *lmv = &obd->u.lmv; struct lmv_obd *lmv = &obd->u.lmv;
...@@ -1663,7 +1663,7 @@ struct lmv_tgt_desc ...@@ -1663,7 +1663,7 @@ struct lmv_tgt_desc
return tgt; return tgt;
} }
int lmv_create(struct obd_export *exp, struct md_op_data *op_data, static int lmv_create(struct obd_export *exp, struct md_op_data *op_data,
const void *data, int datalen, int mode, __u32 uid, const void *data, int datalen, int mode, __u32 uid,
__u32 gid, cfs_cap_t cap_effective, __u64 rdev, __u32 gid, cfs_cap_t cap_effective, __u64 rdev,
struct ptlrpc_request **request) struct ptlrpc_request **request)
...@@ -2387,7 +2387,7 @@ static int lmv_get_info(const struct lu_env *env, struct obd_export *exp, ...@@ -2387,7 +2387,7 @@ static int lmv_get_info(const struct lu_env *env, struct obd_export *exp,
return -EINVAL; return -EINVAL;
} }
int lmv_set_info_async(const struct lu_env *env, struct obd_export *exp, static int lmv_set_info_async(const struct lu_env *env, struct obd_export *exp,
u32 keylen, void *key, u32 vallen, u32 keylen, void *key, u32 vallen,
void *val, struct ptlrpc_request_set *set) void *val, struct ptlrpc_request_set *set)
{ {
...@@ -2425,7 +2425,7 @@ int lmv_set_info_async(const struct lu_env *env, struct obd_export *exp, ...@@ -2425,7 +2425,7 @@ int lmv_set_info_async(const struct lu_env *env, struct obd_export *exp,
return -EINVAL; return -EINVAL;
} }
int lmv_packmd(struct obd_export *exp, struct lov_mds_md **lmmp, static int lmv_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
struct lov_stripe_md *lsm) struct lov_stripe_md *lsm)
{ {
struct obd_device *obd = class_exp2obd(exp); struct obd_device *obd = class_exp2obd(exp);
...@@ -2473,7 +2473,7 @@ int lmv_packmd(struct obd_export *exp, struct lov_mds_md **lmmp, ...@@ -2473,7 +2473,7 @@ int lmv_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
return mea_size; return mea_size;
} }
int lmv_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp, static int lmv_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
struct lov_mds_md *lmm, int lmm_size) struct lov_mds_md *lmm, int lmm_size)
{ {
struct obd_device *obd = class_exp2obd(exp); struct obd_device *obd = class_exp2obd(exp);
...@@ -2551,7 +2551,7 @@ static int lmv_cancel_unused(struct obd_export *exp, const struct lu_fid *fid, ...@@ -2551,7 +2551,7 @@ static int lmv_cancel_unused(struct obd_export *exp, const struct lu_fid *fid,
return rc; return rc;
} }
int lmv_set_lock_data(struct obd_export *exp, __u64 *lockh, void *data, static int lmv_set_lock_data(struct obd_export *exp, __u64 *lockh, void *data,
__u64 *bits) __u64 *bits)
{ {
struct lmv_obd *lmv = &exp->exp_obd->u.lmv; struct lmv_obd *lmv = &exp->exp_obd->u.lmv;
...@@ -2561,7 +2561,7 @@ int lmv_set_lock_data(struct obd_export *exp, __u64 *lockh, void *data, ...@@ -2561,7 +2561,7 @@ int lmv_set_lock_data(struct obd_export *exp, __u64 *lockh, void *data,
return rc; return rc;
} }
ldlm_mode_t lmv_lock_match(struct obd_export *exp, __u64 flags, static ldlm_mode_t lmv_lock_match(struct obd_export *exp, __u64 flags,
const struct lu_fid *fid, ldlm_type_t type, const struct lu_fid *fid, ldlm_type_t type,
ldlm_policy_data_t *policy, ldlm_mode_t mode, ldlm_policy_data_t *policy, ldlm_mode_t mode,
struct lustre_handle *lockh) struct lustre_handle *lockh)
...@@ -2594,8 +2594,10 @@ ldlm_mode_t lmv_lock_match(struct obd_export *exp, __u64 flags, ...@@ -2594,8 +2594,10 @@ ldlm_mode_t lmv_lock_match(struct obd_export *exp, __u64 flags,
return 0; return 0;
} }
int lmv_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, static int lmv_get_lustre_md(struct obd_export *exp,
struct obd_export *dt_exp, struct obd_export *md_exp, struct ptlrpc_request *req,
struct obd_export *dt_exp,
struct obd_export *md_exp,
struct lustre_md *md) struct lustre_md *md)
{ {
struct lmv_obd *lmv = &exp->exp_obd->u.lmv; struct lmv_obd *lmv = &exp->exp_obd->u.lmv;
...@@ -2603,7 +2605,7 @@ int lmv_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, ...@@ -2603,7 +2605,7 @@ int lmv_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
return md_get_lustre_md(lmv->tgts[0]->ltd_exp, req, dt_exp, md_exp, md); return md_get_lustre_md(lmv->tgts[0]->ltd_exp, req, dt_exp, md_exp, md);
} }
int lmv_free_lustre_md(struct obd_export *exp, struct lustre_md *md) static int lmv_free_lustre_md(struct obd_export *exp, struct lustre_md *md)
{ {
struct obd_device *obd = exp->exp_obd; struct obd_device *obd = exp->exp_obd;
struct lmv_obd *lmv = &obd->u.lmv; struct lmv_obd *lmv = &obd->u.lmv;
...@@ -2613,7 +2615,7 @@ int lmv_free_lustre_md(struct obd_export *exp, struct lustre_md *md) ...@@ -2613,7 +2615,7 @@ int lmv_free_lustre_md(struct obd_export *exp, struct lustre_md *md)
return md_free_lustre_md(lmv->tgts[0]->ltd_exp, md); return md_free_lustre_md(lmv->tgts[0]->ltd_exp, md);
} }
int lmv_set_open_replay_data(struct obd_export *exp, static int lmv_set_open_replay_data(struct obd_export *exp,
struct obd_client_handle *och, struct obd_client_handle *och,
struct lookup_intent *it) struct lookup_intent *it)
{ {
...@@ -2628,7 +2630,7 @@ int lmv_set_open_replay_data(struct obd_export *exp, ...@@ -2628,7 +2630,7 @@ int lmv_set_open_replay_data(struct obd_export *exp,
return md_set_open_replay_data(tgt->ltd_exp, och, it); return md_set_open_replay_data(tgt->ltd_exp, och, it);
} }
int lmv_clear_open_replay_data(struct obd_export *exp, static int lmv_clear_open_replay_data(struct obd_export *exp,
struct obd_client_handle *och) struct obd_client_handle *och)
{ {
struct obd_device *obd = exp->exp_obd; struct obd_device *obd = exp->exp_obd;
...@@ -2684,15 +2686,16 @@ static int lmv_renew_capa(struct obd_export *exp, struct obd_capa *oc, ...@@ -2684,15 +2686,16 @@ static int lmv_renew_capa(struct obd_export *exp, struct obd_capa *oc,
return rc; return rc;
} }
int lmv_unpack_capa(struct obd_export *exp, struct ptlrpc_request *req, static int lmv_unpack_capa(struct obd_export *exp, struct ptlrpc_request *req,
const struct req_msg_field *field, struct obd_capa **oc) const struct req_msg_field *field,
struct obd_capa **oc)
{ {
struct lmv_obd *lmv = &exp->exp_obd->u.lmv; struct lmv_obd *lmv = &exp->exp_obd->u.lmv;
return md_unpack_capa(lmv->tgts[0]->ltd_exp, req, field, oc); return md_unpack_capa(lmv->tgts[0]->ltd_exp, req, field, oc);
} }
int lmv_intent_getattr_async(struct obd_export *exp, static int lmv_intent_getattr_async(struct obd_export *exp,
struct md_enqueue_info *minfo, struct md_enqueue_info *minfo,
struct ldlm_enqueue_info *einfo) struct ldlm_enqueue_info *einfo)
{ {
...@@ -2714,7 +2717,7 @@ int lmv_intent_getattr_async(struct obd_export *exp, ...@@ -2714,7 +2717,7 @@ int lmv_intent_getattr_async(struct obd_export *exp,
return rc; return rc;
} }
int lmv_revalidate_lock(struct obd_export *exp, struct lookup_intent *it, static int lmv_revalidate_lock(struct obd_export *exp, struct lookup_intent *it,
struct lu_fid *fid, __u64 *bits) struct lu_fid *fid, __u64 *bits)
{ {
struct obd_device *obd = exp->exp_obd; struct obd_device *obd = exp->exp_obd;
...@@ -2739,7 +2742,7 @@ int lmv_revalidate_lock(struct obd_export *exp, struct lookup_intent *it, ...@@ -2739,7 +2742,7 @@ int lmv_revalidate_lock(struct obd_export *exp, struct lookup_intent *it,
* process with other slave MDTs. The only exception is Q_GETOQUOTA for which * process with other slave MDTs. The only exception is Q_GETOQUOTA for which
* we directly fetch data from the slave MDTs. * we directly fetch data from the slave MDTs.
*/ */
int lmv_quotactl(struct obd_device *unused, struct obd_export *exp, static int lmv_quotactl(struct obd_device *unused, struct obd_export *exp,
struct obd_quotactl *oqctl) struct obd_quotactl *oqctl)
{ {
struct obd_device *obd = class_exp2obd(exp); struct obd_device *obd = class_exp2obd(exp);
...@@ -2786,7 +2789,7 @@ int lmv_quotactl(struct obd_device *unused, struct obd_export *exp, ...@@ -2786,7 +2789,7 @@ int lmv_quotactl(struct obd_device *unused, struct obd_export *exp,
return rc; return rc;
} }
int lmv_quotacheck(struct obd_device *unused, struct obd_export *exp, static int lmv_quotacheck(struct obd_device *unused, struct obd_export *exp,
struct obd_quotactl *oqctl) struct obd_quotactl *oqctl)
{ {
struct obd_device *obd = class_exp2obd(exp); struct obd_device *obd = class_exp2obd(exp);
...@@ -2810,7 +2813,7 @@ int lmv_quotacheck(struct obd_device *unused, struct obd_export *exp, ...@@ -2810,7 +2813,7 @@ int lmv_quotacheck(struct obd_device *unused, struct obd_export *exp,
return rc; return rc;
} }
struct obd_ops lmv_obd_ops = { static struct obd_ops lmv_obd_ops = {
.o_owner = THIS_MODULE, .o_owner = THIS_MODULE,
.o_setup = lmv_setup, .o_setup = lmv_setup,
.o_cleanup = lmv_cleanup, .o_cleanup = lmv_cleanup,
...@@ -2830,7 +2833,7 @@ struct obd_ops lmv_obd_ops = { ...@@ -2830,7 +2833,7 @@ struct obd_ops lmv_obd_ops = {
.o_quotactl = lmv_quotactl .o_quotactl = lmv_quotactl
}; };
struct md_ops lmv_md_ops = { static struct md_ops lmv_md_ops = {
.m_getstatus = lmv_getstatus, .m_getstatus = lmv_getstatus,
.m_null_inode = lmv_null_inode, .m_null_inode = lmv_null_inode,
.m_find_cbdata = lmv_find_cbdata, .m_find_cbdata = lmv_find_cbdata,
...@@ -2864,7 +2867,7 @@ struct md_ops lmv_md_ops = { ...@@ -2864,7 +2867,7 @@ struct md_ops lmv_md_ops = {
.m_revalidate_lock = lmv_revalidate_lock .m_revalidate_lock = lmv_revalidate_lock
}; };
int __init lmv_init(void) static int __init lmv_init(void)
{ {
struct lprocfs_static_vars lvars; struct lprocfs_static_vars lvars;
int rc; int rc;
......
...@@ -175,7 +175,7 @@ static int lmv_tgt_seq_show(struct seq_file *p, void *v) ...@@ -175,7 +175,7 @@ static int lmv_tgt_seq_show(struct seq_file *p, void *v)
tgt->ltd_uuid.uuid, tgt->ltd_active ? "" : "IN"); tgt->ltd_uuid.uuid, tgt->ltd_active ? "" : "IN");
} }
struct seq_operations lmv_tgt_sops = { static struct seq_operations lmv_tgt_sops = {
.start = lmv_tgt_seq_start, .start = lmv_tgt_seq_start,
.stop = lmv_tgt_seq_stop, .stop = lmv_tgt_seq_stop,
.next = lmv_tgt_seq_next, .next = lmv_tgt_seq_next,
...@@ -199,7 +199,7 @@ static int lmv_target_seq_open(struct inode *inode, struct file *file) ...@@ -199,7 +199,7 @@ static int lmv_target_seq_open(struct inode *inode, struct file *file)
LPROC_SEQ_FOPS_RO_TYPE(lmv, uuid); LPROC_SEQ_FOPS_RO_TYPE(lmv, uuid);
struct lprocfs_vars lprocfs_lmv_obd_vars[] = { static struct lprocfs_vars lprocfs_lmv_obd_vars[] = {
{ "numobd", &lmv_numobd_fops, NULL, 0 }, { "numobd", &lmv_numobd_fops, NULL, 0 },
{ "placement", &lmv_placement_fops, NULL, 0 }, { "placement", &lmv_placement_fops, NULL, 0 },
{ "activeobd", &lmv_activeobd_fops, NULL, 0 }, { "activeobd", &lmv_activeobd_fops, NULL, 0 },
......
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