* IT_OPEN is intended to open (and create, possible) an object. Parent (pid)
* may be split dir.
*/
-int lmv_intent_open(struct obd_export *exp, struct md_op_data *op_data,
- struct lookup_intent *it, struct ptlrpc_request **reqp,
- ldlm_blocking_callback cb_blocking, __u64 extra_lock_flags)
+static int lmv_intent_open(struct obd_export *exp, struct md_op_data *op_data,
+ struct lookup_intent *it,
+ struct ptlrpc_request **reqp,
+ ldlm_blocking_callback cb_blocking,
+ __u64 extra_lock_flags)
{
struct obd_device *obd = exp->exp_obd;
struct lmv_obd *lmv = &obd->u.lmv;
#include <lprocfs_status.h>
#include <obd_class.h>
+#include "lmv_internal.h"
+
#ifndef LPROCFS
static struct lprocfs_vars lprocfs_module_vars[] = { {0} };
static struct lprocfs_vars lprocfs_obd_vars[] = { {0} };
tgt->ltd_uuid.uuid, tgt->ltd_active ? "" : "IN");
}
-struct seq_operations lmv_tgt_sops = {
+static const struct seq_operations lmv_tgt_sops = {
.start = lmv_tgt_seq_start,
.stop = lmv_tgt_seq_stop,
.next = lmv_tgt_seq_next,
#include <obd_class.h>
#include <lprocfs_status.h>
+#include "mdc_internal.h"
+
#ifdef LPROCFS
static int mdc_max_rpcs_in_flight_seq_show(struct seq_file *m, void *v)
static int mdc_cleanup(struct obd_device *obd);
-int mdc_unpack_capa(struct obd_export *exp, struct ptlrpc_request *req,
- const struct req_msg_field *field, struct obd_capa **oc)
+static int mdc_unpack_capa(struct obd_export *exp, struct ptlrpc_request *req,
+ const struct req_msg_field *field,
+ struct obd_capa **oc)
{
struct lustre_capa *capa;
struct obd_capa *c;
}
/* This should be mdc_get_info("rootfid") */
-int mdc_getstatus(struct obd_export *exp, struct lu_fid *rootfid,
- struct obd_capa **pc)
+static int mdc_getstatus(struct obd_export *exp, struct lu_fid *rootfid,
+ struct obd_capa **pc)
{
return send_getstatus(class_exp2cliimp(exp), rootfid, pc,
LUSTRE_IMP_FULL, 0);
RETURN(0);
}
-int mdc_getattr(struct obd_export *exp, struct md_op_data *op_data,
- struct ptlrpc_request **request)
+static int mdc_getattr(struct obd_export *exp, struct md_op_data *op_data,
+ struct ptlrpc_request **request)
{
struct ptlrpc_request *req;
int rc;
RETURN(rc);
}
-int mdc_getattr_name(struct obd_export *exp, struct md_op_data *op_data,
- struct ptlrpc_request **request)
+static int mdc_getattr_name(struct obd_export *exp, struct md_op_data *op_data,
+ struct ptlrpc_request **request)
{
struct ptlrpc_request *req;
int rc;
RETURN(rc);
}
-int mdc_setxattr(struct obd_export *exp, const struct lu_fid *fid,
- struct obd_capa *oc, obd_valid valid, const char *xattr_name,
- const char *input, int input_size, int output_size,
- int flags, __u32 suppgid, struct ptlrpc_request **request)
+static int mdc_setxattr(struct obd_export *exp, const struct lu_fid *fid,
+ struct obd_capa *oc, obd_valid valid,
+ const char *xattr_name,
+ const char *input, int input_size, int output_size,
+ int flags, __u32 suppgid,
+ struct ptlrpc_request **request)
{
return mdc_xattr_common(exp, &RQF_MDS_REINT_SETXATTR,
fid, oc, MDS_REINT, valid, xattr_name,
suppgid, request);
}
-int mdc_getxattr(struct obd_export *exp, const struct lu_fid *fid,
- struct obd_capa *oc, obd_valid valid, const char *xattr_name,
- const char *input, int input_size, int output_size,
- int flags, struct ptlrpc_request **request)
+static int mdc_getxattr(struct obd_export *exp, const struct lu_fid *fid,
+ struct obd_capa *oc, obd_valid valid,
+ const char *xattr_name,
+ const char *input, int input_size, int output_size,
+ int flags, struct ptlrpc_request **request)
{
return mdc_xattr_common(exp, &RQF_MDS_GETXATTR,
fid, oc, MDS_GETXATTR, valid, xattr_name,
}
}
-int mdc_close(struct obd_export *exp, struct md_op_data *op_data,
- struct md_open_data *mod, struct ptlrpc_request **request)
+static int mdc_close(struct obd_export *exp, struct md_op_data *op_data,
+ struct md_open_data *mod, struct ptlrpc_request **request)
{
struct obd_device *obd = class_exp2obd(exp);
struct ptlrpc_request *req;
RETURN(rc < 0 ? rc : saved_rc);
}
-int mdc_done_writing(struct obd_export *exp, struct md_op_data *op_data,
- struct md_open_data *mod)
+static int mdc_done_writing(struct obd_export *exp, struct md_op_data *op_data,
+ struct md_open_data *mod)
{
struct obd_device *obd = class_exp2obd(exp);
struct ptlrpc_request *req;
return rc;
}
-int mdc_get_info_rpc(struct obd_export *exp,
- obd_count keylen, void *key,
- int vallen, void *val)
+static int mdc_get_info_rpc(struct obd_export *exp,
+ obd_count keylen, void *key,
+ int vallen, void *val)
{
struct obd_import *imp = class_exp2cliimp(exp);
struct ptlrpc_request *req;
(void *)imp);
}
-int mdc_set_info_async(const struct lu_env *env,
- struct obd_export *exp,
- obd_count keylen, void *key,
- obd_count vallen, void *val,
- struct ptlrpc_request_set *set)
+static int mdc_set_info_async(const struct lu_env *env,
+ struct obd_export *exp,
+ obd_count keylen, void *key,
+ obd_count vallen, void *val,
+ struct ptlrpc_request_set *set)
{
struct obd_import *imp = class_exp2cliimp(exp);
int rc;
RETURN(-EINVAL);
}
-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)
+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)
{
int rc = -EINVAL;
RETURN(rc);
}
-int mdc_fsync(struct obd_export *exp, const struct lu_fid *fid,
- struct obd_capa *oc, struct ptlrpc_request **request)
+static int mdc_fsync(struct obd_export *exp, const struct lu_fid *fid,
+ struct obd_capa *oc, struct ptlrpc_request **request)
{
struct ptlrpc_request *req;
int rc;
RETURN(seq_client_alloc_fid(env, seq, fid));
}
-struct obd_uuid *mdc_get_uuid(struct obd_export *exp) {
+static struct obd_uuid *mdc_get_uuid(struct obd_export *exp)
+{
struct client_obd *cli = &exp->exp_obd->u.cli;
return &cli->cl_target_uuid;
}
return 0;
}
-struct ldlm_valblock_ops inode_lvbo = {
+static struct ldlm_valblock_ops inode_lvbo = {
.lvbo_free = mdc_resource_inode_free
};
/* get remote permission for current user on fid */
-int mdc_get_remote_perm(struct obd_export *exp, const struct lu_fid *fid,
- struct obd_capa *oc, __u32 suppgid,
- struct ptlrpc_request **request)
+static int mdc_get_remote_perm(struct obd_export *exp, const struct lu_fid *fid,
+ struct obd_capa *oc, __u32 suppgid,
+ struct ptlrpc_request **request)
{
struct ptlrpc_request *req;
int rc;
RETURN(0);
}
-struct obd_ops mdc_obd_ops = {
+static struct obd_ops mdc_obd_ops = {
.o_owner = THIS_MODULE,
.o_setup = mdc_setup,
.o_precleanup = mdc_precleanup,
.o_quotacheck = mdc_quotacheck
};
-struct md_ops mdc_md_ops = {
+static struct md_ops mdc_md_ops = {
.m_getstatus = mdc_getstatus,
.m_null_inode = mdc_null_inode,
.m_find_cbdata = mdc_find_cbdata,
.m_revalidate_lock = mdc_revalidate_lock
};
-int __init mdc_init(void)
+static int __init mdc_init(void)
{
return class_register_type(&mdc_obd_ops, &mdc_md_ops, true, NULL,
LUSTRE_MDC_NAME, NULL);
}
EXPORT_SYMBOL(mgc_fsname2resid);
-int mgc_logname2resid(char *logname, struct ldlm_res_id *res_id, int type)
+static int mgc_logname2resid(char *logname, struct ldlm_res_id *res_id,
+ int type)
{
char *name_end;
int len;
RETURN(rc);
}
-int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
- obd_count keylen, void *key, obd_count vallen,
- void *val, struct ptlrpc_request_set *set)
+static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
+ obd_count keylen, void *key, obd_count vallen,
+ void *val, struct ptlrpc_request_set *set)
{
int rc = -EINVAL;
ENTRY;
RETURN(rc);
}
-struct obd_ops mgc_obd_ops = {
+static struct obd_ops mgc_obd_ops = {
.o_owner = THIS_MODULE,
.o_setup = mgc_setup,
.o_precleanup = mgc_precleanup,
.o_process_config = mgc_process_config,
};
-int __init mgc_init(void)
+static int __init mgc_init(void)
{
return class_register_type(&mgc_obd_ops, NULL, true, NULL,
LUSTRE_MGC_NAME, NULL);
return (*p)(env, cookie, LUSTRE_OST_NAME"-object@%p", o);
}
-struct lu_object_operations ofd_obj_ops = {
+static struct lu_object_operations ofd_obj_ops = {
.loo_object_init = ofd_object_init,
.loo_object_free = ofd_object_free,
.loo_object_print = ofd_object_print
* \retval 0 if successful
* \retval negative value on error
*/
-int ofd_set_info_hdl(struct tgt_session_info *tsi)
+static int ofd_set_info_hdl(struct tgt_session_info *tsi)
{
struct ptlrpc_request *req = tgt_ses_req(tsi);
struct ost_body *body = NULL, *repbody;
* \retval 0 if successful
* \retval negative value on error
*/
-int ofd_get_info_hdl(struct tgt_session_info *tsi)
+static int ofd_get_info_hdl(struct tgt_session_info *tsi)
{
struct obd_export *exp = tsi->tsi_exp;
struct ofd_device *ofd = ofd_exp(exp);
ofd_punch_hpreq_check(req);
}
-struct ptlrpc_hpreq_ops ofd_hpreq_rw = {
+static struct ptlrpc_hpreq_ops ofd_hpreq_rw = {
.hpreq_lock_match = ofd_rw_hpreq_lock_match,
.hpreq_check = ofd_rw_hpreq_check,
.hpreq_fini = ofd_rw_hpreq_fini
};
-struct ptlrpc_hpreq_ops ofd_hpreq_punch = {
+static struct ptlrpc_hpreq_ops ofd_hpreq_punch = {
.hpreq_lock_match = ofd_punch_hpreq_lock_match,
.hpreq_check = ofd_punch_hpreq_check,
.hpreq_fini = ofd_punch_hpreq_fini
* \retval 0 if successful
* \retval negative value on error
*/
-int __init ofd_init(void)
+static int __init ofd_init(void)
{
int rc;
* This function is called upon OFD module unloading.
* It frees all related structures and unregisters OFD device type.
*/
-void __exit ofd_exit(void)
+static void __exit ofd_exit(void)
{
ofd_fmd_exit();
lu_kmem_fini(ofd_caches);
* \retval 0 if successful
* \retval negative value on error
*/
-int ofd_obd_postrecov(struct obd_device *obd)
+static int ofd_obd_postrecov(struct obd_device *obd)
{
struct lu_env env;
struct lu_device *ldev = obd->obd_lu_dev;
* \retval 0 if successful
* \retval negative value on error
*/
-int ofd_echo_setattr(const struct lu_env *env, struct obd_export *exp,
- struct obd_info *oinfo, struct obd_trans_info *oti)
+static int ofd_echo_setattr(const struct lu_env *env, struct obd_export *exp,
+ struct obd_info *oinfo, struct obd_trans_info *oti)
{
struct ofd_thread_info *info;
struct ofd_device *ofd = ofd_exp(exp);
* \retval 0 if successful
* \retval negative value on error
*/
-int ofd_echo_destroy(const struct lu_env *env, struct obd_export *exp,
- struct obdo *oa, struct obd_trans_info *oti)
+static int ofd_echo_destroy(const struct lu_env *env, struct obd_export *exp,
+ struct obdo *oa, struct obd_trans_info *oti)
{
struct ofd_device *ofd = ofd_exp(exp);
struct lu_fid *fid = &oa->o_oi.oi_fid;
* \retval 0 if successful
* \retval negative value on error
*/
-int ofd_echo_create(const struct lu_env *env, struct obd_export *exp,
- struct obdo *oa, struct obd_trans_info *oti)
+static int ofd_echo_create(const struct lu_env *env, struct obd_export *exp,
+ struct obdo *oa, struct obd_trans_info *oti)
{
struct ofd_device *ofd = ofd_exp(exp);
struct ofd_thread_info *info;
* \retval 0 if successful
* \retval negative value on error
*/
-int ofd_echo_getattr(const struct lu_env *env, struct obd_export *exp,
- struct obd_info *oinfo)
+static int ofd_echo_getattr(const struct lu_env *env, struct obd_export *exp,
+ struct obd_info *oinfo)
{
struct ofd_device *ofd = ofd_exp(exp);
struct ofd_thread_info *info;
* \retval 0 if successful
* \retval negative value on error
*/
-int ofd_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
- void *karg, void *uarg)
+static int ofd_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
+ void *karg, void *uarg)
{
struct lu_env env;
struct ofd_device *ofd = ofd_exp(exp);
* \retval 0 if version matches
* \retval -EOVERFLOW on version mismatch
*/
-int ofd_version_get_check(struct ofd_thread_info *info,
- struct ofd_object *fo)
+static int ofd_version_get_check(struct ofd_thread_info *info,
+ struct ofd_object *fo)
{
dt_obj_version_t curr_version;
* Find or create an extent which includes @index, core function to manage
* extent tree.
*/
-struct osc_extent *osc_extent_find(const struct lu_env *env,
- struct osc_object *obj, pgoff_t index,
- int *grants)
+static struct osc_extent *osc_extent_find(const struct lu_env *env,
+ struct osc_object *obj, pgoff_t index,
+ int *grants)
+
{
struct client_obd *cli = osc_cli(obj);
struct osc_lock *olck;
}
}
-void osc_unreserve_grant(struct client_obd *cli,
- unsigned int reserved, unsigned int unused)
+static void osc_unreserve_grant(struct client_obd *cli,
+ unsigned int reserved, unsigned int unused)
{
spin_lock(&cli->cl_loi_list_lock);
__osc_unreserve_grant(cli, reserved, unused);
long target, bool force);
long osc_lru_reclaim(struct client_obd *cli);
+extern spinlock_t osc_ast_guard;
+extern struct lu_kmem_descr osc_caches[];
+extern struct lock_class_key osc_ast_guard_class;
+
unsigned long osc_ldlm_weigh_ast(struct ldlm_lock *dlmlock);
int osc_cleanup(struct obd_device *obd);
#include "osc_cl_internal.h"
-/** \addtogroup osc
- * @{
+/** \addtogroup osc
+ * @{
*/
/*****************************************************************************
return 0;
}
-int osc_attr_set(const struct lu_env *env, struct cl_object *obj,
- const struct cl_attr *attr, unsigned valid)
+static int osc_attr_set(const struct lu_env *env, struct cl_object *obj,
+ const struct cl_attr *attr, unsigned valid)
{
struct lov_oinfo *oinfo = cl2osc(obj)->oo_oinfo;
struct ost_lvb *lvb = &oinfo->loi_lvb;
EXIT;
}
-void osc_page_clip(const struct lu_env *env, const struct cl_page_slice *slice,
- int from, int to)
+static void osc_page_clip(const struct lu_env *env,
+ const struct cl_page_slice *slice,
+ int from, int to)
{
struct osc_page *opg = cl2osc_page(slice);
struct osc_async_page *oap = &opg->ops_oap;
return osc_process_config_base(obd, buf);
}
-struct obd_ops osc_obd_ops = {
+static struct obd_ops osc_obd_ops = {
.o_owner = THIS_MODULE,
.o_setup = osc_setup,
.o_precleanup = osc_precleanup,
.o_quotacheck = osc_quotacheck,
};
-extern struct lu_kmem_descr osc_caches[];
-extern struct lock_class_key osc_ast_guard_class;
-
-int __init osc_init(void)
+static int __init osc_init(void)
{
bool enable_proc = true;
struct obd_type *type;
return dchild;
}
-int osd_last_rcvd_subdir_count(struct osd_device *osd)
+static int osd_last_rcvd_subdir_count(struct osd_device *osd)
{
struct lr_server_data lsd;
struct dentry *dlast;
RETURN(rc);
}
-struct osd_obj_seq *osd_seq_find_locked(struct osd_obj_map *map, obd_seq seq)
+static struct osd_obj_seq *osd_seq_find_locked(struct osd_obj_map *map,
+ obd_seq seq)
{
struct osd_obj_seq *osd_seq;
return NULL;
}
-struct osd_obj_seq *osd_seq_find(struct osd_obj_map *map, obd_seq seq)
+static struct osd_obj_seq *osd_seq_find(struct osd_obj_map *map, obd_seq seq)
{
struct osd_obj_seq *osd_seq;
RETURN(rc);
}
-int osd_obj_add_entry(struct osd_thread_info *info,
- struct osd_device *osd,
- struct dentry *dir, char *name,
- const struct osd_inode_id *id,
- handle_t *th)
+static int osd_obj_add_entry(struct osd_thread_info *info,
+ struct osd_device *osd,
+ struct dentry *dir, char *name,
+ const struct osd_inode_id *id,
+ handle_t *th)
{
struct dentry *child;
struct inode *inode;
#include <obd_support.h>
#include "osd_dynlocks.h"
-
-extern struct kmem_cache *dynlock_cachep;
+#include "osd_internal.h"
#define DYNLOCK_HANDLE_MAGIC 0xd19a10c
#define DYNLOCK_HANDLE_DEAD 0xd1956ee
/*
* Concurrency: shouldn't matter.
*/
-int osd_trans_start(const struct lu_env *env, struct dt_device *d,
- struct thandle *th)
+static int osd_trans_start(const struct lu_env *env, struct dt_device *d,
+ struct thandle *th)
{
struct osd_thread_info *oti = osd_oti_get(env);
struct osd_device *dev = osd_dt_dev(d);
return rc;
}
-struct dentry *osd_child_dentry_get(const struct lu_env *env,
- struct osd_object *obj,
- const char *name, const int namelen)
+static struct dentry *osd_child_dentry_get(const struct lu_env *env,
+ struct osd_object *obj,
+ const char *name, const int namelen)
{
return osd_child_dentry_by_inode(env, obj->oo_inode, name, namelen);
}
* \ldiskfs_dentry_param is used only to pass fid from osd to ldiskfs.
* its inmemory API.
*/
-void osd_get_ldiskfs_dirent_param(struct ldiskfs_dentry_param *param,
- const struct lu_fid *fid)
+static void osd_get_ldiskfs_dirent_param(struct ldiskfs_dentry_param *param,
+ const struct lu_fid *fid)
{
if (!fid_is_namespace_visible(fid) ||
OBD_FAIL_CHECK(OBD_FAIL_FID_IGIF)) {
* \retval osd_object on success
* \retval -ve on error
*/
-struct osd_object *osd_object_find(const struct lu_env *env,
- struct dt_object *dt,
- const struct lu_fid *fid)
+static struct osd_object *osd_object_find(const struct lu_env *env,
+ struct dt_object *dt,
+ const struct lu_fid *fid)
{
struct lu_device *ludev = dt->do_lu.lo_dev;
struct osd_object *child = NULL;
RETURN(result);
}
-int osd_fid_alloc(const struct lu_env *env, struct obd_export *exp,
- struct lu_fid *fid, struct md_op_data *op_data)
+static int osd_fid_alloc(const struct lu_env *env, struct obd_export *exp,
+ struct lu_fid *fid, struct md_op_data *op_data)
{
struct osd_device *osd = osd_dev(exp->exp_obd->obd_lu_dev);
.ldto_device_fini = osd_device_fini
};
-struct lu_device_type osd_device_type = {
+static struct lu_device_type osd_device_type = {
.ldt_tags = LU_DEVICE_DT,
.ldt_name = LUSTRE_OSD_LDISKFS_NAME,
.ldt_ops = &osd_device_type_ops,
return iam_leaf_ops(leaf)->at_end(leaf);
}
-void iam_leaf_split(struct iam_leaf *l, struct buffer_head **bh, iam_ptr_t nr)
+static void iam_leaf_split(struct iam_leaf *l, struct buffer_head **bh,
+ iam_ptr_t nr)
{
iam_leaf_ops(l)->split(l, bh, nr);
}
return dynlock_lock(&ic->ic_tree_lock, value, lt, GFP_NOFS);
}
-int iam_index_lock(struct iam_path *path, struct dynlock_handle **lh)
+static int iam_index_lock(struct iam_path *path, struct dynlock_handle **lh)
{
struct iam_frame *f;
*
*/
-struct iam_entry *iam_find_position(struct iam_path *path,
- struct iam_frame *frame)
+static struct iam_entry *iam_find_position(struct iam_path *path,
+ struct iam_frame *frame)
{
int count;
struct iam_entry *p;
* Performs path lookup and returns with found leaf (if any) locked by htree
* lock.
*/
-int iam_lookup_lock(struct iam_path *path,
- struct dynlock_handle **dl, enum dynlock_type lt)
+static int iam_lookup_lock(struct iam_path *path,
+ struct dynlock_handle **dl, enum dynlock_type lt)
{
int result;
}
EXPORT_SYMBOL(iam_it_key_size);
-struct buffer_head *
+static struct buffer_head *
iam_new_node(handle_t *h, struct iam_container *c, iam_ptr_t *b, int *e)
{
struct inode *inode = c->ic_object;
return (base <= ptr) && (ptr < base + size);
}
-int iam_frame_invariant(struct iam_frame *f)
+static int iam_frame_invariant(struct iam_frame *f)
{
return
(f->bh != NULL &&
ptr_inside(f->bh->b_data, f->bh->b_size, f->at) &&
f->entries <= f->at);
}
-int iam_leaf_invariant(struct iam_leaf *l)
+
+static int iam_leaf_invariant(struct iam_leaf *l)
{
return
l->il_bh != NULL &&
l->il_entries <= l->il_at;
}
-int iam_path_invariant(struct iam_path *p)
+static int iam_path_invariant(struct iam_path *p)
{
int i;
return ile;
}
-struct iam_rec *iam_lfix_rec(const struct iam_leaf *l)
+static struct iam_rec *iam_lfix_rec(const struct iam_leaf *l)
{
void *e = l->il_at;
assert_corr(iam_leaf_at_rec(l));
l->il_entries = l->il_at = NULL;
}
-struct iam_rec *lvar_rec(const struct iam_leaf *l)
+static struct iam_rec *lvar_rec(const struct iam_leaf *l)
{
assert_corr(n_at_rec(l));
return e_rec(n_cur(l));
#include "osd_quota_fmt.h"
struct inode;
+extern struct kmem_cache *dynlock_cachep;
#define OSD_COUNTERS (0)
RETURN(0);
}
-struct page *osd_get_page(struct dt_object *dt, loff_t offset, int rw)
+static struct page *osd_get_page(struct dt_object *dt, loff_t offset, int rw)
{
struct inode *inode = osd_dt_obj(dt)->oo_inode;
struct osd_device *d = osd_obj2dev(osd_dt_obj(dt));
* i_data_sem
*/
-int osd_bufs_get(const struct lu_env *env, struct dt_object *d, loff_t pos,
- ssize_t len, struct niobuf_local *lnb, int rw,
- struct lustre_capa *capa)
+static int osd_bufs_get(const struct lu_env *env, struct dt_object *d,
+ loff_t pos, ssize_t len, struct niobuf_local *lnb,
+ int rw, struct lustre_capa *capa)
{
struct osd_object *obj = osd_dt_obj(d);
int npages, i, rc = 0;
return err;
}
-int osd_ldiskfs_map_nblocks(struct inode *inode, unsigned long block,
- unsigned long num, unsigned long *blocks,
- int create)
+static int osd_ldiskfs_map_nblocks(struct inode *inode, unsigned long block,
+ unsigned long num, unsigned long *blocks,
+ int create)
{
struct bpointers bp;
int err;
return err;
}
-int osd_ldiskfs_map_bm_inode_pages(struct inode *inode, struct page **page,
- int pages, unsigned long *blocks,
- int create)
+static int osd_ldiskfs_map_bm_inode_pages(struct inode *inode,
+ struct page **page, int pages,
+ unsigned long *blocks, int create)
{
int blocks_per_page = PAGE_CACHE_SIZE >> inode->i_blkbits;
unsigned long *b;
return rc;
}
-int osd_ldiskfs_map_ext_inode_pages(struct inode *inode, struct page **page,
- int pages, unsigned long *blocks,
- int create)
+static int osd_ldiskfs_map_ext_inode_pages(struct inode *inode,
+ struct page **page,
+ int pages, unsigned long *blocks,
+ int create)
{
int blocks_per_page = PAGE_CACHE_SIZE >> inode->i_blkbits;
int rc = 0, i = 0;
}
LPROC_SEQ_FOPS_RO(ldiskfs_osd_oi_scrub);
-int ldiskfs_osd_readcache_seq_show(struct seq_file *m, void *data)
+static int ldiskfs_osd_readcache_seq_show(struct seq_file *m, void *data)
{
struct osd_device *osd = osd_dt_dev((struct dt_device *)m->private);
return seq_printf(m, LPU64"\n", osd->od_readcache_max_filesize);
}
-ssize_t
+static ssize_t
ldiskfs_osd_readcache_seq_write(struct file *file, const char *buffer,
size_t count, loff_t *off)
{
RETURN(rc);
}
-const struct dt_index_operations osd_admin_index_ops = {
+static const struct dt_index_operations osd_admin_index_ops = {
.dio_lookup = osd_acct_index_lookup,
.dio_it = {
.init = osd_it_acct_init,
#include <obd_class.h>
#include <lustre_param.h>
#include <lustre_log.h>
-#include <libcfs/libcfs_string.h>
+
+#include "osp_internal.h"
struct lwp_device {
struct lu_device lpd_dev;
RETURN(rc);
}
-const struct lu_device_operations lwp_lu_ops = {
+static const struct lu_device_operations lwp_lu_ops = {
.ldo_process_config = lwp_process_config,
};
* \retval -ENODEV if the device name cannot be found
* \retval negative numbers on other errors
*/
-int lwp_init0(const struct lu_env *env, struct lwp_device *lwp,
- struct lu_device_type *ldt, struct lustre_cfg *cfg)
+static int lwp_init0(const struct lu_env *env, struct lwp_device *lwp,
+ struct lu_device_type *ldt, struct lustre_cfg *cfg)
{
int rc;
ENTRY;
* \retval object object being created if the creation succeed.
* \retval NULL NULL if the creation failed.
*/
-struct lu_object *osp_object_alloc(const struct lu_env *env,
- const struct lu_object_header *hdr,
- struct lu_device *d)
+static struct lu_object *osp_object_alloc(const struct lu_env *env,
+ const struct lu_object_header *hdr,
+ struct lu_device *d)
{
struct lu_object_header *h = NULL;
struct osp_object *o;
* requested from seq meta server
* \retval negative negative errno if FID allocation failed.
*/
-int osp_fid_alloc(const struct lu_env *env, struct obd_export *exp,
- struct lu_fid *fid, struct md_op_data *unused)
+static int osp_fid_alloc(const struct lu_env *env, struct obd_export *exp,
+ struct lu_fid *fid, struct md_op_data *unused)
{
struct client_obd *cli = &exp->exp_obd->u.cli;
struct osp_device *osp = lu2osp_dev(exp->exp_obd->obd_lu_dev);
* \retval 1 if it reaches to the end of the index object.
* \retval negative errno if the pointer cannot be advanced.
*/
-int osp_md_index_it_next(const struct lu_env *env, struct dt_it *di)
+static int osp_md_index_it_next(const struct lu_env *env, struct dt_it *di)
{
struct osp_it *it = (struct osp_it *)di;
struct lu_idxpage *idxpage;
* \retval 0 for success
* \retval negative error number on failure
*/
-int osp_orphan_it_next(const struct lu_env *env, struct dt_it *di)
+static int osp_orphan_it_next(const struct lu_env *env, struct dt_it *di)
{
struct osp_it *it = (struct osp_it *)di;
struct lu_idxpage *idxpage;
{
}
-struct dt_key *osp_orphan_it_key(const struct lu_env *env,
- const struct dt_it *di)
+static struct dt_key *osp_orphan_it_key(const struct lu_env *env,
+ const struct dt_it *di)
{
struct osp_it *it = (struct osp_it *)di;
struct lu_orphan_ent *ent = (struct lu_orphan_ent *)it->ooi_ent;
return NULL;
}
-int osp_orphan_it_key_size(const struct lu_env *env, const struct dt_it *di)
+static int osp_orphan_it_key_size(const struct lu_env *env,
+ const struct dt_it *di)
{
return sizeof(struct lu_fid);
}
-int osp_orphan_it_rec(const struct lu_env *env, const struct dt_it *di,
- struct dt_rec *rec, __u32 attr)
+static int osp_orphan_it_rec(const struct lu_env *env, const struct dt_it *di,
+ struct dt_rec *rec, __u32 attr)
{
struct osp_it *it = (struct osp_it *)di;
struct lu_orphan_ent *ent = (struct lu_orphan_ent *)it->ooi_ent;
return 0;
}
-struct dt_object_operations osp_obj_ops = {
+static struct dt_object_operations osp_obj_ops = {
.do_declare_attr_get = osp_declare_attr_get,
.do_attr_get = osp_attr_get,
.do_declare_attr_set = osp_declare_attr_set,
* \retval 0 on success
* \retval negative negated errno on error
*/
-int osp_precreate_rollover_new_seq(struct lu_env *env, struct osp_device *osp)
+static int osp_precreate_rollover_new_seq(struct lu_env *env,
+ struct osp_device *osp)
{
struct lu_fid *fid = &osp_env_info(env)->osi_fid;
struct lu_fid *last_fid = &osp->opd_last_used_fid;
}
int osp_sync_gap(const struct lu_env *env, struct osp_device *d,
- struct lu_fid *fid, int lost, struct thandle *th)
+ struct lu_fid *fid, int lost, struct thandle *th)
{
return osp_sync_add_rec(env, d, fid, MDS_UNLINK64_REC, lost, th, NULL);
}