{
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. */
+ /* save hash 0 with hash 1 */
return ~0ULL - (hash + !hash);
}
#endif
if (BITS_PER_LONG == 32 && hash64)
hash >>= 32;
#endif
- /* 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.
- */
+ /* save hash 0 with hash 1 */
return ~0UL - (hash + !hash);
}
*start = le64_to_cpu(dp->ldp_hash_start);
*end = le64_to_cpu(dp->ldp_hash_end);
}
- LASSERTF(*start <= *hash, "start = "LPX64",end = "
- LPX64",hash = "LPX64"\n", *start, *end, *hash);
+ if (unlikely(*start == 1 && *hash == 0))
+ *hash = *start;
+ else
+ LASSERTF(*start <= *hash, "start = "LPX64
+ ",end = "LPX64",hash = "LPX64"\n",
+ *start, *end, *hash);
CDEBUG(D_VFSTRACE, "page%lu [%llu %llu], hash"LPU64"\n",
offset, *start, *end, *hash);
if (*hash > *end) {