/*
* 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;
};
extern struct task_struct *current;
int in_group_p(gid_t gid);
-static inline int capable(int cap)
-{
- if (current->cap_effective & (1 << cap))
- return 1;
- else
- return 0;
-}
#define set_current_state(foo) do { current->state = foo; } while (0)
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
CAP_SET=1
} cap_flag_value_t;
-#define CAP_DAC_OVERRIDE 1
-#define CAP_DAC_READ_SEARCH 2
-#define CAP_FOWNER 3
-#define CAP_FSETID 4
-#define CAP_SYS_ADMIN 21
-
cap_t cap_get_proc(void);
int cap_get_flag(cap_t, cap_value_t, cap_flag_t, cap_flag_value_t *);
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