* Find, kmap and return page that contains given hash.
*/
static struct page *ll_dir_page_locate(struct inode *dir, unsigned long hash,
- __u32 *start, __u32 *end)
+ __u64 *start, __u64 *end)
{
struct address_space *mapping = dir->i_mapping;
/*
wait_on_page(page);
if (PageUptodate(page)) {
dp = kmap(page);
- *start = le32_to_cpu(dp->ldp_hash_start);
- *end = le32_to_cpu(dp->ldp_hash_end);
+ *start = le64_to_cpu(dp->ldp_hash_start);
+ *end = le64_to_cpu(dp->ldp_hash_end);
LASSERT(*start <= hash);
if (hash > *end || (*end != *start && hash == *end)) {
kunmap(page);
struct page *page;
ldlm_mode_t mode;
int rc;
- __u32 start;
- __u32 end;
+ __u64 start;
+ __u64 end;
mode = LCK_PR;
rc = md_lock_match(ll_i2sbi(dir)->ll_md_exp, LDLM_FL_BLOCK_GRANTED,
hash_collision:
dp = page_address(page);
- start = le32_to_cpu(dp->ldp_hash_start);
- end = le32_to_cpu(dp->ldp_hash_end);
+ start = le64_to_cpu(dp->ldp_hash_start);
+ end = le64_to_cpu(dp->ldp_hash_end);
if (end == start) {
LASSERT(start == hash);
CWARN("Page-wide hash collision: %#lx\n", (unsigned long)end);
* If page is empty (end of directoryis reached),
* use this value.
*/
- __u32 hash = DIR_END_OFF;
- __u32 next;
+ __u64 hash = DIR_END_OFF;
+ __u64 next;
dp = page_address(page);
for (ent = lu_dirent_start(dp); ent != NULL && !done;
* XXX: implement correct swabbing here.
*/
- hash = le32_to_cpu(ent->lde_hash);
+ hash = le64_to_cpu(ent->lde_hash);
namelen = le16_to_cpu(ent->lde_namelen);
if (hash < pos)
done = filldir(cookie, name, namelen,
(loff_t)hash, ino, DT_UNKNOWN);
}
- next = le32_to_cpu(dp->ldp_hash_end);
+ next = le64_to_cpu(dp->ldp_hash_end);
ll_put_page(page);
if (!done) {
pos = next;