Whamcloud - gitweb
- Grammatical, LDLM updates to network.lyx
[fs/lustre-release.git] / lustre / include / linux / lustre_mds.h
index ee8c12d..175c52b 100644 (file)
 
 #ifdef __KERNEL__
 
-#include <linux/obd_class.h>
 #include <linux/lustre_idl.h>
 #include <linux/lustre_net.h>
-#include <linux/lustre_dlm.h>
-#include <linux/obd_lov.h> /* for lov_md */
+
+struct ldlm_lock_desc;
+struct lov_stripe_md;
 
 #define LUSTRE_MDS_NAME "mds"
 #define LUSTRE_MDC_NAME "mdc"
@@ -80,11 +80,10 @@ struct mds_client_data {
 };
 
 /* In-memory access to client data from MDS struct */
-struct mds_client_info {
-        struct list_head mci_list;
-        struct list_head mci_open_head;
-        struct mds_client_data *mci_mcd;
-        int mci_off;
+struct mds_export_data {
+        struct list_head        med_open_head;
+        struct mds_client_data *med_mcd;
+        int                     med_off;
 };
 
 /* file data for open files on MDS */
@@ -98,7 +97,6 @@ struct mds_file_data {
 /* mds/mds_reint.c  */
 int mds_reint_rec(struct mds_update_record *r, int offset,
                   struct ptlrpc_request *req);
-struct mds_client_info *mds_uuid_to_mci(struct mds_obd *mds, __u8 *uuid);
 
 /* lib/mds_updates.c */
 void mds_unpack_body(struct mds_body *b);
@@ -126,30 +124,29 @@ void mds_pack_inode2fid(struct ll_fid *fid, struct inode *inode);
 void mds_pack_inode2body(struct mds_body *body, struct inode *inode);
 
 /* mds/handler.c */
-struct dentry *mds_name2locked_dentry(struct mds_obd *mds, struct dentry *dir,
+struct dentry *mds_name2locked_dentry(struct obd_device *obd, struct dentry *dir,
                                       struct vfsmount **mnt, char *name,
                                       int namelen, int lock_mode,
                                       struct lustre_handle *lockh,
                                       int dir_lock_mode);
-struct dentry *mds_fid2locked_dentry(struct mds_obd *mds, struct ll_fid *fid,
+struct dentry *mds_fid2locked_dentry(struct obd_device *obd, struct ll_fid *fid,
                                      struct vfsmount **mnt, int lock_mode,
                                      struct lustre_handle *lockh);
 struct dentry *mds_fid2dentry(struct mds_obd *mds, struct ll_fid *fid,
                               struct vfsmount **mnt);
-int mds_lock_callback(struct lustre_handle *lockh, struct ldlm_lock_desc *desc,
-                      void *data, int data_len, struct ptlrpc_request **req);
 int mds_reint(int offset, struct ptlrpc_request *req);
 
 /* mdc/mdc_request.c */
-static inline struct mdc_obd *mdc_conn2mdc(struct lustre_handle *conn)
-{
-        return &class_conn2obd(conn)->u.mdc;
-}
+extern int mdc_con2cl(struct lustre_handle *conn, struct ptlrpc_client **cl,
+                      struct ptlrpc_connection **connection,
+                      struct lustre_handle **rconn);
 
 int mdc_enqueue(struct lustre_handle *conn, int lock_type,
                struct lookup_intent *it, int lock_mode, struct inode *dir,
                struct dentry *de, struct lustre_handle *h, __u64 id,
                char *tgt, int tgtlen, void *data, int datalen);
+int mdc_getlovinfo(struct obd_device *obd, struct lustre_handle *mdc_connh,
+                   uuid_t **uuids, struct ptlrpc_request **request);
 int mdc_getstatus(struct lustre_handle *conn,
                 struct ll_fid *rootfid, __u64 *last_committed, __u64 *last_rcvd,
                 __u32 *last_xid, struct ptlrpc_request **);
@@ -183,11 +180,12 @@ int mdc_rename(struct lustre_handle *conn,
                struct ptlrpc_request **);
 int mdc_create_client(char *uuid, struct ptlrpc_client *cl);
 
-extern int mds_client_add(struct mds_obd *mds, struct mds_client_data *mcd,
+extern int mds_client_add(struct mds_obd *mds, struct mds_export_data *med,
                           int cl_off);
 
 /* mds/mds_fs.c */
 struct mds_fs_operations {
+        struct module *fs_owner;
         void   *(* fs_start)(struct inode *inode, int op);
         int     (* fs_commit)(struct inode *inode, void *handle);
         int     (* fs_setattr)(struct dentry *dentry, void *handle,
@@ -207,8 +205,8 @@ struct mds_fs_operations {
 
 extern int mds_register_fs_type(struct mds_fs_operations *op, const char *name);
 extern void mds_unregister_fs_type(const char *name);
-extern int mds_fs_setup(struct mds_obd *mds, struct vfsmount *mnt);
-extern void mds_fs_cleanup(struct mds_obd *mds);
+extern int mds_fs_setup(struct obd_device *obddev, struct vfsmount *mnt);
+extern void mds_fs_cleanup(struct obd_device *obddev);
 
 static inline void *mds_fs_start(struct mds_obd *mds, struct inode *inode,
                                  int op)