Whamcloud - gitweb
LU-15971 uapi: add DMV_IMP_INHERIT connect flag
[fs/lustre-release.git] / lustre / include / uapi / linux / lustre / lustre_disk.h
index 8565441..674abed 100644 (file)
@@ -27,9 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
- *
- * uapi/linux/lustre_disk.h
  *
  * Lustre disk format definitions.
  *
 #define INDEX_BACKUP_DIR       "index_backup"
 #define MDT_ORPHAN_DIR         "PENDING"
 
+/* On-disk configuration file. In host-endian order. */
+struct lustre_disk_data {
+       __u32 ldd_magic;
+       __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
+                                        * svname
+                                        */
+       __u32 ldd_mount_type;           /* target fs type LDD_MT_* */
+       char  ldd_fsname[64];           /* filesystem this server is part of,
+                                        * MTI_NAME_MAXLEN
+                                        */
+       char  ldd_svname[64];           /* this server's name (lustre-mdt0001)*/
+       __u8  ldd_uuid[40];             /* server UUID (COMPAT_146) */
+
+       char  ldd_userdata[1024 - 200]; /* arbitrary user string '200' */
+       __u8  ldd_padding[4096 - 1024]; /* 1024 */
+       char  ldd_mount_opts[4096];     /* target fs mount opts '4096' */
+       char  ldd_params[4096];         /* key=value pairs '8192' */
+};
+
 /****************** persistent mount data *********************/
 
 #define LDD_F_SV_TYPE_MDT      0x0001
 #define LDD_F_ERROR            0x4000
 /** process at lctl conf_param */
 #define LDD_F_PARAM2           0x8000
+/** the target shouldn't use local logs */
+#define LDD_F_NO_LOCAL_LOGS    0x10000
 
 #define LDD_MAGIC 0x1dd00001
 
@@ -185,7 +209,7 @@ struct lsd_client_data {
  * The lrd_client_gen field is assigned with lcd_generation value
  * to allow identify which client the reply data belongs to.
  */
-struct lsd_reply_data {
+struct lsd_reply_data_v1 {
        __u64 lrd_transno;      /* transaction number */
        __u64 lrd_xid;          /* transmission id */
        __u64 lrd_data;         /* per-operation data */
@@ -193,13 +217,29 @@ struct lsd_reply_data {
        __u32 lrd_client_gen;   /* client generation */
 };
 
+struct lsd_reply_data_v2 {
+       __u64 lrd_transno;      /* transaction number */
+       __u64 lrd_xid;          /* transmission id */
+       __u64 lrd_data;         /* per-operation data */
+       __u32 lrd_result;       /* request result */
+       __u32 lrd_client_gen;   /* client generation */
+       __u32 lrd_batch_idx;    /* sub request index in the batched RPC */
+       __u32 lrd_padding[7];   /* unused fields, total size is 8X __u64 */
+};
+
+#define lsd_reply_data lsd_reply_data_v2
+
 /* Header of the reply_data file */
-#define LRH_MAGIC 0xbdabda01
+#define LRH_MAGIC_V1           0xbdabda01
+#define LRH_MAGIC_V2           0xbdabda02
+#define LRH_MAGIC              LRH_MAGIC_V2
+
+/* Don't change the header size for compatibility. */
 struct lsd_reply_header {
        __u32   lrh_magic;
        __u32   lrh_header_size;
        __u32   lrh_reply_size;
-       __u8    lrh_pad[sizeof(struct lsd_reply_data) - 12];
+       __u8    lrh_pad[sizeof(struct lsd_reply_data_v1) - 12];
 };
 
 /** @} disk */