* use highest bit of hash).
*/
if (is_dir) {
- ent->lde_hash = le32_to_cpu(ent->lde_hash);
- ent->lde_hash = cpu_to_le32(ent->lde_hash | MAX_HASH_HIGHEST_BIT);
+ ent->lde_hash = le64_to_cpu(ent->lde_hash);
+ ent->lde_hash = cpu_to_le64(ent->lde_hash | MAX_HASH_HIGHEST_BIT);
}
EXIT;
cleanup:
static int cmm_split_remove_page(const struct lu_env *env,
struct md_object *mo,
struct lu_rdpg *rdpg,
- __u32 hash_end, __u32 *len)
+ __u64 hash_end, __u32 *len)
{
struct lu_dirpage *dp;
struct lu_dirent *ent;
ENTRY;
*len = 0;
- kmap(rdpg->rp_pages[0]);
+ cfs_kmap(rdpg->rp_pages[0]);
dp = page_address(rdpg->rp_pages[0]);
for (ent = lu_dirent_start(dp);
- ent != NULL && le32_to_cpu(ent->lde_hash) < hash_end;
+ ent != NULL && le64_to_cpu(ent->lde_hash) < hash_end;
ent = lu_dirent_next(ent)) {
rc = cmm_split_remove_entry(env, mo, ent);
if (rc) {
*len += sizeof(struct lu_dirpage);
EXIT;
unmap:
- kunmap(rdpg->rp_pages[0]);
+ cfs_kunmap(rdpg->rp_pages[0]);
return rc;
}
struct md_object *mo,
struct lu_rdpg *rdpg,
struct lu_fid *lf,
- __u32 end)
+ __u64 end)
{
int rc, done = 0;
ENTRY;
}
}
- kmap(rdpg->rp_pages[0]);
+ cfs_kmap(rdpg->rp_pages[0]);
ldp = page_address(rdpg->rp_pages[0]);
- if (le32_to_cpu(ldp->ldp_hash_end) >= end)
+ if (le64_to_cpu(ldp->ldp_hash_end) >= end)
done = 1;
- rdpg->rp_hash = le32_to_cpu(ldp->ldp_hash_end);
- kunmap(rdpg->rp_pages[0]);
+ rdpg->rp_hash = le64_to_cpu(ldp->ldp_hash_end);
+ cfs_kunmap(rdpg->rp_pages[0]);
} while (!done);
RETURN(rc);
{
struct cmm_device *cmm = cmm_obj2dev(md2cmm_obj(mo));
struct lu_rdpg *rdpg = &cmm_env_info(env)->cmi_rdpg;
- __u32 hash_segement;
+ __u64 hash_segement;
int rc = 0, i;
ENTRY;
rdpg->rp_pages = cmm_env_info(env)->cmi_pages;
for (i = 0; i < rdpg->rp_npages; i++) {
- rdpg->rp_pages[i] = alloc_pages(GFP_KERNEL, 0);
+ rdpg->rp_pages[i] = cfs_alloc_page(CFS_ALLOC_STD);
if (rdpg->rp_pages[i] == NULL)
GOTO(cleanup, rc = -ENOMEM);
}
hash_segement = MAX_HASH_SIZE / (cmm->cmm_tgt_count + 1);
for (i = 1; i < cmm->cmm_tgt_count + 1; i++) {
struct lu_fid *lf;
- __u32 hash_end;
+ __u64 hash_end;
lf = &ma->ma_lmv->mea_ids[i];
cleanup:
for (i = 0; i < rdpg->rp_npages; i++)
if (rdpg->rp_pages[i] != NULL)
- __free_pages(rdpg->rp_pages[i], 0);
+ __cfs_free_page(rdpg->rp_pages[i]);
return rc;
}