RETURN(0);
}
-extern struct lu_object_operations lod_lu_obj_ops;
-extern struct dt_object_operations lod_obj_ops;
-
/* Slab for OSD object allocation */
struct kmem_cache *lod_object_kmem;
*
* see include/lu_object.h for the details.
*/
-struct lu_object *lod_object_alloc(const struct lu_env *env,
- const struct lu_object_header *hdr,
- struct lu_device *dev)
+static struct lu_object *lod_object_alloc(const struct lu_env *env,
+ const struct lu_object_header *hdr,
+ struct lu_device *dev)
{
struct lod_object *lod_obj;
struct lu_object *lu_obj;
cfs_foreach_bit((__dev)->lod_ost_bitmap, (index))
/* lod_dev.c */
+extern struct kmem_cache *lod_object_kmem;
int lod_fld_lookup(const struct lu_env *env, struct lod_device *lod,
const struct lu_fid *fid, __u32 *tgt, int *flags);
/* lod_lov.c */
void lod_procfs_fini(struct lod_device *lod);
/* lod_object.c */
+extern struct dt_object_operations lod_obj_ops;
+extern struct lu_object_operations lod_lu_obj_ops;
int lod_load_lmv_shards(const struct lu_env *env, struct lod_object *lo,
struct lu_buf *buf, bool resize);
int lod_object_set_pool(struct lod_object *o, char *pool);
static const char dot[] = ".";
static const char dotdot[] = "..";
-extern struct kmem_cache *lod_object_kmem;
static const struct dt_body_operations lod_body_lnk_ops;
/**
*
* \see dt_index_operations::dio_it.fini() in the API description for details.
*/
-void lod_it_fini(const struct lu_env *env, struct dt_it *di)
+static void lod_it_fini(const struct lu_env *env, struct dt_it *di)
{
struct lod_it *it = (struct lod_it *)di;
*
* \see dt_it_ops::get() in the API description for details.
*/
-int lod_it_get(const struct lu_env *env, struct dt_it *di,
- const struct dt_key *key)
+static int lod_it_get(const struct lu_env *env, struct dt_it *di,
+ const struct dt_key *key)
{
const struct lod_it *it = (const struct lod_it *)di;
*
* \see dt_it_ops::put() in the API description for details.
*/
-void lod_it_put(const struct lu_env *env, struct dt_it *di)
+static void lod_it_put(const struct lu_env *env, struct dt_it *di)
{
struct lod_it *it = (struct lod_it *)di;
*
* \see dt_it_ops::next() in the API description for details.
*/
-int lod_it_next(const struct lu_env *env, struct dt_it *di)
+static int lod_it_next(const struct lu_env *env, struct dt_it *di)
{
struct lod_it *it = (struct lod_it *)di;
*
* \see dt_it_ops::key() in the API description for details.
*/
-struct dt_key *lod_it_key(const struct lu_env *env, const struct dt_it *di)
+static struct dt_key *lod_it_key(const struct lu_env *env,
+ const struct dt_it *di)
{
const struct lod_it *it = (const struct lod_it *)di;
*
* \see dt_it_ops::key_size() in the API description for details.
*/
-int lod_it_key_size(const struct lu_env *env, const struct dt_it *di)
+static int lod_it_key_size(const struct lu_env *env, const struct dt_it *di)
{
struct lod_it *it = (struct lod_it *)di;
*
* \see dt_it_ops::rec() in the API description for details.
*/
-int lod_it_rec(const struct lu_env *env, const struct dt_it *di,
- struct dt_rec *rec, __u32 attr)
+static int lod_it_rec(const struct lu_env *env, const struct dt_it *di,
+ struct dt_rec *rec, __u32 attr)
{
const struct lod_it *it = (const struct lod_it *)di;
*
* \see dt_it_ops::rec_size() in the API description for details.
*/
-int lod_it_rec_size(const struct lu_env *env, const struct dt_it *di,
- __u32 attr)
+static int lod_it_rec_size(const struct lu_env *env, const struct dt_it *di,
+ __u32 attr)
{
const struct lod_it *it = (const struct lod_it *)di;
*
* \see dt_it_ops::store() in the API description for details.
*/
-__u64 lod_it_store(const struct lu_env *env, const struct dt_it *di)
+static __u64 lod_it_store(const struct lu_env *env, const struct dt_it *di)
{
const struct lod_it *it = (const struct lod_it *)di;
*
* \see dt_it_ops::load() in the API description for details.
*/
-int lod_it_load(const struct lu_env *env, const struct dt_it *di, __u64 hash)
+static int lod_it_load(const struct lu_env *env, const struct dt_it *di,
+ __u64 hash)
{
const struct lod_it *it = (const struct lod_it *)di;
*
* \see dt_it_ops::rec() in the API description for details.
*/
-int lod_it_key_rec(const struct lu_env *env, const struct dt_it *di,
- void *key_rec)
+static int lod_it_key_rec(const struct lu_env *env, const struct dt_it *di,
+ void *key_rec)
{
const struct lod_it *it = (const struct lod_it *)di;
* \retval 0 on success
* \retval negative if failed
*/
-int lod_prep_lmv_md(const struct lu_env *env, struct dt_object *dt,
- struct lu_buf *lmv_buf)
+static int lod_prep_lmv_md(const struct lu_env *env, struct dt_object *dt,
+ struct lu_buf *lmv_buf)
{
struct lod_thread_info *info = lod_env_info(env);
struct lod_device *lod = lu2lod_dev(dt->do_lu.lo_dev);
* \retval 0 on success
* \retval negative if failed
*/
-int lod_dir_striping_create_internal(const struct lu_env *env,
- struct dt_object *dt,
- struct lu_attr *attr,
- struct dt_object_format *dof,
- struct thandle *th,
- bool declare)
+static int lod_dir_striping_create_internal(const struct lu_env *env,
+ struct dt_object *dt,
+ struct lu_attr *attr,
+ struct dt_object_format *dof,
+ struct thandle *th,
+ bool declare)
{
struct lod_thread_info *info = lod_env_info(env);
struct lod_object *lo = lod_dt_obj(dt);
EXIT;
}
-int mdt_attr_get_eabuf_size(struct mdt_thread_info *info, struct mdt_object *o)
+static int mdt_attr_get_eabuf_size(struct mdt_thread_info *info,
+ struct mdt_object *o)
{
const struct lu_env *env = info->mti_env;
int rc, rc2;
/* mdt_getxattr() is used from mdt_intent_getxattr(), use this wrapper
* for now. This will be removed along with converting rest of MDT code
* to use tgt_session_info */
-int mdt_tgt_getxattr(struct tgt_session_info *tsi)
+static int mdt_tgt_getxattr(struct tgt_session_info *tsi)
{
struct mdt_thread_info *info = tsi2mdt_info(tsi);
int rc;
int mdt_pack_remote_perm(struct mdt_thread_info *, struct mdt_object *, void *);
+/* mdt/mdt_recovery.c */
+void mdt_req_from_lcd(struct ptlrpc_request *req, struct lsd_client_data *lcd);
+
/* mdt/mdt_hsm.c */
int mdt_hsm_state_get(struct tgt_session_info *tsi);
int mdt_hsm_state_set(struct tgt_session_info *tsi);
{ 0 }
};
-int lprocfs_mdt_print_open_files(cfs_hash_t *hs, cfs_hash_bd_t *bd,
- struct hlist_node *hnode, void *v)
+static int lprocfs_mdt_print_open_files(cfs_hash_t *hs, cfs_hash_bd_t *bd,
+ struct hlist_node *hnode, void *v)
{
struct obd_export *exp = cfs_hash_object(hs, hnode);
struct seq_file *seq = v;
return 0;
}
-int lprocfs_mdt_open_files_seq_show(struct seq_file *seq, void *v)
+static int lprocfs_mdt_open_files_seq_show(struct seq_file *seq, void *v)
{
struct nid_stat *stats = seq->private;
struct obd_device *obd = stats->nid_obd;
* Apply obtained attributes for the 1st case, wipe out the on-disk SOM
* cache otherwise.
*/
-int mdt_som_au_close(struct mdt_thread_info *info, struct mdt_object *o)
+static int mdt_som_au_close(struct mdt_thread_info *info, struct mdt_object *o)
{
struct ptlrpc_request *req = mdt_info_req(info);
__u64 ioepoch = 0;
/**
* prep ma_lmm/ma_lmv for md_attr from reply
*/
-void mdt_prep_ma_buf_from_rep(struct mdt_thread_info *info,
- struct mdt_object *obj,
- struct md_attr *ma)
+static void mdt_prep_ma_buf_from_rep(struct mdt_thread_info *info,
+ struct mdt_object *obj,
+ struct md_attr *ma)
{
LASSERT(ma->ma_lmv == NULL && ma->ma_lmm == NULL);
if (S_ISDIR(obj->mot_header.loh_attr)) {
return rc;
}
-int mdt_finish_open(struct mdt_thread_info *info,
- struct mdt_object *p, struct mdt_object *o,
- __u64 flags, int created, struct ldlm_reply *rep)
+static int mdt_finish_open(struct mdt_thread_info *info,
+ struct mdt_object *p, struct mdt_object *o,
+ __u64 flags, int created, struct ldlm_reply *rep)
{
struct ptlrpc_request *req = mdt_info_req(info);
struct obd_export *exp = req->rq_export;
RETURN(rc);
}
-extern void mdt_req_from_lcd(struct ptlrpc_request *req,
- struct lsd_client_data *lcd);
-
void mdt_reconstruct_open(struct mdt_thread_info *info,
struct mdt_lock_handle *lhc)
{
LASSERT(ergo(rc < 0, lustre_msg_get_transno(req->rq_repmsg) == 0));
}
-int mdt_open_by_fid(struct mdt_thread_info *info, struct ldlm_reply *rep)
+static int mdt_open_by_fid(struct mdt_thread_info *info, struct ldlm_reply *rep)
{
__u64 flags = info->mti_spec.sp_cr_flags;
struct mdt_reint_record *rr = &info->mti_rr;
return true;
}
-int mdt_open_by_fid_lock(struct mdt_thread_info *info, struct ldlm_reply *rep,
- struct mdt_lock_handle *lhc)
+static int mdt_open_by_fid_lock(struct mdt_thread_info *info,
+ struct ldlm_reply *rep,
+ struct mdt_lock_handle *lhc)
{
const struct lu_env *env = info->mti_env;
struct mdt_device *mdt = info->mti_mdt;
}
void mdt_trans_stop(const struct lu_env *env,
- struct mdt_device *mdt, struct thandle *th)
+ struct mdt_device *mdt, struct thandle *th)
{
dt_trans_stop(env, mdt->mdt_bottom, th);
}
/**
* VBR: restore versions
*/
-void mdt_vbr_reconstruct(struct ptlrpc_request *req,
- struct lsd_client_data *lcd)
+static void mdt_vbr_reconstruct(struct ptlrpc_request *req,
+ struct lsd_client_data *lcd)
{
__u64 pre_versions[4] = {0};
pre_versions[0] = lcd->lcd_pre_versions[0];
lustre_msg_set_versions(req->rq_repmsg, pre_versions);
}
-void mdt_req_from_lcd(struct ptlrpc_request *req,
- struct lsd_client_data *lcd)
+void mdt_req_from_lcd(struct ptlrpc_request *req, struct lsd_client_data *lcd)
{
DEBUG_REQ(D_HA, req, "restoring transno "LPD64"/status %d",
lcd->lcd_last_transno, lcd->lcd_last_result);
* This checks version of 'name'. Many reint functions uses 'name' for child not
* FID, therefore we need to get object by name and check its version.
*/
-int mdt_lookup_version_check(struct mdt_thread_info *info,
- struct mdt_object *p, const struct lu_name *lname,
- struct lu_fid *fid, int idx)
+static int mdt_lookup_version_check(struct mdt_thread_info *info,
+ struct mdt_object *p,
+ const struct lu_name *lname,
+ struct lu_fid *fid, int idx)
{
int rc, vbrc;
LPROC_SEQ_FOPS_WO_TYPE(mgs, evict_client);
LPROC_SEQ_FOPS_RW_TYPE(mgs, ir_timeout);
-struct lprocfs_seq_vars lprocfs_mgs_obd_vars[] = {
+static struct lprocfs_seq_vars lprocfs_mgs_obd_vars[] = {
{ .name = "uuid",
.fops = &mgs_uuid_fops },
{ .name = "num_exports",
* crash all connections are treated as new connections.
*/
int mgs_client_add(struct obd_device *obd, struct obd_export *exp,
- void *localdata)
+ void *localdata)
{
return 0;
}
}
/* from mdt_iocontrol */
-int mgs_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
- void *karg, void *uarg)
+static int mgs_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
+ void *karg, void *uarg)
{
struct mgs_device *mgs = exp2mgs_dev(exp);
struct obd_ioctl_data *data = karg;
return (*p)(env, cookie, LUSTRE_MGS_NAME"-object@%p", o);
}
-struct lu_object_operations mgs_lu_obj_ops = {
+static struct lu_object_operations mgs_lu_obj_ops = {
.loo_object_init = mgs_object_init,
.loo_object_free = mgs_object_free,
.loo_object_print = mgs_object_print,
};
-struct lu_object *mgs_object_alloc(const struct lu_env *env,
- const struct lu_object_header *hdr,
- struct lu_device *d)
+static struct lu_object *mgs_object_alloc(const struct lu_env *env,
+ const struct lu_object_header *hdr,
+ struct lu_device *d)
{
struct lu_object_header *h;
struct mgs_object *o;
}
/* write the lcfg in all logs for the given fs */
-int mgs_write_log_direct_all(const struct lu_env *env, struct mgs_device *mgs,
- struct fs_db *fsdb, struct mgs_target_info *mti,
- struct llog_cfg_rec *lcr, char *devname,
- char *comment, int server_only)
+static int mgs_write_log_direct_all(const struct lu_env *env,
+ struct mgs_device *mgs,
+ struct fs_db *fsdb,
+ struct mgs_target_info *mti,
+ struct llog_cfg_rec *lcr, char *devname,
+ char *comment, int server_only)
{
struct list_head log_list;
struct mgs_direntry *dirent, *n;