/*
* The inter_module_get implementation is specific to liblustre, so this needs
* to stay here for now.
- */
+ */
static inline void inter_module_put(void *a)
{
return;
static __inline__ int ext2_set_bit(int nr, void *addr)
{
+#ifdef __BIG_ENDIAN
+ return set_bit((nr ^ ((BITS_PER_LONG-1) & ~0x7)), addr);
+#else
return set_bit(nr, addr);
+#endif
}
static __inline__ int ext2_clear_bit(int nr, void *addr)
{
+#ifdef __BIG_ENDIAN
+ return clear_bit((nr ^ ((BITS_PER_LONG-1) & ~0x7)), addr);
+#else
return clear_bit(nr, addr);
+#endif
}
static __inline__ int ext2_test_bit(int nr, void *addr)
{
+#ifdef __BIG_ENDIAN
+ __const__ unsigned char *tmp = (__const__ unsigned char *) addr;
+ return (tmp[nr >> 3] >> (nr & 7)) & 1;
+#else
return test_bit(nr, addr);
+#endif
}
int ngroups;
gid_t *groups;
__u32 cap_effective;
+ void *journal_info;
};
#define might_sleep_if(c)
#define smp_mb()
-/**
- * fls - find last (most-significant) bit set
- * @x: the word to search
- *
- * This is defined the same way as ffs.
- * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
- */
-static inline
-int fls(int x)
-{
- int r = 32;
-
- if (!x)
- return 0;
- if (!(x & 0xffff0000u)) {
- x <<= 16;
- r -= 16;
- }
- if (!(x & 0xff000000u)) {
- x <<= 8;
- r -= 8;
- }
- if (!(x & 0xf0000000u)) {
- x <<= 4;
- r -= 4;
- }
- if (!(x & 0xc0000000u)) {
- x <<= 2;
- r -= 2;
- }
- if (!(x & 0x80000000u)) {
- x <<= 1;
- r -= 1;
- }
- return r;
-}
-
static inline
int test_and_set_bit(int nr, unsigned long *addr)
{
return oldbit;
}
+#define libcfs_memory_pressure_get() (0)
+#define libcfs_memory_pressure_put() do {} while (0)
+#define libcfs_memory_pressure_clr() do {} while (0)
+
/* FIXME sys/capability will finally included linux/fs.h thus
* cause numerous trouble on x86-64. as temporary solution for
* build broken at Cray, we copy definition we need from capability.h
void liblustre_deregister_wait_callback(void *notifier);
int liblustre_wait_event(int timeout);
-void *liblustre_register_idle_callback(const char *name,
+void *liblustre_register_idle_callback(const char *name,
int (*fn)(void *arg), void *arg);
void liblustre_deregister_idle_callback(void *notifier);
void liblustre_wait_idle(void);
}
#ifdef LIBLUSTRE_POSIX_ACL
-# ifndef posix_acl_xattr_entry
+# ifndef posix_acl_xattr_entry
# define posix_acl_xattr_entry xattr_acl_entry
# endif
-# ifndef posix_acl_xattr_header
+# ifndef posix_acl_xattr_header
# define posix_acl_xattr_header xattr_acl_header
# endif
# ifndef posix_acl_xattr_size