* GPL HEADER END
*/
/*
- * Copyright (c) 2013, Intel Corporation.
+ * Copyright (c) 2014, 2016, Intel Corporation.
*/
/*
* lustre/include/lustre_lmv.h
}
union lmv_mds_md;
-int lmv_pack_md(union lmv_mds_md **lmmp, const struct lmv_stripe_md *lsm,
- int stripe_count);
-int lmv_alloc_md(union lmv_mds_md **lmmp, int stripe_count);
-void lmv_free_md(union lmv_mds_md *lmm);
-int lmv_alloc_memmd(struct lmv_stripe_md **lsmp, int stripe_count);
void lmv_free_memmd(struct lmv_stripe_md *lsm);
int lmvea_load_shards(const struct lu_env *env, struct dt_object *obj,
static inline unsigned int
lmv_hash_fnv1a(unsigned int count, const char *name, int namelen)
{
- __u64 hash;
+ __u64 hash;
hash = lustre_hash_fnv_1a_64(name, namelen);
- hash = hash % count;
-
- return hash;
+ return do_div(hash, count);
}
static inline int lmv_name_to_stripe_index(__u32 lmv_hash_type,