Whamcloud - gitweb
b=18143 Make VBR compatible with pdirops.
[fs/lustre-release.git] / lustre / include / lustre_disk.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  * GPL HEADER START
5  *
6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 only,
10  * as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * General Public License version 2 for more details (a copy is included
16  * in the LICENSE file that accompanied this code).
17  *
18  * You should have received a copy of the GNU General Public License
19  * version 2 along with this program; If not, see
20  * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
21  *
22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
23  * CA 95054 USA or visit www.sun.com if you need additional information or
24  * have any questions.
25  *
26  * GPL HEADER END
27  */
28 /*
29  * Copyright  2008 Sun Microsystems, Inc. All rights reserved
30  * Use is subject to license terms.
31  */
32 /*
33  * This file is part of Lustre, http://www.lustre.org/
34  * Lustre is a trademark of Sun Microsystems, Inc.
35  *
36  * lustre/include/lustre_disk.h
37  *
38  * Lustre disk format definitions.
39  *
40  * Author: Nathan Rutman <nathan@clusterfs.com>
41  */
42
43 #ifndef _LUSTRE_DISK_H
44 #define _LUSTRE_DISK_H
45
46 /** \defgroup disk disk
47  *
48  * @{
49  */
50
51 #include <libcfs/libcfs.h>
52 #include <lnet/types.h>
53
54 /****************** on-disk files *********************/
55
56 #define MDT_LOGS_DIR      "LOGS"  /* COMPAT_146 */
57 #define MOUNT_CONFIGS_DIR "CONFIGS"
58 #define CONFIGS_FILE      "mountdata"
59 /** Persistent mount data are stored on the disk in this file. */
60 #define MOUNT_DATA_FILE    MOUNT_CONFIGS_DIR"/"CONFIGS_FILE
61 #define LAST_RCVD         "last_rcvd"
62 #define LOV_OBJID         "lov_objid"
63 #define HEALTH_CHECK      "health_check"
64 #define CAPA_KEYS         "capa_keys"
65 #define CHANGELOG_USERS   "changelog_users"
66
67
68 /****************** persistent mount data *********************/
69
70 #define LDD_F_SV_TYPE_MDT   0x0001
71 #define LDD_F_SV_TYPE_OST   0x0002
72 #define LDD_F_SV_TYPE_MGS   0x0004
73 #define LDD_F_SV_ALL        0x0008
74 /** need an index assignment */
75 #define LDD_F_NEED_INDEX    0x0010
76 /** never registered */
77 #define LDD_F_VIRGIN        0x0020
78 /** update the config logs for this server*/
79 #define LDD_F_UPDATE        0x0040
80 /** rewrite the LDD */
81 #define LDD_F_REWRITE_LDD   0x0080
82 /** regenerate all logs for this fs */
83 #define LDD_F_WRITECONF     0x0100
84 /** COMPAT_14 */
85 #define LDD_F_UPGRADE14     0x0200
86 /** process as lctl conf_param */
87 #define LDD_F_PARAM         0x0400
88 /** backend fs make use of IAM directory format. */
89 #define LDD_F_IAM_DIR       0x0800
90
91 enum ldd_mount_type {
92         LDD_MT_EXT3 = 0,
93         LDD_MT_LDISKFS,
94         LDD_MT_SMFS,
95         LDD_MT_REISERFS,
96         LDD_MT_LDISKFS2,
97         LDD_MT_LAST
98 };
99
100 static inline char *mt_str(enum ldd_mount_type mt)
101 {
102         static char *mount_type_string[] = {
103                 "ext3",
104                 "ldiskfs",
105                 "smfs",
106                 "reiserfs",
107                 "ldiskfs2"
108         };
109         return mount_type_string[mt];
110 }
111
112 #define LDD_INCOMPAT_SUPP 0
113 #define LDD_ROCOMPAT_SUPP 0
114
115 #define LDD_MAGIC 0x1dd00001
116
117 /* On-disk configuration file. In host-endian order. */
118 struct lustre_disk_data {
119         __u32      ldd_magic;
120         __u32      ldd_feature_compat;  /* compatible feature flags */
121         __u32      ldd_feature_rocompat;/* read-only compatible feature flags */
122         __u32      ldd_feature_incompat;/* incompatible feature flags */
123
124         __u32      ldd_config_ver;      /* config rewrite count - not used */
125         __u32      ldd_flags;           /* LDD_SV_TYPE */
126         __u32      ldd_svindex;         /* server index (0001), must match
127                                            svname */
128         __u32      ldd_mount_type;      /* target fs type LDD_MT_* */
129         char       ldd_fsname[64];      /* filesystem this server is part of,
130                                            MTI_NAME_MAXLEN */
131         char       ldd_svname[64];      /* this server's name (lustre-mdt0001)*/
132         __u8       ldd_uuid[40];        /* server UUID (COMPAT_146) */
133
134 /*200*/ char       ldd_userdata[1024 - 200]; /* arbitrary user string */
135 /*1024*/__u8       ldd_padding[4096 - 1024];
136 /*4096*/char       ldd_mount_opts[4096]; /* target fs mount opts */
137 /*8192*/char       ldd_params[4096];     /* key=value pairs */
138 };
139
140 #define IS_MDT(data)   ((data)->ldd_flags & LDD_F_SV_TYPE_MDT)
141 #define IS_OST(data)   ((data)->ldd_flags & LDD_F_SV_TYPE_OST)
142 #define IS_MGS(data)  ((data)->ldd_flags & LDD_F_SV_TYPE_MGS)
143 #define MT_STR(data)   mt_str((data)->ldd_mount_type)
144
145 /* Make the mdt/ost server obd name based on the filesystem name */
146 static inline int server_make_name(__u32 flags, __u16 index, char *fs,
147                                    char *name)
148 {
149         if (flags & (LDD_F_SV_TYPE_MDT | LDD_F_SV_TYPE_OST)) {
150                 if (!(flags & LDD_F_SV_ALL))
151                         sprintf(name, "%.8s-%s%04x", fs,
152                                 (flags & LDD_F_SV_TYPE_MDT) ? "MDT" : "OST",
153                                 index);
154         } else if (flags & LDD_F_SV_TYPE_MGS) {
155                 sprintf(name, "MGS");
156         } else {
157                 CERROR("unknown server type %#x\n", flags);
158                 return 1;
159         }
160         return 0;
161 }
162
163 /* Get the index from the obd name */
164 int server_name2index(char *svname, __u32 *idx, char **endptr);
165
166
167 /****************** mount command *********************/
168
169 /* The lmd is only used internally by Lustre; mount simply passes
170    everything as string options */
171
172 #define LMD_MAGIC    0xbdacbd03
173
174 /* gleaned from the mount command - no persistent info here */
175 struct lustre_mount_data {
176         __u32      lmd_magic;
177         __u32      lmd_flags;         /* lustre mount flags */
178         int        lmd_mgs_failnodes; /* mgs failover node count */
179         int        lmd_exclude_count;
180         int        lmd_recovery_time_soft;
181         int        lmd_recovery_time_hard;
182         char      *lmd_dev;           /* device name */
183         char      *lmd_profile;       /* client only */
184         char      *lmd_mgssec;        /* sptlrpc flavor to mgs */
185         char      *lmd_opts;          /* lustre mount options (as opposed to
186                                          _device_ mount options) */
187         __u32     *lmd_exclude;       /* array of OSTs to ignore */
188 };
189
190 #define LMD_FLG_SERVER       0x0001  /* Mounting a server */
191 #define LMD_FLG_CLIENT       0x0002  /* Mounting a client */
192 #define LMD_FLG_ABORT_RECOV  0x0008  /* Abort recovery */
193 #define LMD_FLG_NOSVC        0x0010  /* Only start MGS/MGC for servers,
194                                         no other services */
195 #define LMD_FLG_NOMGS        0x0020  /* Only start target for servers, reusing
196                                         existing MGS services */
197
198 #define lmd_is_client(x) ((x)->lmd_flags & LMD_FLG_CLIENT)
199
200
201 /****************** last_rcvd file *********************/
202
203 /** version recovery epoch */
204 #define LR_EPOCH_BITS   32
205 #define lr_epoch(a) ((a) >> LR_EPOCH_BITS)
206 #define LR_EXPIRE_INTERVALS 16 /**< number of intervals to track transno */
207 #define ENOENT_VERSION 1 /** 'virtual' version of non-existent object */
208
209 #define LR_SERVER_SIZE   512
210 #define LR_CLIENT_START 8192
211 #define LR_CLIENT_SIZE   128
212 #if LR_CLIENT_START < LR_SERVER_SIZE
213 #error "Can't have LR_CLIENT_START < LR_SERVER_SIZE"
214 #endif
215
216 /*
217  * This limit is arbitrary (131072 clients on x86), but it is convenient to use
218  * 2^n * CFS_PAGE_SIZE * 8 for the number of bits that fit an order-n allocation.
219  * If we need more than 131072 clients (order-2 allocation on x86) then this
220  * should become an array of single-page pointers that are allocated on demand.
221  */
222 #if (128 * 1024UL) > (CFS_PAGE_SIZE * 8)
223 #define LR_MAX_CLIENTS (128 * 1024UL)
224 #else
225 #define LR_MAX_CLIENTS (CFS_PAGE_SIZE * 8)
226 #endif
227
228 /** COMPAT_146: this is an OST (temporary) */
229 #define OBD_COMPAT_OST          0x00000002
230 /** COMPAT_146: this is an MDT (temporary) */
231 #define OBD_COMPAT_MDT          0x00000004
232 /** 2.0 server, interop flag to show server version is changed */
233 #define OBD_COMPAT_20           0x00000008
234
235 /** MDS handles LOV_OBJID file */
236 #define OBD_ROCOMPAT_LOVOBJID   0x00000001
237
238 /** OST handles group subdirs */
239 #define OBD_INCOMPAT_GROUPS     0x00000001
240 /** this is an OST */
241 #define OBD_INCOMPAT_OST        0x00000002
242 /** this is an MDT */
243 #define OBD_INCOMPAT_MDT        0x00000004
244 /** common last_rvcd format */
245 #define OBD_INCOMPAT_COMMON_LR  0x00000008
246 /** FID is enabled */
247 #define OBD_INCOMPAT_FID        0x00000010
248 /** Size-on-MDS is enabled */
249 #define OBD_INCOMPAT_SOM        0x00000020
250 /** filesystem using iam format to store directory entries */
251 #define OBD_INCOMPAT_IAM_DIR    0x00000040
252 /** LMA attribute contains per-inode incompatible flags */
253 #define OBD_INCOMPAT_LMA        0x00000080
254
255
256 /* Data stored per server at the head of the last_rcvd file.  In le32 order.
257    This should be common to filter_internal.h, lustre_mds.h */
258 struct lr_server_data {
259         __u8  lsd_uuid[40];        /* server UUID */
260         __u64 lsd_last_transno;    /* last completed transaction ID */
261         __u64 lsd_compat14;        /* reserved - compat with old last_rcvd */
262         __u64 lsd_mount_count;     /* incarnation number */
263         __u32 lsd_feature_compat;  /* compatible feature flags */
264         __u32 lsd_feature_rocompat;/* read-only compatible feature flags */
265         __u32 lsd_feature_incompat;/* incompatible feature flags */
266         __u32 lsd_server_size;     /* size of server data area */
267         __u32 lsd_client_start;    /* start of per-client data area */
268         __u16 lsd_client_size;     /* size of per-client data area */
269         __u16 lsd_subdir_count;    /* number of subdirectories for objects */
270         __u64 lsd_catalog_oid;     /* recovery catalog object id */
271         __u32 lsd_catalog_ogen;    /* recovery catalog inode generation */
272         __u8  lsd_peeruuid[40];    /* UUID of MDS associated with this OST */
273         __u32 lsd_ost_index;       /* index number of OST in LOV */
274         __u32 lsd_mdt_index;       /* index number of MDT in LMV */
275         __u32 lsd_start_epoch;     /* VBR: start epoch from last boot */
276         /** transaction values since lsd_trans_table_time */
277         __u64 lsd_trans_table[LR_EXPIRE_INTERVALS];
278         /** start point of transno table below */
279         __u32 lsd_trans_table_time; /* time of first slot in table above */
280         __u32 lsd_expire_intervals; /* LR_EXPIRE_INTERVALS */
281         __u8  lsd_padding[LR_SERVER_SIZE - 288];
282 };
283
284 /* Data stored per client in the last_rcvd file.  In le32 order. */
285 struct lsd_client_data {
286         __u8  lcd_uuid[40];      /* client UUID */
287         __u64 lcd_last_transno; /* last completed transaction ID */
288         __u64 lcd_last_xid;     /* xid for the last transaction */
289         __u32 lcd_last_result;  /* result from last RPC */
290         __u32 lcd_last_data;    /* per-op data (disposition for open &c.) */
291         /* for MDS_CLOSE requests */
292         __u64 lcd_last_close_transno; /* last completed transaction ID */
293         __u64 lcd_last_close_xid;     /* xid for the last transaction */
294         __u32 lcd_last_close_result;  /* result from last RPC */
295         __u32 lcd_last_close_data;    /* per-op data */
296         /* VBR: last versions */
297         __u64 lcd_pre_versions[4];
298         __u32 lcd_last_epoch;
299         /** orphans handling for delayed export rely on that */
300         __u32 lcd_first_epoch;
301         __u8  lcd_padding[LR_CLIENT_SIZE - 128];
302 };
303
304 /* bug20354: the lcd_uuid for export of clients may be wrong */
305 static inline void check_lcd(char *obd_name, int index,
306                              struct lsd_client_data *lcd)
307 {
308         int length = sizeof(lcd->lcd_uuid);
309         if (strnlen((char*)lcd->lcd_uuid, length) == length) {
310                 lcd->lcd_uuid[length - 1] = '\0';
311
312                 LCONSOLE_ERROR("the client UUID (%s) on %s for exports"
313                                "stored in last_rcvd(index = %d) is bad!\n", 
314                                lcd->lcd_uuid, obd_name, index);
315         }
316 }
317
318 /* last_rcvd handling */
319 static inline void lsd_le_to_cpu(struct lr_server_data *buf,
320                                  struct lr_server_data *lsd)
321 {
322         int i;
323         memcpy(lsd->lsd_uuid, buf->lsd_uuid, sizeof (lsd->lsd_uuid));
324         lsd->lsd_last_transno     = le64_to_cpu(buf->lsd_last_transno);
325         lsd->lsd_compat14         = le64_to_cpu(buf->lsd_compat14);
326         lsd->lsd_mount_count      = le64_to_cpu(buf->lsd_mount_count);
327         lsd->lsd_feature_compat   = le32_to_cpu(buf->lsd_feature_compat);
328         lsd->lsd_feature_rocompat = le32_to_cpu(buf->lsd_feature_rocompat);
329         lsd->lsd_feature_incompat = le32_to_cpu(buf->lsd_feature_incompat);
330         lsd->lsd_server_size      = le32_to_cpu(buf->lsd_server_size);
331         lsd->lsd_client_start     = le32_to_cpu(buf->lsd_client_start);
332         lsd->lsd_client_size      = le16_to_cpu(buf->lsd_client_size);
333         lsd->lsd_subdir_count     = le16_to_cpu(buf->lsd_subdir_count);
334         lsd->lsd_catalog_oid      = le64_to_cpu(buf->lsd_catalog_oid);
335         lsd->lsd_catalog_ogen     = le32_to_cpu(buf->lsd_catalog_ogen);
336         memcpy(lsd->lsd_peeruuid, buf->lsd_peeruuid, sizeof(lsd->lsd_peeruuid));
337         lsd->lsd_ost_index        = le32_to_cpu(buf->lsd_ost_index);
338         lsd->lsd_mdt_index        = le32_to_cpu(buf->lsd_mdt_index);
339         lsd->lsd_start_epoch      = le32_to_cpu(buf->lsd_start_epoch);
340         for (i = 0; i < LR_EXPIRE_INTERVALS; i++)
341                 lsd->lsd_trans_table[i] = le64_to_cpu(buf->lsd_trans_table[i]);
342         lsd->lsd_trans_table_time = le32_to_cpu(buf->lsd_trans_table_time);
343         lsd->lsd_expire_intervals = le32_to_cpu(buf->lsd_expire_intervals);
344 }
345
346 static inline void lsd_cpu_to_le(struct lr_server_data *lsd,
347                                  struct lr_server_data *buf)
348 {
349         int i;
350         memcpy(buf->lsd_uuid, lsd->lsd_uuid, sizeof (buf->lsd_uuid));
351         buf->lsd_last_transno     = cpu_to_le64(lsd->lsd_last_transno);
352         buf->lsd_compat14         = cpu_to_le64(lsd->lsd_compat14);
353         buf->lsd_mount_count      = cpu_to_le64(lsd->lsd_mount_count);
354         buf->lsd_feature_compat   = cpu_to_le32(lsd->lsd_feature_compat);
355         buf->lsd_feature_rocompat = cpu_to_le32(lsd->lsd_feature_rocompat);
356         buf->lsd_feature_incompat = cpu_to_le32(lsd->lsd_feature_incompat);
357         buf->lsd_server_size      = cpu_to_le32(lsd->lsd_server_size);
358         buf->lsd_client_start     = cpu_to_le32(lsd->lsd_client_start);
359         buf->lsd_client_size      = cpu_to_le16(lsd->lsd_client_size);
360         buf->lsd_subdir_count     = cpu_to_le16(lsd->lsd_subdir_count);
361         buf->lsd_catalog_oid      = cpu_to_le64(lsd->lsd_catalog_oid);
362         buf->lsd_catalog_ogen     = cpu_to_le32(lsd->lsd_catalog_ogen);
363         memcpy(buf->lsd_peeruuid, lsd->lsd_peeruuid, sizeof(buf->lsd_peeruuid));
364         buf->lsd_ost_index        = cpu_to_le32(lsd->lsd_ost_index);
365         buf->lsd_mdt_index        = cpu_to_le32(lsd->lsd_mdt_index);
366         buf->lsd_start_epoch      = cpu_to_le32(lsd->lsd_start_epoch);
367         for (i = 0; i < LR_EXPIRE_INTERVALS; i++)
368                 buf->lsd_trans_table[i] = cpu_to_le64(lsd->lsd_trans_table[i]);
369         buf->lsd_trans_table_time = cpu_to_le32(lsd->lsd_trans_table_time);
370         buf->lsd_expire_intervals = cpu_to_le32(lsd->lsd_expire_intervals);
371 }
372
373 static inline void lcd_le_to_cpu(struct lsd_client_data *buf,
374                                  struct lsd_client_data *lcd)
375 {
376         memcpy(lcd->lcd_uuid, buf->lcd_uuid, sizeof (lcd->lcd_uuid));
377         lcd->lcd_last_transno       = le64_to_cpu(buf->lcd_last_transno);
378         lcd->lcd_last_xid           = le64_to_cpu(buf->lcd_last_xid);
379         lcd->lcd_last_result        = le32_to_cpu(buf->lcd_last_result);
380         lcd->lcd_last_data          = le32_to_cpu(buf->lcd_last_data);
381         lcd->lcd_last_close_transno = le64_to_cpu(buf->lcd_last_close_transno);
382         lcd->lcd_last_close_xid     = le64_to_cpu(buf->lcd_last_close_xid);
383         lcd->lcd_last_close_result  = le32_to_cpu(buf->lcd_last_close_result);
384         lcd->lcd_last_close_data    = le32_to_cpu(buf->lcd_last_close_data);
385         lcd->lcd_pre_versions[0]    = le64_to_cpu(buf->lcd_pre_versions[0]);
386         lcd->lcd_pre_versions[1]    = le64_to_cpu(buf->lcd_pre_versions[1]);
387         lcd->lcd_pre_versions[2]    = le64_to_cpu(buf->lcd_pre_versions[2]);
388         lcd->lcd_pre_versions[3]    = le64_to_cpu(buf->lcd_pre_versions[3]);
389         lcd->lcd_last_epoch         = le32_to_cpu(buf->lcd_last_epoch);
390         lcd->lcd_first_epoch        = le32_to_cpu(buf->lcd_first_epoch);
391 }
392
393 static inline void lcd_cpu_to_le(struct lsd_client_data *lcd,
394                                  struct lsd_client_data *buf)
395 {
396         memcpy(buf->lcd_uuid, lcd->lcd_uuid, sizeof (lcd->lcd_uuid));
397         buf->lcd_last_transno       = cpu_to_le64(lcd->lcd_last_transno);
398         buf->lcd_last_xid           = cpu_to_le64(lcd->lcd_last_xid);
399         buf->lcd_last_result        = cpu_to_le32(lcd->lcd_last_result);
400         buf->lcd_last_data          = cpu_to_le32(lcd->lcd_last_data);
401         buf->lcd_last_close_transno = cpu_to_le64(lcd->lcd_last_close_transno);
402         buf->lcd_last_close_xid     = cpu_to_le64(lcd->lcd_last_close_xid);
403         buf->lcd_last_close_result  = cpu_to_le32(lcd->lcd_last_close_result);
404         buf->lcd_last_close_data    = cpu_to_le32(lcd->lcd_last_close_data);
405         buf->lcd_pre_versions[0]    = cpu_to_le64(lcd->lcd_pre_versions[0]);
406         buf->lcd_pre_versions[1]    = cpu_to_le64(lcd->lcd_pre_versions[1]);
407         buf->lcd_pre_versions[2]    = cpu_to_le64(lcd->lcd_pre_versions[2]);
408         buf->lcd_pre_versions[3]    = cpu_to_le64(lcd->lcd_pre_versions[3]);
409         buf->lcd_last_epoch         = cpu_to_le32(lcd->lcd_last_epoch);
410         buf->lcd_first_epoch        = cpu_to_le32(lcd->lcd_first_epoch);
411 }
412
413 static inline __u64 lcd_last_transno(struct lsd_client_data *lcd)
414 {
415         return (lcd->lcd_last_transno > lcd->lcd_last_close_transno ?
416                 lcd->lcd_last_transno : lcd->lcd_last_close_transno);
417 }
418
419 static inline __u64 lcd_last_xid(struct lsd_client_data *lcd)
420 {
421         return (lcd->lcd_last_xid > lcd->lcd_last_close_xid ?
422                 lcd->lcd_last_xid : lcd->lcd_last_close_xid);
423 }
424
425 /****************** superblock additional info *********************/
426 #ifdef __KERNEL__
427
428 struct ll_sb_info;
429
430 struct lustre_sb_info {
431         int                       lsi_flags;
432         struct obd_device        *lsi_mgc;     /* mgc obd */
433         struct lustre_mount_data *lsi_lmd;     /* mount command info */
434         struct lustre_disk_data  *lsi_ldd;     /* mount info on-disk */
435         struct ll_sb_info        *lsi_llsbi;   /* add'l client sbi info */
436         struct vfsmount          *lsi_srv_mnt; /* the one server mount */
437         cfs_atomic_t              lsi_mounts;  /* references to the srv_mnt */
438 };
439
440 #define LSI_SERVER                       0x00000001
441 #define LSI_UMOUNT_FORCE                 0x00000010
442 #define LSI_UMOUNT_FAILOVER              0x00000020
443
444 #define     s2lsi(sb)        ((struct lustre_sb_info *)((sb)->s_fs_info))
445 #define     s2lsi_nocast(sb) ((sb)->s_fs_info)
446
447 #define     get_profile_name(sb)   (s2lsi(sb)->lsi_lmd->lmd_profile)
448
449 #endif /* __KERNEL__ */
450
451 /****************** mount lookup info *********************/
452
453 struct lustre_mount_info {
454         char                 *lmi_name;
455         struct super_block   *lmi_sb;
456         struct vfsmount      *lmi_mnt;
457         cfs_list_t            lmi_list_chain;
458 };
459
460 /****************** prototypes *********************/
461
462 #ifdef __KERNEL__
463
464 /* obd_mount.c */
465 void lustre_register_client_fill_super(int (*cfs)(struct super_block *sb));
466 void lustre_register_kill_super_cb(void (*cfs)(struct super_block *sb));
467
468
469 int lustre_common_put_super(struct super_block *sb);
470 struct lustre_mount_info *server_find_mount_locked(const char *name);
471 struct lustre_mount_info *server_get_mount(const char *name);
472 struct lustre_mount_info *server_get_mount_2(const char *name);
473 int server_put_mount(const char *name, struct vfsmount *mnt);
474 int server_put_mount_2(const char *name, struct vfsmount *mnt);
475 int server_register_target(struct super_block *sb);
476 struct mgs_target_info;
477 int server_mti_print(char *title, struct mgs_target_info *mti);
478
479 /* mgc_request.c */
480 int mgc_fsname2resid(char *fsname, struct ldlm_res_id *res_id);
481
482 #endif
483
484 /** @} disk */
485
486 #endif // _LUSTRE_DISK_H