X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdclass%2Fmea.c;h=d3f06eef00bdd6cbdae7d173f4483b0c79837db9;hb=a633cb1da186b8f17d9aedc8a12c39419fd7e77d;hp=eaa3533d1f637c42ded4d0dd542cc084a11c4482;hpb=6869932b552ac705f411de3362f01bd50c1f6f7d;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/mea.c b/lustre/obdclass/mea.c index eaa3533..d3f06ee 100644 --- a/lustre/obdclass/mea.c +++ b/lustre/obdclass/mea.c @@ -26,7 +26,7 @@ * GPL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ /* @@ -39,7 +39,6 @@ #ifdef __KERNEL__ #include /* for request_module() */ #include -#include #include #include #else @@ -50,11 +49,18 @@ #include #ifdef __KERNEL__ -#include + #ifdef HAVE_SERVER_SUPPORT -/* LDISKFS_SB() */ + +#ifdef HAVE_EXT4_LDISKFS +#include +#include +#else +#include #include #endif + +#endif #endif static int mea_last_char_hash(int count, char *name, int namelen) { @@ -81,8 +87,6 @@ static int mea_all_chars_hash(int count, char *name, int namelen) /* This hash calculate method must be same as the lvar hash method */ #define LVAR_HASH_SANDWICH (0) -#define LVAR_HASH_TEA (1) -#define LVAR_HASH_R5 (0) #define LVAR_HASH_PREFIX (0) static __u32 hash_build0(const char *name, int namelen) @@ -103,10 +107,7 @@ static __u32 hash_build0(const char *name, int namelen) } else { struct ldiskfs_dx_hash_info hinfo; - if (LVAR_HASH_TEA) - hinfo.hash_version = LDISKFS_DX_HASH_TEA; - else - hinfo.hash_version = LDISKFS_DX_HASH_R5; + hinfo.hash_version = LDISKFS_DX_HASH_TEA; hinfo.seed = 0; ldiskfsfs_dirhash(name, namelen, &hinfo); result = hinfo.hash;