enum ldd_mount_type {
- LDD_MT_EXT3 = 0,
+ LDD_MT_EXT3 = 0,
LDD_MT_LDISKFS,
- LDD_MT_SMFS,
+ LDD_MT_SMFS,
LDD_MT_REISERFS,
LDD_MT_LAST
};
-
+
static inline char *mt_str(enum ldd_mount_type mt)
{
static char *mount_type_string[] = {
__u32 ldd_feature_compat; /* compatible feature flags */
__u32 ldd_feature_rocompat;/* read-only compatible feature flags */
__u32 ldd_feature_incompat;/* incompatible feature flags */
-
+
__u32 ldd_config_ver; /* config rewrite count - not used */
__u32 ldd_flags; /* LDD_SV_TYPE */
- __u32 ldd_svindex; /* server index (0001), must match
+ __u32 ldd_svindex; /* server index (0001), must match
svname */
__u32 ldd_mount_type; /* target fs type LDD_MT_* */
char ldd_fsname[64]; /* filesystem this server is part of */
char ldd_svname[64]; /* this server's name (lustre-mdt0001)*/
__u8 ldd_uuid[40]; /* server UUID (COMPAT_146) */
-
+
/*200*/ __u8 ldd_padding[4096 - 200];
/*4096*/char ldd_mount_opts[4096]; /* target fs mount opts */
/*8192*/char ldd_params[4096]; /* key=value pairs */
{
if (flags & (LDD_F_SV_TYPE_MDT | LDD_F_SV_TYPE_OST)) {
sprintf(name, "%.8s-%s%04x", fs,
- (flags & LDD_F_SV_TYPE_MDT) ? "MDT" : "OST",
+ (flags & LDD_F_SV_TYPE_MDT) ? "MDT" : "OST",
index);
} else if (flags & LDD_F_SV_TYPE_MGS) {
sprintf(name, "MGS");
/****************** mount command *********************/
-/* The lmd is only used internally by Lustre; mount simply passes
+/* The lmd is only used internally by Lustre; mount simply passes
everything as string options */
#define LMD_MAGIC 0xbdacbd03
int lmd_exclude_count;
char *lmd_dev; /* device name */
char *lmd_profile; /* client only */
- char *lmd_opts; /* lustre mount options (as opposed to
+ char *lmd_opts; /* lustre mount options (as opposed to
_device_ mount options) */
__u32 *lmd_exclude; /* array of OSTs to ignore */
};
#define LMD_FLG_CLIENT 0x0002 /* Mounting a client only */
#define LMD_FLG_RECOVER 0x0004 /* Allow recovery */
-#define LMD_FLG_NOSVC 0x0008 /* Only start MGS/MGC for servers,
+#define LMD_FLG_NOSVC 0x0008 /* Only start MGS/MGC for servers,
no other services */
-#define lmd_is_client(x) ((x)->lmd_flags & LMD_FLG_CLIENT)
+#define lmd_is_client(x) ((x)->lmd_flags & LMD_FLG_CLIENT)
/****************** mkfs command *********************/
char mo_loopdev[128]; /* in case a loop dev is needed */
__u64 mo_device_sz; /* in KB */
int mo_stripe_count;
- int mo_flags;
+ int mo_flags;
int mo_mgs_failnodes;
};
/* This limit is arbitrary (32k clients on x86), but it is convenient to use
* 2^n * PAGE_SIZE * 8 for the number of bits that fit an order-n allocation. */
#define LR_MAX_CLIENTS (PAGE_SIZE * 8)
-
+
/* COMPAT_146 */
#define OBD_COMPAT_OST 0x00000002 /* this is an OST (temporary) */
#define OBD_COMPAT_MDT 0x00000004 /* this is an MDT (temporary) */
#define OBD_ROCOMPAT_LOVOBJID 0x00000001 /* MDS handles LOV_OBJID file */
#define OBD_ROCOMPAT_CROW 0x00000002 /* OST will CROW create objects */
-
+
#define OBD_INCOMPAT_GROUPS 0x00000001 /* OST handles group subdirs */
#define OBD_INCOMPAT_OST 0x00000002 /* this is an OST */
#define OBD_INCOMPAT_MDT 0x00000004 /* this is an MDT */
/* obd_mount.c */
void lustre_register_client_fill_super(int (*cfs)(struct super_block *sb));
int lustre_common_put_super(struct super_block *sb);
-int lustre_process_log(struct super_block *sb, char *logname,
+int lustre_process_log(struct super_block *sb, char *logname,
struct config_llog_instance *cfg);
-int lustre_end_log(struct super_block *sb, char *logname,
+int lustre_end_log(struct super_block *sb, char *logname,
struct config_llog_instance *cfg);
-struct lustre_mount_info *server_get_mount(char *name);
-int server_put_mount(char *name, struct vfsmount *mnt);
+struct lustre_mount_info *server_get_mount(const char *name);
+int server_put_mount(const char *name, struct vfsmount *mnt);
int server_register_target(struct super_block *sb);
int server_mti_print(char *title, struct mgs_target_info *mti);
DECLARE_MUTEX(lustre_mount_info_lock);
struct list_head server_mount_info_list = LIST_HEAD_INIT(server_mount_info_list);
-static struct lustre_mount_info *server_find_mount(char *name)
+static struct lustre_mount_info *server_find_mount(const char *name)
{
struct list_head *tmp;
struct lustre_mount_info *lmi;
/* we must register an obd for a mount before we call the setup routine.
*_setup will call lustre_get_mount to get the mnt struct
by obd_name, since we can't pass the pointer to setup. */
-static int server_register_mount(char *name, struct super_block *sb,
+static int server_register_mount(const char *name, struct super_block *sb,
struct vfsmount *mnt)
{
struct lustre_mount_info *lmi;
}
/* when an obd no longer needs a mount */
-static int server_deregister_mount(char *name)
+static int server_deregister_mount(const char *name)
{
struct lustre_mount_info *lmi;
ENTRY;
/* obd's look up a registered mount using their name. This is just
for initial obd setup to find the mount struct. It should not be
called every time you want to mntget. */
-struct lustre_mount_info *server_get_mount(char *name)
+struct lustre_mount_info *server_get_mount(const char *name)
{
struct lustre_mount_info *lmi;
struct lustre_sb_info *lsi;
static int lustre_put_lsi(struct super_block *sb);
/* to be called from obd_cleanup methods */
-int server_put_mount(char *name, struct vfsmount *mnt)
+int server_put_mount(const char *name, struct vfsmount *mnt)
{
struct lustre_mount_info *lmi;
struct lustre_sb_info *lsi;