#ifndef __LINUX_FID_H
#define __LINUX_FID_H
+/** \defgroup fid fid
+ *
+ * @{
+ */
+
/*
* struct lu_fid
*/
extern const struct lu_seq_range LUSTRE_SEQ_SPACE_RANGE;
extern const struct lu_seq_range LUSTRE_SEQ_ZERO_RANGE;
extern const struct lu_fid LUSTRE_BFL_FID;
+extern const struct lu_fid LU_OBF_FID;
+extern const struct lu_fid LU_DOT_LUSTRE_FID;
enum {
/*
* This is how many sequences may be in one super-sequence allocated to
* MDTs.
*/
- LUSTRE_SEQ_SUPER_WIDTH = (LUSTRE_SEQ_META_WIDTH * LUSTRE_SEQ_META_WIDTH)
+ LUSTRE_SEQ_SUPER_WIDTH = ((1<< 30) * LUSTRE_SEQ_META_WIDTH)
};
/** special fid seq: used for local object create. */
#define FID_SEQ_LOCAL_FILE (FID_SEQ_START + 1)
+/** special fid seq: used for .lustre objects. */
+#define LU_DOT_LUSTRE_SEQ (FID_SEQ_START + 0x02ULL)
+
+/* Note that reserved SEQ numbers below 12 will conflict with ldiskfs
+ * inodes in the IGIF namespace, so these reserved SEQ numbers must be
+ * used sparingly until ldiskfs-based MDT backends and/or IGIF FIDs
+ * have been completely removed. */
+
+/** fid sequence for distributed fs objects */
+#define FID_SEQ_DISTRIBUTED_START (FID_SEQ_START + 0x400ULL)
+
/** special OID for local objects */
enum {
/** \see osd_oi_index_create */
- OSD_OI_FID_SMALL_OID = 1UL,
- OSD_OI_FID_OTHER_OID = 2UL,
+ OSD_OI_FID_16_OID = 2UL,
/** \see fld_mod_init */
FLD_INDEX_OID = 3UL,
/** \see fid_mod_init */
struct lu_client_seq {
/* Sequence-controller export. */
struct obd_export *lcs_exp;
- struct semaphore lcs_sem;
+ cfs_semaphore_t lcs_sem;
/*
* Range of allowed for allocation sequeces. When using lu_client_seq on
struct lu_client_seq *lss_cli;
/* Semaphore for protecting allocation */
- struct semaphore lss_sem;
+ cfs_semaphore_t lss_sem;
/*
* Service uuid, passed from MDT + seq name to form unique seq name to
dst->lsr_mdt = be32_to_cpu(src->lsr_mdt);
}
+/** @} fid */
+
#endif /* __LINUX_FID_H */