Whamcloud - gitweb
7f9f24d437b3a21c014e38399023fc1c0a94a3b7
[fs/lustre-release.git] / lustre / include / lustre_mds.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  *   This file is part of Lustre, http://www.lustre.org
5  *
6  * MDS data structures.
7  * See also lustre_idl.h for wire formats of requests.
8  */
9
10 #ifndef _LUSTRE_MDS_H
11 #define _LUSTRE_MDS_H
12
13 #include <lustre_handles.h>
14 #include <libcfs/kp30.h>
15 #include <lustre/lustre_idl.h>
16 #include <lustre_lib.h>
17 #include <lustre_dlm.h>
18 #include <lustre_log.h>
19 #include <lustre_export.h>
20
21 #if defined(__linux__)
22 #include <linux/lustre_mds.h>
23 #elif defined(__APPLE__)
24 #include <darwin/lustre_mds.h>
25 #elif defined(__WINNT__)
26 #include <winnt/lustre_mds.h>
27 #else
28 #error Unsupported operating system.
29 #endif
30
31 struct mds_group_info {
32         struct obd_uuid *uuid;
33         int group;
34 };
35
36 /* mds/mds_reint.c */
37 int mds_lov_write_objids(struct obd_device *obd);
38 void mds_lov_update_objids(struct obd_device *obd, struct lov_mds_md *lmm);
39
40
41 #define MDS_LOV_MD_NAME "trusted.lov"
42 #define MDS_LMV_MD_NAME "trusted.lmv"
43 #define MDD_OBD_NAME    "mdd_obd"
44 #define MDD_OBD_UUID    "mdd_obd_uuid"
45 #define MDD_OBD_TYPE    "mds"
46
47 static inline int md_should_create(__u32 flags)
48 {
49        return !(flags & MDS_OPEN_DELAY_CREATE ||
50                !(flags & FMODE_WRITE));
51 }
52
53 #endif