*/
/*
* 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 MGS_NIDTBL_DIR "NIDTBL_VERSIONS"
#define QMT_DIR "quota_master"
#define QSD_DIR "quota_slave"
+#define QSD_DIR_DT "quota_slave_dt"
+#define QSD_DIR_MD "quota_slave_md"
#define HSM_ACTIONS "hsm_actions"
#define LFSCK_DIR "LFSCK"
#define LFSCK_BOOKMARK "lfsck_bookmark"
#define LFSCK_LAYOUT "lfsck_layout"
#define LFSCK_NAMESPACE "lfsck_namespace"
#define REMOTE_PARENT_DIR "REMOTE_PARENT_DIR"
+#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 *********************/
/** regenerate config logs for this fs or server */
#define LDD_F_WRITECONF 0x0100
/** COMPAT_14 */
-#define LDD_F_UPGRADE14 0x0200
+/*#define LDD_F_UPGRADE14 0x0200 deprecated since 1.8 */
/** process as lctl conf_param */
#define LDD_F_PARAM 0x0400
/** all nodes are specified as service nodes */
#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
* 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 */
+ __u32 lrd_result; /* request result */
+ __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 */