Whamcloud - gitweb
b=3920
[fs/lustre-release.git] / lustre / mds / mds_internal.h
index cb41877..d29398f 100644 (file)
@@ -7,11 +7,19 @@
 
 #include <linux/lustre_mds.h>
 
+#define MAX_ATIME_DIFF 60
+
 struct mds_filter_data {
         __u64 io_epoch;
 };
 
 #define MDS_FILTERDATA(inode) ((struct mds_filter_data *)(inode)->i_filterdata)
+#define DENTRY_VALID(dentry)    \
+        ((dentry)->d_inode || ((dentry)->d_flags & DCACHE_CROSS_REF))
+
+#define MDS_NO_SPLIT_EXPECTED   0
+#define MDS_EXPECT_SPLIT        1
+#define MDS_NO_SPLITTABLE       2
 
 static inline struct mds_obd *mds_req2mds(struct ptlrpc_request *req)
 {
@@ -38,11 +46,11 @@ int mds_get_parent_child_locked(struct obd_device *obd, struct mds_obd *mds,
                                 struct ll_fid *fid,
                                 struct lustre_handle *parent_lockh,
                                 struct dentry **dparentp, int parent_mode,
-                                __u64 parent_lockpart,
+                                __u64 parent_lockpart, int *update_mode,
                                 char *name, int namelen,
                                 struct lustre_handle *child_lockh,
                                 struct dentry **dchildp, int child_mode,
-                                __u64 child_lockpart);
+                                __u64 child_lockpart, void* clone_info);
 int mds_lock_new_child(struct obd_device *obd, struct inode *inode,
                        struct lustre_handle *child_lockh);
 
@@ -73,10 +81,14 @@ int mds_lov_write_objids(struct obd_device *obd);
 void mds_lov_update_objids(struct obd_device *obd, obd_id *ids);
 int mds_lov_set_growth(struct mds_obd *mds, int count);
 int mds_lov_set_nextid(struct obd_device *obd);
+int mds_lov_clearorphans(struct mds_obd *mds, struct obd_uuid *ost_uuid);
 int mds_post_mds_lovconf(struct obd_device *obd);
 int mds_notify(struct obd_device *obd, struct obd_device *watched, int active);
+int mds_lov_update_config(struct obd_device *obd, int transno);
 int mds_convert_lov_ea(struct obd_device *obd, struct inode *inode,
                        struct lov_mds_md *lmm, int lmm_size);
+int mds_revalidate_lov_ea(struct obd_device *obd, struct inode *inode,
+                          struct lustre_msg *msg, int offset);
 
 /* mds/mds_open.c */
 int mds_query_write_access(struct inode *inode);
@@ -103,18 +115,36 @@ extern struct lvfs_callback_ops mds_lvfs_ops;
 int mds_lov_clean(struct obd_device *obd);
 extern int mds_iocontrol(unsigned int cmd, struct obd_export *exp,
                          int len, void *karg, void *uarg);
+extern int mds_lock_mode_for_dir(struct obd_device *, struct dentry *, int);
+int mds_postrecov(struct obd_device *obd);
+
 #ifdef __KERNEL__
+int mds_get_md(struct obd_device *, struct inode *, void *md, int *size, 
+               int lock);
 int mds_pack_md(struct obd_device *, struct lustre_msg *, int offset,
                 struct mds_body *, struct inode *, int lock);
+void mds_pack_dentry2fid(struct ll_fid *, struct dentry *);
+void mds_pack_dentry2body(struct mds_body *b, struct dentry *dentry);
 void mds_pack_inode2fid(struct obd_device *, struct ll_fid *, struct inode *);
 void mds_pack_inode2body(struct obd_device *, struct mds_body *, struct inode *);
 #endif
 
 /* mds/mds_lmv.c */
+int mds_lmv_postsetup(struct obd_device *obd);
 int mds_lmv_connect(struct obd_device *obd, char * lov_name);
 int mds_lmv_disconnect(struct obd_device *obd, int flags);
 int mds_try_to_split_dir(struct obd_device *, struct dentry *, struct mea **,
-                         int);
+                         int, int);
 int mds_get_lmv_attr(struct obd_device *, struct inode *, struct mea **, int *);
+int mds_choose_mdsnum(struct obd_device *, const char *, int, int);
+int mds_lmv_postsetup(struct obd_device *);
+int mds_splitting_expected(struct obd_device *, struct dentry *);
+int mds_lock_slave_objs(struct obd_device *, struct dentry *,
+                        struct lustre_handle **);
+int mds_unlink_slave_objs(struct obd_device *, struct dentry *);
+void mds_unlock_slave_objs(struct obd_device *, struct dentry *,
+                           struct lustre_handle *);
+int mds_lock_and_check_slave(int, struct ptlrpc_request *, struct lustre_handle *);
+
 
 #endif /* _MDS_INTERNAL_H */