return size > 0 ? size : rc;
}
-unsigned int oal_file_poll(struct file *filp, struct poll_table_struct *wait)
+static unsigned int oal_file_poll(struct file *filp,
+ struct poll_table_struct *wait)
{
struct oal_circ_buf *ocb = filp->private_data;
struct ofd_access_log *oal = ocb->ocb_access_log;
LPROC_SEQ_FOPS(osc_stats);
-int lprocfs_osc_attach_seqstat(struct obd_device *obd)
+static int lprocfs_osc_attach_seqstat(struct obd_device *obd)
{
int rc;
}
EXPORT_SYMBOL(osc_fsync_ost);
-int osc_io_fsync_start(const struct lu_env *env,
- const struct cl_io_slice *slice)
+static int osc_io_fsync_start(const struct lu_env *env,
+ const struct cl_io_slice *slice)
{
struct cl_io *io = slice->cis_io;
struct cl_fsync_io *fio = &io->u.ci_fsync;
static int brw_interpret(const struct lu_env *env, struct ptlrpc_request *req,
void *data, int rc);
-void osc_pack_req_body(struct ptlrpc_request *req, struct obdo *oa)
+static void osc_pack_req_body(struct ptlrpc_request *req, struct obdo *oa)
{
struct ost_body *body;
return set;
}
-int osc_enqueue_fini(struct ptlrpc_request *req, osc_enqueue_upcall_f upcall,
- void *cookie, struct lustre_handle *lockh,
- enum ldlm_mode mode, __u64 *flags, bool speculative,
- int errcode)
+static int osc_enqueue_fini(struct ptlrpc_request *req,
+ osc_enqueue_upcall_f upcall,
+ void *cookie, struct lustre_handle *lockh,
+ enum ldlm_mode mode, __u64 *flags,
+ bool speculative, int errcode)
{
bool intent = *flags & LDLM_FL_HAS_INTENT;
int rc;
RETURN(rc);
}
-int osc_enqueue_interpret(const struct lu_env *env, struct ptlrpc_request *req,
- void *args, int rc)
+static int osc_enqueue_interpret(const struct lu_env *env,
+ struct ptlrpc_request *req,
+ void *args, int rc)
{
struct osc_enqueue_args *aa = args;
struct ldlm_lock *lock;
}
LUSTRE_RO_ATTR(mntdev);
-ssize_t force_sync_store(struct kobject *kobj, struct attribute *attr,
- const char *buffer, size_t count)
+static ssize_t force_sync_store(struct kobject *kobj, struct attribute *attr,
+ const char *buffer, size_t count)
{
struct dt_device *dt = container_of(kobj, struct dt_device,
dd_kobj);
return sprintf(buf, "%u\n", osd->od_sync_on_lseek);
}
-ssize_t sync_on_lseek_store(struct kobject *kobj, struct attribute *attr,
- const char *buffer, size_t count)
+static ssize_t sync_on_lseek_store(struct kobject *kobj, struct attribute *attr,
+ const char *buffer, size_t count)
{
struct dt_device *dt = container_of(kobj, struct dt_device, dd_kobj);
struct osd_device *osd = osd_dt_dev(dt);
return sprintf(buf, "%d\n", dev->od_index_backup_policy);
}
-ssize_t index_backup_store(struct kobject *kobj, struct attribute *attr,
- const char *buffer, size_t count)
+static ssize_t index_backup_store(struct kobject *kobj, struct attribute *attr,
+ const char *buffer, size_t count)
{
struct dt_device *dt = container_of(kobj, struct dt_device,
dd_kobj);
return oi->oi_zapid;
}
-uint64_t
+static uint64_t
osd_get_name_n_idx_compat(const struct lu_env *env, struct osd_device *osd,
const struct lu_fid *fid, char *buf, int bufsize,
dnode_t **zdn)
return NULL;
}
-struct osd_idmap_cache *osd_idc_add(const struct lu_env *env,
- struct osd_device *osd,
- const struct lu_fid *fid)
+static struct osd_idmap_cache *osd_idc_add(const struct lu_env *env,
+ struct osd_device *osd,
+ const struct lu_fid *fid)
{
struct osd_thread_info *oti = osd_oti_get(env);
struct osd_idmap_cache *idc;
}
/* the function is used to declare EAs when SA is not supported */
-void __osd_xattr_declare_legacy(const struct lu_env *env,
- struct osd_object *obj,
- int vallen, const char *name,
- struct osd_thandle *oh)
+static void __osd_xattr_declare_legacy(const struct lu_env *env,
+ struct osd_object *obj,
+ int vallen, const char *name,
+ struct osd_thandle *oh)
{
struct osd_device *osd = osd_obj2dev(obj);
dmu_tx_t *tx = oh->ot_tx;
LUSTRE_RW_ATTR(sync_changes);
static ssize_t max_sync_changes_show(struct kobject *kobj,
- struct attribute *attr, char *buf)
+ struct attribute *attr,
+ char *buf)
{
struct dt_device *dt = container_of(kobj, struct dt_device,
dd_kobj);
static ssize_t max_sync_changes_store(struct kobject *kobj,
- struct attribute *attr, const char *buffer, size_t count)
+ struct attribute *attr,
+ const char *buffer, size_t count)
{
struct dt_device *dt = container_of(kobj, struct dt_device,
dd_kobj);
}
LUSTRE_RO_ATTR(ping);
-ssize_t osp_conn_uuid_show(struct kobject *kobj, struct attribute *attr,
- char *buf)
+static ssize_t osp_conn_uuid_show(struct kobject *kobj, struct attribute *attr,
+ char *buf)
{
struct dt_device *dt = container_of(kobj, struct dt_device,
dd_kobj);
* \retval 0 for success
* \retval negative error number on failure
*/
-int osp_md_declare_destroy(const struct lu_env *env, struct dt_object *dt,
- struct thandle *th)
+static int osp_md_declare_destroy(const struct lu_env *env,
+ struct dt_object *dt,
+ struct thandle *th)
{
return osp_trans_update_request_create(th);
}
* \retval 0 for success
* \retval negative error number on failure
*/
-int osp_md_destroy(const struct lu_env *env, struct dt_object *dt,
- struct thandle *th)
+static int osp_md_destroy(const struct lu_env *env, struct dt_object *dt,
+ struct thandle *th)
{
struct osp_object *o = dt2osp_obj(dt);
struct osp_device *osp = lu2osp_dev(dt->do_lu.lo_dev);
* \retval 0 for success
* \retval negative error number on failure
*/
-int osp_declare_destroy(const struct lu_env *env, struct dt_object *dt,
- struct thandle *th)
+static int osp_declare_destroy(const struct lu_env *env, struct dt_object *dt,
+ struct thandle *th)
{
struct osp_object *o = dt2osp_obj(dt);
struct osp_device *osp = lu2osp_dev(dt->do_lu.lo_dev);
* \retval 0 for arriving at the end of the iteration
* \retval negative error number on failure
*/
-int osp_orphan_it_load(const struct lu_env *env, const struct dt_it *di,
- __u64 hash)
+static int osp_orphan_it_load(const struct lu_env *env, const struct dt_it *di,
+ __u64 hash)
{
- struct osp_it *it = (struct osp_it *)di;
- int rc;
+ struct osp_it *it = (struct osp_it *)di;
+ int rc;
it->ooi_next = hash;
rc = osp_orphan_it_next(env, (struct dt_it *)di);
* \retval 0 on success
* \retval negative negated errno on error
*/
-int osp_init_pre_fid(struct lu_env *env, struct osp_device *osp)
+static int osp_init_pre_fid(struct lu_env *env, struct osp_device *osp)
{
struct osp_thread_info *osi;
struct lu_client_seq *cli_seq;
th, attr);
}
-int osp_sync_gap(const struct lu_env *env, struct osp_device *d,
- struct lu_fid *fid, int lost, struct thandle *th)
-{
- return osp_sync_add_rec(env, d, fid, MDS_UNLINK64_REC, lost, th, NULL);
-}
-
/*
* it's quite obvious we can't maintain all the structures in the memory:
* while OST is down, MDS can be processing thousands and thousands of unlinks
__u64 ospc_transno;
};
-void osp_sync_local_commit_cb(struct lu_env *env, struct thandle *th,
- struct dt_txn_commit_cb *dcb, int err)
+static void osp_sync_local_commit_cb(struct lu_env *env, struct thandle *th,
+ struct dt_txn_commit_cb *dcb, int err)
{
struct osp_last_committed_cb *cb;
struct osp_device *d;
* \retval 0 if packing succeeds
* \retval negative errno if packing fails
*/
-int osp_prep_inline_update_req(const struct lu_env *env,
- struct ptlrpc_request *req,
- struct osp_update_request *our,
- int repsize)
+static int osp_prep_inline_update_req(const struct lu_env *env,
+ struct ptlrpc_request *req,
+ struct osp_update_request *our,
+ int repsize)
{
struct osp_update_request_sub *ours;
struct out_update_header *ouh;