return tgt;
}
-int lmv_create(struct obd_export *exp, struct md_op_data *op_data,
- const void *data, size_t datalen, umode_t mode, uid_t uid,
- gid_t gid, kernel_cap_t cap_effective, __u64 rdev,
- struct ptlrpc_request **request)
+static int lmv_create(struct obd_export *exp, struct md_op_data *op_data,
+ const void *data, size_t datalen, umode_t mode, uid_t uid,
+ gid_t gid, kernel_cap_t cap_effective, __u64 rdev,
+ struct ptlrpc_request **request)
{
struct obd_device *obd = exp->exp_obd;
struct lmv_obd *lmv = &obd->u.lmv;
return tgt;
}
-struct lu_batch *lmv_batch_lookup_sub(struct lmv_batch *lbh,
- struct lmv_tgt_desc *tgt)
+static struct lu_batch *lmv_batch_lookup_sub(struct lmv_batch *lbh,
+ struct lmv_tgt_desc *tgt)
{
struct lmvsub_batch *sub;
return NULL;
}
-struct lu_batch *lmv_batch_get_sub(struct lmv_batch *lbh,
- struct lmv_tgt_desc *tgt)
+static struct lu_batch *lmv_batch_get_sub(struct lmv_batch *lbh,
+ struct lmv_tgt_desc *tgt)
{
struct lmvsub_batch *sbh;
struct lu_batch *child_bh;
le16_to_cpu(comp->lcm_entry_count) - 1); \
entry++)
-int lod_erase_dom_stripe(struct lov_comp_md_v1 *comp_v1,
- struct lov_comp_md_entry_v1 *dom_ent)
+static int lod_erase_dom_stripe(struct lov_comp_md_v1 *comp_v1,
+ struct lov_comp_md_entry_v1 *dom_ent)
{
struct lov_comp_md_entry_v1 *ent;
__u16 entries;
return d->lod_dom_stripesize_cur_kb << 10;
}
-int lod_dom_stripesize_choose(const struct lu_env *env, struct lod_device *d,
- struct lov_comp_md_v1 *comp_v1,
- struct lov_comp_md_entry_v1 *dom_ent,
- __u32 stripe_size)
+static int lod_dom_stripesize_choose(const struct lu_env *env,
+ struct lod_device *d,
+ struct lov_comp_md_v1 *comp_v1,
+ struct lov_comp_md_entry_v1 *dom_ent,
+ __u32 stripe_size)
{
struct lov_comp_md_entry_v1 *ent;
struct lu_extent *dom_ext, *ext;
* \retval 0 on success
* \retval negative if failed
*/
-int lod_alloc_foreign_lmv(struct lod_object *lo, size_t size)
+static int lod_alloc_foreign_lmv(struct lod_object *lo, size_t size)
{
OBD_ALLOC_LARGE(lo->ldo_foreign_lmv, size);
if (lo->ldo_foreign_lmv == NULL)
*
* \param[in] lo object
*/
-void lod_free_foreign_lmv(struct lod_object *lo)
+static void lod_free_foreign_lmv(struct lod_object *lo)
{
if (lo->ldo_foreign_lmv != NULL)
OBD_FREE_LARGE(lo->ldo_foreign_lmv, lo->ldo_foreign_lmv_size);
/**
* prepare enough OST avoidance bitmap space
*/
-int lod_prepare_avoidance(const struct lu_env *env, struct lod_object *lo)
+static int lod_prepare_avoidance(const struct lu_env *env,
+ struct lod_object *lo)
{
struct lod_device *lod = lu2lod_dev(lo->ldo_obj.do_lu.lo_dev);
struct lod_avoid_guide *lag = &lod_env_info(env)->lti_avoid;
* Collect information of used OSTs and OSSs in the overlapped components
* of other mirrors
*/
-void lod_collect_avoidance(struct lod_object *lo, struct lod_avoid_guide *lag,
- int comp_idx)
+static void lod_collect_avoidance(struct lod_object *lo,
+ struct lod_avoid_guide *lag,
+ int comp_idx)
{
struct lod_device *lod = lu2lod_dev(lo->ldo_obj.do_lu.lo_dev);
struct lod_layout_component *lod_comp = &lo->ldo_comp_entries[comp_idx];
* Preferred mirror is initialized by the preferred
* bit of lsme. It can be changed when the preferred
* is inaccessible.
- * In order to make lov_lsm_entry() return the same
- * mirror in the same IO context, it's only possible
- * to change the preferred mirror when the
- * lo_active_ios reaches zero.
*/
int lo_preferred_mirror;
/**
const struct lu_object_header *hdr,
struct lu_device *dev);
-int lov_lsm_entry(const struct lov_stripe_md *lsm, __u64 offset);
int lov_io_layout_at(struct lov_io *lio, __u64 offset);
#define lov_foreach_target(lov, var) \
}
}
-int lov_lsm_entry(const struct lov_stripe_md *lsm, __u64 offset)
-{
- int i;
-
- for (i = 0; i < lsm->lsm_entry_count; i++) {
- struct lov_stripe_md_entry *lse = lsm->lsm_entries[i];
-
- if ((offset >= lse->lsme_extent.e_start &&
- offset < lse->lsme_extent.e_end) ||
- (offset == OBD_OBJECT_EOF &&
- lse->lsme_extent.e_end == OBD_OBJECT_EOF))
- return i;
- }
-
- return -1;
-}
-
/**
* lmm_layout_gen overlaps stripe_offset field, it needs to be reset back when
* sending to MDT for passing striping checks
RETURN(0);
}
-int lov_io_lru_reserve(const struct lu_env *env,
- const struct cl_io_slice *ios, loff_t pos, size_t bytes)
+static int lov_io_lru_reserve(const struct lu_env *env,
+ const struct cl_io_slice *ios, loff_t pos,
+ size_t bytes)
{
struct lov_io *lio = cl2lov_io(env, ios);
struct lov_stripe_md *lsm = lio->lis_object->lo_lsm;
static int lov_notify(struct obd_device *obd, struct obd_device *watched,
enum obd_notify_event ev);
-int lov_connect_osc(struct obd_device *obd, u32 index, int activate,
- struct obd_connect_data *data)
+static int lov_connect_osc(struct obd_device *obd, u32 index, int activate,
+ struct obd_connect_data *data)
{
struct lov_obd *lov = &obd->u.lov;
struct obd_uuid *tgt_uuid;