X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flustre_lmv.h;h=aaf3a26647b4282177230c9e4916e23a167ca73a;hb=51f4abfa40c0f47453a592a92185c17daae87bd8;hp=df39b72ad992bd2d5c9cbae2eb2073c09172cd12;hpb=2b294992edce5af7b79d4300ed3aa1ea6a8db850;p=fs%2Flustre-release.git diff --git a/lustre/include/lustre_lmv.h b/lustre/include/lustre_lmv.h index df39b72..aaf3a26 100644 --- a/lustre/include/lustre_lmv.h +++ b/lustre/include/lustre_lmv.h @@ -20,7 +20,7 @@ * GPL HEADER END */ /* - * Copyright (c) 2014, Intel Corporation. + * Copyright (c) 2014, 2016, Intel Corporation. */ /* * lustre/include/lustre_lmv.h @@ -32,7 +32,7 @@ #ifndef _LUSTRE_LMV_H #define _LUSTRE_LMV_H -#include +#include struct lmv_oinfo { struct lu_fid lmo_fid; @@ -78,11 +78,6 @@ lsm_md_eq(const struct lmv_stripe_md *lsm1, const struct lmv_stripe_md *lsm2) } 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, @@ -135,13 +130,11 @@ lmv_hash_all_chars(unsigned int count, const char *name, int namelen) 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,