Whamcloud - gitweb
LU-9859 libcfs: make lnet_debugfs_symlink_def local to libcfs/modules.c
[fs/lustre-release.git] / libcfs / include / libcfs / libcfs.h
index 2bbc820..862c404 100644 (file)
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef __LIBCFS_LIBCFS_H__
 #include <libcfs/libcfs_string.h>
 #include <libcfs/libcfs_workitem.h>
 #include <libcfs/libcfs_hash.h>
-#include <libcfs/libcfs_heap.h>
 #include <libcfs/libcfs_fail.h>
 #include "curproc.h"
 
 #define LIBCFS_VERSION "0.7.1"
 
-#define PO2_ROUNDUP_TYPED(x, po2, type) (-(-(type)(x) & -(type)(po2)))
-#define LOWEST_BIT_SET(x) ((x) & ~((x) - 1))
-
 /* Sparse annotations */
 #if !defined(__must_hold)
 # ifdef __CHECKER__
@@ -90,11 +85,6 @@ int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data);
 
 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);
 void lnet_remove_debugfs(struct ctl_table *table);
 
@@ -103,6 +93,8 @@ int lprocfs_call_handler(void *data, int write, loff_t *ppos,
                         void __user *buffer, size_t *lenp,
                         int (*handler)(void *data, int write, loff_t pos,
                                        void __user *buffer, int len));
+int debugfs_doint(struct ctl_table *table, int write,
+                 void __user *buffer, size_t *lenp, loff_t *ppos);
 
 /*
  * Memory
@@ -132,4 +124,16 @@ do {                                                                       \
 /* atomic-context safe vfree */
 void libcfs_vfree_atomic(const void *addr);
 
+/* interval tree */
+
+#ifdef HAVE_INTERVAL_TREE_CACHED
+#define interval_tree_root rb_root_cached
+#define interval_tree_first rb_first_cached
+#define INTERVAL_TREE_ROOT RB_ROOT_CACHED
+#else
+#define interval_tree_root rb_root
+#define interval_tree_first rb_first
+#define INTERVAL_TREE_ROOT RB_ROOT
+#endif /* HAVE_INTERVAL_TREE_CACHED */
+
 #endif /* _LIBCFS_LIBCFS_H_ */