Whamcloud - gitweb
03d4888c94e82863a2864964aea54a36ddd4a0ee
[fs/lustre-release.git] / lustre / mds / mds_internal.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  */
4
5 #ifndef _MDS_INTERNAL_H
6 #define _MDS_INTERNAL_H
7
8 #include <lustre_disk.h>
9 #include <lustre_mds.h>
10
11 int mds_cleanup_pending(struct obd_device *obd);
12
13
14 /* mds/mds_log.c */
15 int mds_llog_init(struct obd_device *obd, int group,
16                   struct obd_device *tgt, int count,
17                   struct llog_catid *logid, struct obd_uuid *uuid);
18 int mds_llog_finish(struct obd_device *obd, int count);
19
20 /* mds/mds_lov.c */
21 int mds_lov_connect(struct obd_device *obd, char * lov_name);
22 int mds_lov_disconnect(struct obd_device *obd);
23
24 int mds_lov_clear_orphans(struct mds_obd *mds, struct obd_uuid *ost_uuid);
25 void mds_lov_update_objids(struct obd_device *obd, struct lov_mds_md *lmm);
26 int mds_lov_set_nextid(struct obd_device *obd);
27
28 int mds_lov_start_synchronize(struct obd_device *obd,
29                               struct obd_device *watched,
30                               void *data, int nonblock);
31 int mds_post_mds_lovconf(struct obd_device *obd);
32 int mds_notify(struct obd_device *obd, struct obd_device *watched,
33                enum obd_notify_event ev, void *data);
34 int mds_convert_lov_ea(struct obd_device *obd, struct inode *inode,
35                        struct lov_mds_md *lmm, int lmm_size);
36 int mds_init_lov_desc(struct obd_device *obd, struct obd_export *osc_exp);
37
38 int mds_obd_create(struct obd_export *exp, struct obdo *oa,
39                    struct lov_stripe_md **ea, struct obd_trans_info *oti);
40 int mds_obd_destroy(struct obd_export *exp, struct obdo *oa,
41                     struct lov_stripe_md *ea, struct obd_trans_info *oti,
42                     struct obd_export *md_exp);
43
44 /* mds/handler.c */
45 extern struct lvfs_callback_ops mds_lvfs_ops;
46 /* quota stuff */
47 extern quota_interface_t *mds_quota_interface_ref;
48
49 /* mds/lproc_mds.c */
50 enum {
51         LPROC_MDS_OPEN = 0,
52         LPROC_MDS_CLOSE,
53         LPROC_MDS_MKNOD,
54         LPROC_MDS_LINK,
55         LPROC_MDS_UNLINK,
56         LPROC_MDS_MKDIR,
57         LPROC_MDS_RMDIR,
58         LPROC_MDS_RENAME,
59         LPROC_MDS_GETXATTR,
60         LPROC_MDS_SETXATTR,
61         LPROC_MDS_LAST,
62 };
63 void mds_counter_incr(struct obd_export *exp, int opcode);
64 void mds_stats_counter_init(struct lprocfs_stats *stats);
65 void lprocfs_mds_init_vars(struct lprocfs_static_vars *lvars);
66 void lprocfs_mdt_init_vars(struct lprocfs_static_vars *lvars);
67 #endif /* _MDS_INTERNAL_H */