Whamcloud - gitweb
LU-1158 general: added nanosecond OBD connect flag
[fs/lustre-release.git] / lustre / include / lustre_disk.h
index 17e04e5..508e13c 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,8 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011 Whamcloud, Inc.
- *
+ * Copyright (c) 2011, 2012, Whamcloud, Inc.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -67,7 +64,8 @@
 #define CAPA_KEYS         "capa_keys"
 #define CHANGELOG_USERS   "changelog_users"
 #define MGS_NIDTBL_DIR    "NIDTBL_VERSIONS"
-
+#define QMT_DIR           "quota_master"
+#define QSD_DIR           "quota_slave"
 
 /****************** persistent mount data *********************/
 
 #define LDD_F_ONDISK_MASK  (LDD_F_SV_TYPE_MASK | LDD_F_IAM_DIR)
 
 enum ldd_mount_type {
-        LDD_MT_EXT3 = 0,
-        LDD_MT_LDISKFS,
-        LDD_MT_SMFS,
-        LDD_MT_REISERFS,
-        LDD_MT_LDISKFS2,
-        LDD_MT_LAST
+       LDD_MT_EXT3 = 0,
+       LDD_MT_LDISKFS,
+       LDD_MT_SMFS,
+       LDD_MT_REISERFS,
+       LDD_MT_LDISKFS2,
+       LDD_MT_ZFS,
+       LDD_MT_LAST
 };
 
 static inline char *mt_str(enum ldd_mount_type mt)
@@ -125,11 +124,25 @@ static inline char *mt_str(enum ldd_mount_type mt)
                 "ldiskfs",
                 "smfs",
                 "reiserfs",
-                "ldiskfs2"
+               "ldiskfs2",
+               "zfs",
         };
         return mount_type_string[mt];
 }
 
+static inline char *mt_type(enum ldd_mount_type mt)
+{
+       static char *mount_type_string[] = {
+               "osd-ldiskfs",
+               "osd-ldiskfs",
+               "osd-smfs",
+               "osd-reiserfs",
+               "osd-ldiskfs",
+               "osd-zfs",
+       };
+       return mount_type_string[mt];
+}
+
 #define LDD_INCOMPAT_SUPP 0
 #define LDD_ROCOMPAT_SUPP 0
 
@@ -206,6 +219,8 @@ struct lustre_mount_data {
         char      *lmd_opts;          /* lustre mount options (as opposed to
                                          _device_ mount options) */
         __u32     *lmd_exclude;       /* array of OSTs to ignore */
+       char    *lmd_mgs;           /* MGS nid */
+       char    *lmd_osd_type;      /* OSD type */
 };
 
 #define LMD_FLG_SERVER       0x0001  /* Mounting a server */
@@ -217,6 +232,7 @@ struct lustre_mount_data {
                                         existing MGS services */
 #define LMD_FLG_WRITECONF    0x0040  /* Rewrite config log */
 #define LMD_FLG_NOIR         0x0080  /* NO imperative recovery */
+#define LMD_FLG_NOSCRUB             0x0100  /* Do not trigger scrub automatically */
 
 #define lmd_is_client(x) ((x)->lmd_flags & LMD_FLG_CLIENT)
 
@@ -274,7 +290,14 @@ struct lustre_mount_data {
 #define OBD_INCOMPAT_IAM_DIR    0x00000040
 /** LMA attribute contains per-inode incompatible flags */
 #define OBD_INCOMPAT_LMA        0x00000080
-
+/** lmm_stripe_count has been shrunk from __u32 to __u16 and the remaining 16
+ * bits are now used to store a generation. Once we start changing the layout
+ * and bumping the generation, old versions expecting a 32-bit lmm_stripe_count
+ * will be confused by interpreting stripe_count | gen << 16 as the actual
+ * stripe count */
+#define OBD_INCOMPAT_LMM_VER    0x00000100
+/** multiple OI files for MDT */
+#define OBD_INCOMPAT_MULTI_OI   0x00000200
 
 /* Data stored per server at the head of the last_rcvd file.  In le32 order.
    This should be common to filter_internal.h, lustre_mds.h */
@@ -458,6 +481,8 @@ struct lustre_sb_info {
         struct ll_sb_info        *lsi_llsbi;   /* add'l client sbi info */
         struct vfsmount          *lsi_srv_mnt; /* the one server mount */
         cfs_atomic_t              lsi_mounts;  /* references to the srv_mnt */
+       char                      lsi_svname[MTI_NAME_MAXLEN];
+       char                      lsi_osd_type[16];
         struct backing_dev_info   lsi_bdi;     /* each client mountpoint needs
                                                   own backing_dev_info */
 };
@@ -472,6 +497,7 @@ struct lustre_sb_info {
 #define     s2lsi_nocast(sb) ((sb)->s_fs_info)
 
 #define     get_profile_name(sb)   (s2lsi(sb)->lsi_lmd->lmd_profile)
+#define            get_mount_flags(sb)    (s2lsi(sb)->lsi_lmd->lmd_flags)
 
 #endif /* __KERNEL__ */