Whamcloud - gitweb
LU-9995 lfsck: keep the LMV_HASH_FLAG_DEAD flag
[fs/lustre-release.git] / lustre / include / lustre_lmv.h
index 7e23297..aaf3a26 100644 (file)
@@ -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 <lustre/lustre_idl.h>
+#include <uapi/linux/lustre/lustre_idl.h>
 
 struct lmv_oinfo {
        struct lu_fid   lmo_fid;
@@ -78,9 +78,6 @@ lsm_md_eq(const struct lmv_stripe_md *lsm1, const struct lmv_stripe_md *lsm2)
 }
 union lmv_mds_md;
 
-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,
@@ -133,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,