Whamcloud - gitweb
Branch: b_new_cmd
authorwangdi <wangdi>
Tue, 3 Oct 2006 09:51:44 +0000 (09:51 +0000)
committerwangdi <wangdi>
Tue, 3 Oct 2006 09:51:44 +0000 (09:51 +0000)
1) get rid of sign bit of ino to compatiable with glibc
2) correct bit size for filldir

lustre/llite/dir.c
lustre/llite/llite_fid.c

index 5772bf0..ba64885 100644 (file)
@@ -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);
index 3712191..f6f92e0 100644 (file)
@@ -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);
 }