#define _LIBCFS_H
+int libcfs_arch_init(void);
+void libcfs_arch_cleanup(void);
+
#endif /* _LIBCFS_H */
GNIIPLND = 14,
};
+extern struct cfs_psdev_ops libcfs_psdev_ops;
+extern struct miscdevice libcfs_dev;
+extern struct cfs_wi_sched *cfs_sched_rehash;
+
+extern int insert_proc(void);
+extern void remove_proc(void);
+
#endif
"Lustre kernel debug mask");
EXPORT_SYMBOL(libcfs_debug);
-unsigned int libcfs_debug_mb = 0;
+static unsigned int libcfs_debug_mb;
CFS_MODULE_PARM(libcfs_debug_mb, "i", uint, 0644,
"Total debug buffer size.");
EXPORT_SYMBOL(libcfs_debug_mb);
unsigned int libcfs_stack = 3 * THREAD_SIZE / 4;
EXPORT_SYMBOL(libcfs_stack);
-unsigned int portal_enter_debugger;
+static unsigned int portal_enter_debugger;
EXPORT_SYMBOL(portal_enter_debugger);
unsigned int libcfs_catastrophe;
char libcfs_debug_file_path_arr[PATH_MAX] = LIBCFS_DEBUG_FILE_PATH_DEFAULT;
/* We need to pass a pointer here, but elsewhere this must be a const */
-char *libcfs_debug_file_path;
+static char *libcfs_debug_file_path;
CFS_MODULE_PARM(libcfs_debug_file_path, "s", charp, 0644,
"Path for dumping debug logs, "
"set 'NONE' to prevent log dumping");
/* libcfs_debug_token2mask() expects the returned
* string in lower-case */
-const char *libcfs_debug_subsys2str(int subsys)
+static const char *libcfs_debug_subsys2str(int subsys)
{
static const char *libcfs_debug_subsystems[] = LIBCFS_DEBUG_SUBSYS_NAMES;
/* libcfs_debug_token2mask() expects the returned
* string in lower-case */
-const char *libcfs_debug_dbg2str(int debug)
+static const char *libcfs_debug_dbg2str(int debug)
{
static const char *libcfs_debug_masks[] = LIBCFS_DEBUG_MASKS_NAMES;
POP_JOURNAL;
}
-int libcfs_debug_dumplog_thread(void *arg)
+static int libcfs_debug_dumplog_thread(void *arg)
{
libcfs_debug_dumplog_internal(arg);
wake_up(&debug_ctlwq);
#include <linux/module.h>
#include <linux/zutil.h>
+#include <libcfs/linux/linux-crypto.h>
#include <crypto/internal/hash.h>
#include <linux/module.h>
#include <linux/crc32.h>
+#include <libcfs/linux/linux-crypto.h>
#include <crypto/internal/hash.h>
#define CHKSUM_BLOCK_SIZE 1
return cap_raised(current_cap(), cfs_cap_unpack(cap));
}
-void cfs_kernel_cap_pack(kernel_cap_t kcap, cfs_cap_t *cap)
+static void cfs_kernel_cap_pack(kernel_cap_t kcap, cfs_cap_t *cap)
{
#if defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x19980330
*cap = cfs_cap_pack(kcap);
#endif
}
-void cfs_kernel_cap_unpack(kernel_cap_t *kcap, cfs_cap_t cap)
+static void cfs_kernel_cap_unpack(kernel_cap_t *kcap, cfs_cap_t cap)
{
#if defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x19980330
*kcap = cfs_cap_unpack(cap);
RETURN(err);
}
-extern struct cfs_psdev_ops libcfs_psdev_ops;
-
static int
libcfs_psdev_open(struct inode * inode, struct file * file)
{
#ifdef CONFIG_SYSCTL
static struct ctl_table_header *lnet_table_header = NULL;
#endif
-extern char lnet_upcall[1024];
-/**
- * The path of debug log dump upcall script.
- */
-extern char lnet_debug_log_upcall[1024];
int lprocfs_call_handler(void *data, int write, loff_t *ppos,
void __user *buffer, size_t *lenp,
}
#endif
-int
+static int
libcfs_sock_ioctl(int cmd, unsigned long arg)
{
mm_segment_t oldmm = get_fs();
#include <lnet/nidstr.h>
#include "tracefile.h"
-void
+static void
kportal_memhog_free (struct libcfs_device_userstate *ldu)
{
struct page **level0p = &ldu->ldu_memhog_root_page;
LASSERT(ldu->ldu_memhog_pages == 0);
}
-int
+static int
kportal_memhog_alloc(struct libcfs_device_userstate *ldu, int npages,
gfp_t flags)
{
libcfs_ioctl
};
-extern int insert_proc(void);
-extern void remove_proc(void);
MODULE_AUTHOR("Peter J. Braam <braam@clusterfs.com>");
MODULE_DESCRIPTION("Portals v3.1");
MODULE_LICENSE("GPL");
-extern struct miscdevice libcfs_dev;
-extern struct rw_semaphore cfs_tracefile_sem;
-extern struct mutex cfs_trace_thread_mutex;
-extern struct cfs_wi_sched *cfs_sched_rehash;
-
-extern void libcfs_init_nidstrings(void);
-extern int libcfs_arch_init(void);
-extern void libcfs_arch_cleanup(void);
-
static int init_libcfs_module(void)
{
int rc;
{/* .nf_type */ -1},
};
-const int libcfs_nnetstrfns = sizeof(libcfs_netstrfns)/sizeof(libcfs_netstrfns[0]);
+static const int libcfs_nnetstrfns =
+ sizeof(libcfs_netstrfns)/sizeof(libcfs_netstrfns[0]);
-int
+static int
libcfs_lo_str2addr(const char *str, int nob, __u32 *addr)
{
*addr = 0;
return 1;
}
-void
+static void
libcfs_ip_addr2str(__u32 addr, char *str)
{
#if 0 /* never lookup */
* fine, if it doesn't, then the scan ended at the end of the string, which is
* fine too :) */
-int
+static int
libcfs_ip_str2addr(const char *str, int nob, __u32 *addr)
{
unsigned int a;
return 0;
}
-void
+static void
libcfs_decnum_addr2str(__u32 addr, char *str)
{
snprintf(str, LNET_NIDSTR_SIZE, "%u", addr);
}
-void
+static void
libcfs_hexnum_addr2str(__u32 addr, char *str)
{
snprintf(str, LNET_NIDSTR_SIZE, "0x%x", addr);
}
-int
+static int
libcfs_num_str2addr(const char *str, int nob, __u32 *addr)
{
int n;
return 0;
}
-struct netstrfns *
+static struct netstrfns *
libcfs_lnd2netstrfns(int lnd)
{
int i;
return NULL;
}
-struct netstrfns *
+static struct netstrfns *
libcfs_namenum2netstrfns(const char *name)
{
struct netstrfns *nf;
return NULL;
}
-struct netstrfns *
+static struct netstrfns *
libcfs_name2netstrfns(const char *name)
{
int i;
struct mutex cfs_trace_thread_mutex;
static int thread_running = 0;
-atomic_t cfs_tage_allocated = ATOMIC_INIT(0);
+static atomic_t cfs_tage_allocated = ATOMIC_INIT(0);
static void put_pages_on_tcd_daemon_list(struct page_collection *pc,
struct cfs_trace_cpu_data *tcd);
extern char cfs_tracefile[TRACEFILE_NAME_SIZE];
extern long long cfs_tracefile_size;
+extern char lnet_upcall[1024];
+/**
+ * The path of debug log dump upcall script.
+ */
+extern char lnet_debug_log_upcall[1024];
+
extern void libcfs_run_debug_log_upcall(char *file);
int cfs_tracefile_init_arch(void);
extern int libcfs_panic_in_progress;
extern int cfs_trace_max_debug_mb(void);
+extern struct mutex cfs_trace_thread_mutex;
+extern struct rw_semaphore cfs_tracefile_sem;
+
#define TCD_MAX_PAGES (5 << (20 - PAGE_CACHE_SHIFT))
#define TCD_STOCK_PAGES (TCD_MAX_PAGES)
#define CFS_TRACEFILE_SIZE (500 << 20)
char ws_name[CFS_WS_NAME_LEN];
} cfs_wi_sched_t;
-struct cfs_workitem_data {
+static struct cfs_workitem_data {
/** serialize */
spinlock_t wi_glock;
/** list of all schedulers */
bool cfs_nidrange_is_contiguous(struct list_head *nidlist);
void cfs_nidrange_find_min_max(struct list_head *nidlist, char *min_nid,
char *max_nid, int nidstr_length);
+void libcfs_init_nidstrings(void);
#endif /* _LNET_NIDSTRINGS_H */