Whamcloud - gitweb
Replace all of the "char[37]" uses with obd_uuid_t.
[fs/lustre-release.git] / lustre / include / linux / lustre_lib.h
index 72f4c5c..d3012a8 100644 (file)
 #include <linux/portals_lib.h>
 #include <linux/lustre_idl.h>
 
+#if BITS_PER_LONG > 32
+#define LPU64 "%lu"
+#define LPD64 "%ld"
+#define LPX64 "%#lx"
+#else
+#define LPU64 "%Lu"
+#define LPD64 "%Ld"
+#define LPX64 "%#Lx"
+#endif
+
 #ifdef __KERNEL__
 /* l_net.c */
 struct ptlrpc_request;
@@ -43,7 +53,7 @@ struct recovd_data;
 int target_handle_connect(struct ptlrpc_request *req);
 int target_handle_disconnect(struct ptlrpc_request *req);
 int client_obd_connect(struct lustre_handle *conn, struct obd_device *obd,
-                       char *cluuid);
+                       obd_uuid_t cluuid);
 int client_obd_disconnect(struct lustre_handle *conn);
 int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf);
 int client_obd_cleanup(struct obd_device * obddev);
@@ -87,12 +97,6 @@ struct io_cb_data {
 
 int ll_sync_io_cb(struct io_cb_data *data, int err, int phase);
 struct  io_cb_data *ll_init_cb(void);
-inline void lustre_put_page(struct page *page);
-struct page *lustre_get_page_read(struct inode *dir, unsigned long index);
-struct page *lustre_get_page_write(struct inode *dir, unsigned long index);
-int lustre_commit_write(struct page *page, unsigned from, unsigned to);
-void set_page_clean(struct page *page);
-void set_page_dirty(struct page *page);
 
 /* simple.c */
 struct obd_run_ctxt;
@@ -135,8 +139,14 @@ static inline void ldlm_object2handle(void *object, struct lustre_handle *handle
 
 struct obd_statfs;
 struct statfs;
-void obd_statfs_pack(struct obd_statfs *osfs, struct statfs *sfs);
-void obd_statfs_unpack(struct obd_statfs *osfs, struct statfs *sfs);
+void statfs_pack(struct obd_statfs *osfs, struct statfs *sfs);
+void statfs_unpack(struct statfs *sfs, struct obd_statfs *osfs);
+void obd_statfs_pack(struct obd_statfs *tgt, struct obd_statfs *src);
+static inline void
+obd_statfs_unpack(struct obd_statfs *tgt, struct obd_statfs *src)
+{
+        obd_statfs_pack(tgt, src);
+}
 
 #include <linux/portals_lib.h>
 
@@ -420,6 +430,9 @@ static inline int obd_ioctl_getdata(char **buf, int *len, void *arg)
 
 #define OBD_IOC_DEC_FS_USE_COUNT       _IO  ('f', 133      )
 
+#define OBD_IOC_OPEN                   _IOWR('f', 134, long)
+#define OBD_IOC_CLOSE                  _IOWR('f', 135, long)
+
 /*
  * l_wait_event is a flexible sleeping function, permitting simple caller
  * configuration of interrupt and timeout sensitivity along with actions to