From: wangdi Date: Tue, 3 Oct 2006 09:51:44 +0000 (+0000) Subject: Branch: b_new_cmd X-Git-Tag: v1_8_0_110~486^2~720 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=af162256a967c6a1204846cb7a30461659762eae;p=fs%2Flustre-release.git Branch: b_new_cmd 1) get rid of sign bit of ino to compatiable with glibc 2) correct bit size for filldir --- diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 5772bf0..ba64885 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -492,9 +492,9 @@ int ll_readdir(struct file *filp, void *cookie, filldir_t filldir) name = ent->lde_name; fid_le_to_cpu(&fid, &fid); ino = ll_fid_build_ino(sbi, &fid); - + done = filldir(cookie, name, namelen, - hash, ino, DT_UNKNOWN); + (loff_t)hash, ino, DT_UNKNOWN); } next = le32_to_cpu(dp->ldp_hash_end); ll_put_page(page); diff --git a/lustre/llite/llite_fid.c b/lustre/llite/llite_fid.c index 3712191..f6f92e0 100644 --- a/lustre/llite/llite_fid.c +++ b/lustre/llite/llite_fid.c @@ -148,5 +148,5 @@ ino_t ll_fid_build_ino(struct ll_sb_info *sbi, /* very stupid and having many downsides inode allocation algorithm * based on fid. */ ino = (fid_seq(fid) - 1) * LUSTRE_SEQ_MAX_WIDTH + fid_oid(fid); - RETURN(ino); + RETURN(ino & 0x7fffffff); }