diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2006-06-09 06:04:06 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2006-06-09 06:04:06 +0000 |
commit | 7ee1f8e3abaeaea1d95c31dda7d337dd102d5062 (patch) | |
tree | 3870274154c262dd1aabe979005608f7e5f40b7d /sys/gnu/fs/xfs/FreeBSD/xfs_compat.h | |
parent | d9025257105d594ccc8026d06d50b5f0aad1dff9 (diff) | |
download | FreeBSD-src-7ee1f8e3abaeaea1d95c31dda7d337dd102d5062.zip FreeBSD-src-7ee1f8e3abaeaea1d95c31dda7d337dd102d5062.tar.gz |
Sync XFS for FreeBSD tree with newer changes from SGI XFS for Linux tree.
Improve support for writing to XFS partitions.
Work done by: Russell Cattelan <cattelan at xfs dot org>
Diffstat (limited to 'sys/gnu/fs/xfs/FreeBSD/xfs_compat.h')
-rw-r--r-- | sys/gnu/fs/xfs/FreeBSD/xfs_compat.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h b/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h index d89e38b..a98a7ee 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h @@ -42,6 +42,11 @@ typedef unsigned int __u32; typedef signed long long int __s64; typedef unsigned long long int __u64; +/* linus now has sparse which expects big endian or little endian */ +typedef __u16 __be16; +typedef __u32 __be32; +typedef __u64 __be64; + /* * Linux types with direct FreeBSD conterparts */ @@ -70,6 +75,7 @@ typedef dev_t os_dev_t; #define BITS_PER_LONG 32 #endif +#define rol32(x, y) (((x)<<(y))|((x)>>(32-(y)))) /* * boolean_t is enum on Linux, int on FreeBSD. * Provide value defines. @@ -156,10 +162,20 @@ typedef dev_t os_dev_t; #define max_t(type,x,y) MAX((x),(y)) +typedef struct mtx xfs_mutex_t; /* * Cedentials manipulation. */ #define current_fsuid(credp) (credp)->cr_uid #define current_fsgid(credp) (credp)->cr_groups[0] +#define PAGE_CACHE_SIZE PAGE_SIZE + +#define IS_ERR(err) (err) + +static inline unsigned long ffz(unsigned long val) +{ + return ffsl(~val); +} + #endif /* __XFS_COMPAT_H__ */ |