Whamcloud - gitweb
b=20562 increase LUSTRE_SEQ_META_WIDTH to keep FLD compact
[fs/lustre-release.git] / lustre / include / lustre_fid.h
index 921b423..6f60da5 100644 (file)
 #ifndef __LINUX_FID_H
 #define __LINUX_FID_H
 
+/** \defgroup fid fid
+ *
+ * @{
+ */
+
 /*
  * struct lu_fid
  */
@@ -78,7 +83,7 @@ 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 = ((1ULL << 30ULL) * LUSTRE_SEQ_META_WIDTH)
 };
 
 /** special fid seq: used for local object create. */
@@ -87,11 +92,18 @@ enum {
 /** 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 */
@@ -132,7 +144,7 @@ struct lu_server_seq;
 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
@@ -190,7 +202,7 @@ struct lu_server_seq {
         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
@@ -340,4 +352,6 @@ static inline void range_be_to_cpu(struct lu_seq_range *dst, const struct lu_seq
         dst->lsr_mdt = be32_to_cpu(src->lsr_mdt);
 }
 
+/** @} fid */
+
 #endif /* __LINUX_FID_H */