Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-3531 llite: move dir cache to MDC layer
[fs/lustre-release.git]
/
lustre
/
liblustre
/
llite_lib.h
diff --git
a/lustre/liblustre/llite_lib.h
b/lustre/liblustre/llite_lib.h
index
2b427c3
..
f26c201
100644
(file)
--- a/
lustre/liblustre/llite_lib.h
+++ b/
lustre/liblustre/llite_lib.h
@@
-445,4
+445,14
@@
static inline void i_size_write(struct inode *inode, loff_t i_sz)
{
inode->i_stbuf.st_size = i_sz;
}
+
+static inline __u64 hash_x_index(__u64 hash, int hash64)
+{
+ if (BITS_PER_LONG == 32 && hash64)
+ hash >>= 32;
+ /* save hash 0 as index 0 because otherwise we'll save it at
+ * page index end (~0UL) and it causes truncate_inode_pages_range()
+ * to loop forever. */
+ return ~0ULL - (hash + !hash);
+}
#endif