aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-08-12 06:49:54 -0400
committerBen Myers <bpm@sgi.com>2013-08-12 18:04:08 -0400
commit4f3d71f68bc976321b19efe2624cd91619af601f (patch)
tree177701e32b849b2ae80e0eac127f8d7bbef3a947 /fs/xfs
parent9b90b0d9da907a1810e7b7764befaf084e4cd45b (diff)
xfs: move kernel specific type definitions to xfs.h
xfs_types.h is shared with userspace, so having kernel specific types defined in it is problematic. Move all the kernel specific defines to xfs_linux.h so we can remove the __KERNEL__ guards from xfs_types.h. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_linux.h32
-rw-r--r--fs/xfs/xfs_types.h36
2 files changed, 32 insertions, 36 deletions
diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h
index 800f896a6cc4..3bc52b78f8b7 100644
--- a/fs/xfs/xfs_linux.h
+++ b/fs/xfs/xfs_linux.h
@@ -32,6 +32,38 @@
32# define XFS_BIG_INUMS 0 32# define XFS_BIG_INUMS 0
33#endif 33#endif
34 34
35/*
36 * Kernel specific type declarations for XFS
37 */
38typedef signed char __int8_t;
39typedef unsigned char __uint8_t;
40typedef signed short int __int16_t;
41typedef unsigned short int __uint16_t;
42typedef signed int __int32_t;
43typedef unsigned int __uint32_t;
44typedef signed long long int __int64_t;
45typedef unsigned long long int __uint64_t;
46
47typedef __uint32_t inst_t; /* an instruction */
48
49typedef __s64 xfs_off_t; /* <file offset> type */
50typedef unsigned long long xfs_ino_t; /* <inode> type */
51typedef __s64 xfs_daddr_t; /* <disk address> type */
52typedef char * xfs_caddr_t; /* <core address> type */
53typedef __u32 xfs_dev_t;
54typedef __u32 xfs_nlink_t;
55
56/* __psint_t is the same size as a pointer */
57#if (BITS_PER_LONG == 32)
58typedef __int32_t __psint_t;
59typedef __uint32_t __psunsigned_t;
60#elif (BITS_PER_LONG == 64)
61typedef __int64_t __psint_t;
62typedef __uint64_t __psunsigned_t;
63#else
64#error BITS_PER_LONG must be 32 or 64
65#endif
66
35#include "xfs_types.h" 67#include "xfs_types.h"
36 68
37#include "kmem.h" 69#include "kmem.h"
diff --git a/fs/xfs/xfs_types.h b/fs/xfs/xfs_types.h
index 6ed6b26585c2..ce44b182821f 100644
--- a/fs/xfs/xfs_types.h
+++ b/fs/xfs/xfs_types.h
@@ -18,42 +18,6 @@
18#ifndef __XFS_TYPES_H__ 18#ifndef __XFS_TYPES_H__
19#define __XFS_TYPES_H__ 19#define __XFS_TYPES_H__
20 20
21#ifdef __KERNEL__
22
23/*
24 * Additional type declarations for XFS
25 */
26typedef signed char __int8_t;
27typedef unsigned char __uint8_t;
28typedef signed short int __int16_t;
29typedef unsigned short int __uint16_t;
30typedef signed int __int32_t;
31typedef unsigned int __uint32_t;
32typedef signed long long int __int64_t;
33typedef unsigned long long int __uint64_t;
34
35typedef __uint32_t inst_t; /* an instruction */
36
37typedef __s64 xfs_off_t; /* <file offset> type */
38typedef unsigned long long xfs_ino_t; /* <inode> type */
39typedef __s64 xfs_daddr_t; /* <disk address> type */
40typedef char * xfs_caddr_t; /* <core address> type */
41typedef __u32 xfs_dev_t;
42typedef __u32 xfs_nlink_t;
43
44/* __psint_t is the same size as a pointer */
45#if (BITS_PER_LONG == 32)
46typedef __int32_t __psint_t;
47typedef __uint32_t __psunsigned_t;
48#elif (BITS_PER_LONG == 64)
49typedef __int64_t __psint_t;
50typedef __uint64_t __psunsigned_t;
51#else
52#error BITS_PER_LONG must be 32 or 64
53#endif
54
55#endif /* __KERNEL__ */
56
57typedef __uint32_t prid_t; /* project ID */ 21typedef __uint32_t prid_t; /* project ID */
58 22
59typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */ 23typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */