* @{ */
/**
- * File identifier.
- *
- * Fid is a cluster-wide unique identifier of a file or an object
- * (stripe). Fids are never reused. Fids are transmitted across network (in
- * the sender byte-ordering), and stored on disk in a packed form (struct
- * lu_fid_pack) in a big-endian order.
+ * Flags for lustre_mdt_attrs::lma_compat and lustre_mdt_attrs::lma_incompat.
*/
-struct lu_fid {
- /**
- * fid sequence. Sequence is a unit of migration: all files (objects)
- * with fids from a given sequence are stored on the same
- * server.
- *
- * Lustre should support 2 ^ 64 objects, thus even if one
- * sequence has one object we will never reach this value.
- */
- __u64 f_seq;
- /** fid number within sequence. */
- __u32 f_oid;
- /**
- * fid version, used to distinguish different versions (in the sense
- * of snapshots, etc.) of the same file system object. Not currently
- * used.
- */
- __u32 f_ver;
+enum lma_compat {
+ LMAC_HSM = 0x00000001,
+ LMAC_SOM = 0x00000002,
};
/**
+ * Masks for all features that should be supported by a Lustre version to
+ * access a specific file.
+ * This information is stored in lustre_mdt_attrs::lma_incompat.
+ *
+ * NOTE: No incompat feature should be added before bug #17670 is landed.
+ */
+#define LMA_INCOMPAT_SUPP 0x0
+
+/**
* Following struct for MDT attributes, that will be kept inode's EA.
* Introduced in 2.0 release (please see b15993, for details)
*/
struct lustre_mdt_attrs {
+ /**
+ * Bitfield for supported data in this structure. From enum lma_compat.
+ * lma_self_fid and lma_flags are always available.
+ */
+ __u32 lma_compat;
+ /**
+ * Per-file incompat feature list. Lustre version should support all
+ * flags set in this field. The supported feature mask is available in
+ * LMA_INCOMPAT_SUPP.
+ */
+ __u32 lma_incompat;
/** FID of this inode */
struct lu_fid lma_self_fid;
/** SOM state, mdt/ost type, others */
__u64 lma_som_sectors;
};
-
/**
* fid constants
*/
return fid_oid(fid);
}
-#define DFID "["LPX64":0x%x:0x%x]"
-#define SFID "0x%llx:0x%x:0x%x"
-
-#define PFID(fid) \
- fid_seq(fid), \
- fid_oid(fid), \
- fid_ver(fid)
-
+/*
+ * Fids are transmitted across network (in the sender byte-ordering),
+ * and stored on disk in big-endian order.
+ */
static inline void fid_cpu_to_le(struct lu_fid *dst, const struct lu_fid *src)
{
/* check that all fields are converted */