Skip to contentSkip to conversation

define xfs_ino_t as unsigned long long

PATCH In review Christoph Hellwig 2 participants 3 messages Jan 5, 2009 – Jan 6, 2009 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 define xfs_ino_t as unsigned long long

That way we can avoid ugly casts when printining it (like the ones that show up on powerpc with Linus' current tree).

fs/xfs/xfs_types.h +1 -1
Index: xfs/fs/xfs/xfs_types.h
===================================================================
@@ -45,7 +45,7 @@ typedef __uint32_t		prid_t;		/* project 
 typedef __uint32_t		inst_t;		/* an instruction */
 
 typedef __s64			xfs_off_t;	/* <file offset> type */
-typedef __u64			xfs_ino_t;	/* <inode> type */
+typedef unsigned long long	xfs_ino_t;	/* <inode> type */
 typedef __s64			xfs_daddr_t;	/* <disk address> type */
 typedef char *			xfs_caddr_t;	/* <core address> type */
 typedef __u32			xfs_dev_t;

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Christoph Hellwig

That way we can avoid ugly casts when printining it (like the ones that show up on powerpc with Linus' current tree).

Is that because ppc uses int-l64.h instead of int-64ll.h and so __64 gets defined to an unsigned long on that platform?

Whatever the reason, it looks fine to me.

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#2 lore raw
Quoted 6 lines · Dave Chinner
Quoted 2 lines · Christoph Hellwig

That way we can avoid ugly casts when printining it (like the ones that show up on powerpc with Linus' current tree).

Is that because ppc uses int-l64.h instead of int-64ll.h and so __64 gets defined to an unsigned long on that platform?

Yes.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs