#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/workqueue.h>
#include <libcfs/linux/linux-misc.h>
#include <libcfs/linux/linux-time.h>
+#include <libcfs/linux/linux-wait.h>
#include <uapi/linux/lnet/libcfs_ioctl.h>
#include <libcfs/libcfs_debug.h>
# endif /* !__CHECKER__ */
#endif /* !__must_hold */
+#ifdef HAVE_TOTALRAM_PAGES_AS_FUNC
+ #ifndef cfs_totalram_pages
+ #define cfs_totalram_pages() totalram_pages()
+ #endif
+#else
+ #ifndef cfs_totalram_pages
+ #define cfs_totalram_pages() totalram_pages
+ #endif
+#endif
+
/* need both kernel and user-land acceptor */
#define LNET_ACCEPTOR_MIN_RESERVED_PORT 512
#define LNET_ACCEPTOR_MAX_RESERVED_PORT 1023
void cfs_restore_sigs(sigset_t);
void cfs_clear_sigpending(void);
-/*
- * Random number handling
- */
-
-/* returns a random 32-bit integer */
-unsigned int cfs_rand(void);
-/* seed the generator */
-void cfs_srand(unsigned int, unsigned int);
-void cfs_get_random_bytes(void *buf, int size);
-
int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data);
int libcfs_ioctl(unsigned long cmd, void __user *uparam);
#define container_of0(ptr, type, member) \
((type *)__container_of((ptr), offsetof(type, member)))
+extern struct workqueue_struct *cfs_rehash_wq;
+
struct lnet_debugfs_symlink_def {
const char *name;
const char *target;
};
-void lnet_insert_debugfs(struct ctl_table *table,
- const struct lnet_debugfs_symlink_def *symlinks);
+void lnet_insert_debugfs(struct ctl_table *table);
+void lnet_remove_debugfs(struct ctl_table *table);
/* helper for sysctl handlers */
int lprocfs_call_handler(void *data, int write, loff_t *ppos,