#include <lu_object.h>
#include <lustre_fid.h>
-/*
- * Sequence space, starts from 0x400 to have first 0x400 sequences used for
- * special purposes. This means that if we have seq-with 10000 fids, we have
- * ~10M fids reserved for special purposes (igifs, etc.).
+/**
+ * A cluster-wide range from which fid-sequences are granted to servers and
+ * then clients.
+ *
+ * Fid namespace:
+ * <pre>
+ * Normal FID: seq:64 [2^32,2^64-1] oid:32 ver:32
+ * IGIF : 0:33, ino:31 gen:32 0:32
+ * IDIF : 0:32, 1:1, ost-index:15, objd:48 0:32
+ * </pre>
+ *
+ * The first 0x400 sequences of normal FID are reserved for special purpose.
*/
const struct lu_range LUSTRE_SEQ_SPACE_RANGE = {
- (0x400),
- ((__u64)~0ULL)
+ FID_SEQ_START + 0x400ULL,
+ (__u64)~0ULL
};
EXPORT_SYMBOL(LUSTRE_SEQ_SPACE_RANGE);
.f_ver = 0x0000000000000000 };
EXPORT_SYMBOL(LUSTRE_BFL_FID);
-void fid_cpu_to_le(struct lu_fid *dst, const struct lu_fid *src)
-{
- /* check that all fields are converted */
- CLASSERT(sizeof *src ==
- sizeof fid_seq(src) +
- sizeof fid_oid(src) + sizeof fid_ver(src));
- LASSERTF(fid_is_igif(src) || fid_ver(src) == 0, DFID"\n", PFID(src));
- dst->f_seq = cpu_to_le64(fid_seq(src));
- dst->f_oid = cpu_to_le32(fid_oid(src));
- dst->f_ver = cpu_to_le32(fid_ver(src));
-}
-EXPORT_SYMBOL(fid_cpu_to_le);
-
-void fid_le_to_cpu(struct lu_fid *dst, const struct lu_fid *src)
-{
- /* check that all fields are converted */
- CLASSERT(sizeof *src ==
- sizeof fid_seq(src) +
- sizeof fid_oid(src) + sizeof fid_ver(src));
- dst->f_seq = le64_to_cpu(fid_seq(src));
- dst->f_oid = le32_to_cpu(fid_oid(src));
- dst->f_ver = le32_to_cpu(fid_ver(src));
- LASSERTF(fid_is_igif(dst) || fid_ver(dst) == 0, DFID"\n", PFID(dst));
-}
-EXPORT_SYMBOL(fid_le_to_cpu);
-
void range_cpu_to_le(struct lu_range *dst, const struct lu_range *src)
{
/* check that all fields are converted */