Commit d63414eb authored by Shraddha Barke's avatar Shraddha Barke Committed by Greg Kroah-Hartman

Staging: lustre: obdclass: obd_config: Declare as static

Declare class_add_conn, class_add_profile, class_cleanup,
class_config_parse_rec, class_del_conn, class_detach, class_match_param,
class_attach, class_setup as static since they are used only in this
particular file. Also remove the corresponding declarations from
header files.
Signed-off-by: default avatarShraddha Barke <shraddha.6596@gmail.com>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a90a2917
...@@ -56,7 +56,6 @@ struct cfg_interop_param { ...@@ -56,7 +56,6 @@ struct cfg_interop_param {
/* obd_config.c */ /* obd_config.c */
int class_find_param(char *buf, char *key, char **valp); int class_find_param(char *buf, char *key, char **valp);
int class_match_param(char *buf, char *key, char **valp);
int class_parse_nid(char *buf, lnet_nid_t *nid, char **endh); int class_parse_nid(char *buf, lnet_nid_t *nid, char **endh);
int class_parse_nid_quiet(char *buf, lnet_nid_t *nid, char **endh); int class_parse_nid_quiet(char *buf, lnet_nid_t *nid, char **endh);
/* obd_mount.c */ /* obd_mount.c */
......
...@@ -109,10 +109,6 @@ typedef int (*llog_cb_t)(const struct lu_env *, struct llog_handle *, ...@@ -109,10 +109,6 @@ typedef int (*llog_cb_t)(const struct lu_env *, struct llog_handle *,
int class_process_config(struct lustre_cfg *lcfg); int class_process_config(struct lustre_cfg *lcfg);
int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars,
struct lustre_cfg *lcfg, void *data); struct lustre_cfg *lcfg, void *data);
int class_attach(struct lustre_cfg *lcfg);
int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg);
int class_cleanup(struct obd_device *obd, struct lustre_cfg *lcfg);
int class_detach(struct obd_device *obd, struct lustre_cfg *lcfg);
struct obd_device *class_incref(struct obd_device *obd, struct obd_device *class_incref(struct obd_device *obd,
const char *scope, const void *source); const char *scope, const void *source);
void class_decref(struct obd_device *obd, void class_decref(struct obd_device *obd,
...@@ -121,7 +117,6 @@ void dump_exports(struct obd_device *obd, int locks); ...@@ -121,7 +117,6 @@ void dump_exports(struct obd_device *obd, int locks);
int class_config_llog_handler(const struct lu_env *env, int class_config_llog_handler(const struct lu_env *env,
struct llog_handle *handle, struct llog_handle *handle,
struct llog_rec_hdr *rec, void *data); struct llog_rec_hdr *rec, void *data);
int class_add_conn(struct obd_device *obd, struct lustre_cfg *lcfg);
int class_add_uuid(const char *uuid, __u64 nid); int class_add_uuid(const char *uuid, __u64 nid);
/*obdecho*/ /*obdecho*/
......
...@@ -71,7 +71,6 @@ int llog_cat_id2handle(const struct lu_env *env, struct llog_handle *cathandle, ...@@ -71,7 +71,6 @@ int llog_cat_id2handle(const struct lu_env *env, struct llog_handle *cathandle,
int class_config_dump_handler(const struct lu_env *env, int class_config_dump_handler(const struct lu_env *env,
struct llog_handle *handle, struct llog_handle *handle,
struct llog_rec_hdr *rec, void *data); struct llog_rec_hdr *rec, void *data);
int class_config_parse_rec(struct llog_rec_hdr *rec, char *buf, int size);
int llog_process_or_fork(const struct lu_env *env, int llog_process_or_fork(const struct lu_env *env,
struct llog_handle *loghandle, struct llog_handle *loghandle,
llog_cb_t cb, void *data, void *catdata, bool fork); llog_cb_t cb, void *data, void *catdata, bool fork);
......
...@@ -72,7 +72,7 @@ EXPORT_SYMBOL(class_find_param); ...@@ -72,7 +72,7 @@ EXPORT_SYMBOL(class_find_param);
/* returns 0 if this is the first key in the buffer, else 1. /* returns 0 if this is the first key in the buffer, else 1.
valp points to first char after key. */ valp points to first char after key. */
int class_match_param(char *buf, char *key, char **valp) static int class_match_param(char *buf, char *key, char **valp)
{ {
if (!buf) if (!buf)
return 1; return 1;
...@@ -85,7 +85,6 @@ int class_match_param(char *buf, char *key, char **valp) ...@@ -85,7 +85,6 @@ int class_match_param(char *buf, char *key, char **valp)
return 0; return 0;
} }
EXPORT_SYMBOL(class_match_param);
static int parse_nid(char *buf, void *value, int quiet) static int parse_nid(char *buf, void *value, int quiet)
{ {
...@@ -175,7 +174,7 @@ EXPORT_SYMBOL(class_parse_nid_quiet); ...@@ -175,7 +174,7 @@ EXPORT_SYMBOL(class_parse_nid_quiet);
* Create a new obd device and set the type, name and uuid. If successful, * Create a new obd device and set the type, name and uuid. If successful,
* the new device can be accessed by either name or uuid. * the new device can be accessed by either name or uuid.
*/ */
int class_attach(struct lustre_cfg *lcfg) static int class_attach(struct lustre_cfg *lcfg)
{ {
struct obd_device *obd = NULL; struct obd_device *obd = NULL;
char *typename, *name, *uuid; char *typename, *name, *uuid;
...@@ -278,12 +277,11 @@ int class_attach(struct lustre_cfg *lcfg) ...@@ -278,12 +277,11 @@ int class_attach(struct lustre_cfg *lcfg)
} }
return rc; return rc;
} }
EXPORT_SYMBOL(class_attach);
/** Create hashes, self-export, and call type-specific setup. /** Create hashes, self-export, and call type-specific setup.
* Setup is effectively the "start this obd" call. * Setup is effectively the "start this obd" call.
*/ */
int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg) static int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
{ {
int err = 0; int err = 0;
struct obd_export *exp; struct obd_export *exp;
...@@ -373,12 +371,11 @@ int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg) ...@@ -373,12 +371,11 @@ int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
CERROR("setup %s failed (%d)\n", obd->obd_name, err); CERROR("setup %s failed (%d)\n", obd->obd_name, err);
return err; return err;
} }
EXPORT_SYMBOL(class_setup);
/** We have finished using this obd and are ready to destroy it. /** We have finished using this obd and are ready to destroy it.
* There can be no more references to this obd. * There can be no more references to this obd.
*/ */
int class_detach(struct obd_device *obd, struct lustre_cfg *lcfg) static int class_detach(struct obd_device *obd, struct lustre_cfg *lcfg)
{ {
if (obd->obd_set_up) { if (obd->obd_set_up) {
CERROR("OBD device %d still set up\n", obd->obd_minor); CERROR("OBD device %d still set up\n", obd->obd_minor);
...@@ -400,13 +397,12 @@ int class_detach(struct obd_device *obd, struct lustre_cfg *lcfg) ...@@ -400,13 +397,12 @@ int class_detach(struct obd_device *obd, struct lustre_cfg *lcfg)
class_decref(obd, "attach", obd); class_decref(obd, "attach", obd);
return 0; return 0;
} }
EXPORT_SYMBOL(class_detach);
/** Start shutting down the obd. There may be in-progress ops when /** Start shutting down the obd. There may be in-progress ops when
* this is called. We tell them to start shutting down with a call * this is called. We tell them to start shutting down with a call
* to class_disconnect_exports(). * to class_disconnect_exports().
*/ */
int class_cleanup(struct obd_device *obd, struct lustre_cfg *lcfg) static int class_cleanup(struct obd_device *obd, struct lustre_cfg *lcfg)
{ {
int err = 0; int err = 0;
char *flag; char *flag;
...@@ -479,7 +475,6 @@ int class_cleanup(struct obd_device *obd, struct lustre_cfg *lcfg) ...@@ -479,7 +475,6 @@ int class_cleanup(struct obd_device *obd, struct lustre_cfg *lcfg)
return 0; return 0;
} }
EXPORT_SYMBOL(class_cleanup);
struct obd_device *class_incref(struct obd_device *obd, struct obd_device *class_incref(struct obd_device *obd,
const char *scope, const void *source) const char *scope, const void *source)
...@@ -543,7 +538,7 @@ EXPORT_SYMBOL(class_decref); ...@@ -543,7 +538,7 @@ EXPORT_SYMBOL(class_decref);
/** Add a failover nid location. /** Add a failover nid location.
* Client obd types contact server obd types using this nid list. * Client obd types contact server obd types using this nid list.
*/ */
int class_add_conn(struct obd_device *obd, struct lustre_cfg *lcfg) static int class_add_conn(struct obd_device *obd, struct lustre_cfg *lcfg)
{ {
struct obd_import *imp; struct obd_import *imp;
struct obd_uuid uuid; struct obd_uuid uuid;
...@@ -574,11 +569,10 @@ int class_add_conn(struct obd_device *obd, struct lustre_cfg *lcfg) ...@@ -574,11 +569,10 @@ int class_add_conn(struct obd_device *obd, struct lustre_cfg *lcfg)
return rc; return rc;
} }
EXPORT_SYMBOL(class_add_conn);
/** Remove a failover nid location. /** Remove a failover nid location.
*/ */
int class_del_conn(struct obd_device *obd, struct lustre_cfg *lcfg) static int class_del_conn(struct obd_device *obd, struct lustre_cfg *lcfg)
{ {
struct obd_import *imp; struct obd_import *imp;
struct obd_uuid uuid; struct obd_uuid uuid;
...@@ -626,8 +620,8 @@ EXPORT_SYMBOL(class_get_profile); ...@@ -626,8 +620,8 @@ EXPORT_SYMBOL(class_get_profile);
* This defines the mdc and osc names to use for a client. * This defines the mdc and osc names to use for a client.
* This also is used to define the lov to be used by a mdt. * This also is used to define the lov to be used by a mdt.
*/ */
int class_add_profile(int proflen, char *prof, int osclen, char *osc, static int class_add_profile(int proflen, char *prof, int osclen, char *osc,
int mdclen, char *mdc) int mdclen, char *mdc)
{ {
struct lustre_profile *lprof; struct lustre_profile *lprof;
int err = 0; int err = 0;
...@@ -1303,7 +1297,8 @@ EXPORT_SYMBOL(class_config_parse_llog); ...@@ -1303,7 +1297,8 @@ EXPORT_SYMBOL(class_config_parse_llog);
* This is separated from class_config_dump_handler() to use * This is separated from class_config_dump_handler() to use
* for ioctl needs as well * for ioctl needs as well
*/ */
int class_config_parse_rec(struct llog_rec_hdr *rec, char *buf, int size) static int class_config_parse_rec(struct llog_rec_hdr *rec, char *buf,
int size)
{ {
struct lustre_cfg *lcfg = (struct lustre_cfg *)(rec + 1); struct lustre_cfg *lcfg = (struct lustre_cfg *)(rec + 1);
char *ptr = buf; char *ptr = buf;
......
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