wengang wang
2009-Mar-27 07:06 UTC
[Ocfs2-devel] [PATCH 1/1] OCFS2: 64-bit inode number for getattr() instead of 32-bit value
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);
Sunil Mushran
2009-Mar-29 05:54 UTC
[Ocfs2-devel] [PATCH 1/1] OCFS2: 64-bit inode number for getattr() instead of 32-bit value
Last I checked one could not have 64 bit inode numbers on 32 bit systems. Meaning this patch is not required. On Mar 27, 2009, at 12:06 AM, wengang wang <wen.gang.wang at oracle.com> wrote:> 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); > > > _______________________________________________ > Ocfs2-devel mailing list > Ocfs2-devel at oss.oracle.com > http://oss.oracle.com/mailman/listinfo/ocfs2-devel