Whamcloud - gitweb
ac3f613b9923e9527c9152450dae77ac1f63746c
[fs/lustre-release.git] / lustre / mds / mds_internal.h
1 /*
2  * GPL HEADER START
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 only,
8  * as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License version 2 for more details (a copy is included
14  * in the LICENSE file that accompanied this code).
15  *
16  * You should have received a copy of the GNU General Public License
17  * version 2 along with this program; If not, see
18  * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
19  *
20  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
21  * CA 95054 USA or visit www.sun.com if you need additional information or
22  * have any questions.
23  *
24  * GPL HEADER END
25  */
26 /*
27  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
28  * Use is subject to license terms.
29  */
30 /*
31  * This file is part of Lustre, http://www.lustre.org/
32  * Lustre is a trademark of Sun Microsystems, Inc.
33  */
34
35 #ifndef _MDS_INTERNAL_H
36 #define _MDS_INTERNAL_H
37
38 #include <lustre_disk.h>
39 #include <lustre_mds.h>
40
41 int mds_cleanup_pending(struct obd_device *obd);
42
43
44 /* mds/mds_log.c */
45 int mds_llog_init(struct obd_device *obd, struct obd_llog_group *olg,
46                   struct obd_device *tgt, int *index);
47 int mds_llog_finish(struct obd_device *obd, int count);
48 int mds_changelog_llog_init(struct obd_device *obd, struct obd_device *tgt);
49 int mds_log_op_orphan(struct obd_device *, struct lov_stripe_md *, obd_count);
50
51 /* mds/mds_lov.c */
52 int mds_lov_connect(struct obd_device *obd, char * lov_name);
53 int mds_lov_disconnect(struct obd_device *obd);
54
55 int mds_lov_clear_orphans(struct mds_obd *mds, struct obd_uuid *ost_uuid);
56 void mds_lov_update_objids(struct obd_device *obd, struct lov_mds_md *lmm);
57 int mds_lov_set_nextid(struct obd_device *obd);
58
59 int mds_post_mds_lovconf(struct obd_device *obd);
60 int mds_notify(struct obd_device *obd, struct obd_device *watched,
61                enum obd_notify_event ev, void *data);
62 int mds_convert_lov_ea(struct obd_device *obd, struct inode *inode,
63                        struct lov_mds_md *lmm, int lmm_size,
64                        __u64 connect_flags);
65 int mds_init_lov_desc(struct obd_device *obd, struct obd_export *osc_exp);
66
67 int mds_obd_create(struct obd_export *exp, struct obdo *oa,
68                    struct lov_stripe_md **ea, struct obd_trans_info *oti);
69 int mds_obd_destroy(struct obd_export *exp, struct obdo *oa,
70                     struct lov_stripe_md *ea, struct obd_trans_info *oti,
71                     struct obd_export *md_exp, void *capa);
72
73 /* mds/handler.c */
74 extern struct lvfs_callback_ops mds_lvfs_ops;
75
76 /* mds/lproc_mds.c */
77 void lprocfs_mds_init_vars(struct lprocfs_static_vars *lvars);
78 #endif /* _MDS_INTERNAL_H */