[Ocfs2-devel] [PATCH 1/1] OCFS2: 64-bit inode number for getattr() instead of 32-bit value

wengang wang wen.gang.wang at oracle.com
Fri Mar 27 00:06:56 PDT 2009


ocfs2_getattr() uses generic_fillattr() to set inode number(and other
attributes). generic_fillattr() inturn fills inode number with inode->i_ino
which is a 32-bit(unsigned long) value.

if the ocfs2 partition is huge enough, that may become an incorrect
value.
the fix is filling it again after generic_fillattr() with ip_blkno(u64).

Signed-off-by: Wengang Wang <wen.gang.wang at oracle.com>
--
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index a5887df..ffe7d34 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1076,6 +1076,8 @@ int ocfs2_getattr(struct vfsmount *mnt,
 	/* We set the blksize from the cluster size for performance */
 	stat->blksize = osb->s_clustersize;
 
+	stat->ino = OCFS2_I(inode)->ip_blkno;
+
 bail:
 	mlog_exit(err);
 



More information about the Ocfs2-devel mailing list