# include <string.h>
#else
# include <asm/semaphore.h>
+#include <linux/kp30.h> /* XXX just for LASSERT! */
#endif
#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;
struct obd_device;
+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);
struct client_obd *client_conn2cli(struct lustre_handle *conn);
+int target_revoke_connection(struct recovd_data *rd, int phase);
+
/* l_lock.c */
struct lustre_lock {
int l_depth;
int complete;
int err;
struct ptlrpc_bulk_desc *desc;
- brw_callback_t cb;
+ brw_callback_t cb;
+ void *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;
if (!de || IS_ERR(de))
return;
shrink_dcache_parent(de);
+ LASSERT(atomic_read(&de->d_count) > 0);
dput(de);
}
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>
#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