Whamcloud - gitweb
add ls_node_id into struct lu_site
authortappro <tappro>
Fri, 12 May 2006 09:22:51 +0000 (09:22 +0000)
committertappro <tappro>
Fri, 12 May 2006 09:22:51 +0000 (09:22 +0000)
add m_seq_last into struct lu_seq_mgr
add LU_SEQ_RANGE value to indicate range of sequences for one MDS

lustre/include/linux/lu_object.h
lustre/include/linux/lustre_fid.h
lustre/include/linux/lustre_idl.h

index 97f12fe..5422a16 100644 (file)
@@ -452,6 +452,8 @@ struct lu_site {
          * Top-level device for this stack.
          */
         struct lu_device  *ls_top_dev;
+        /* current server index */
+        __u32             ls_node_id;
         /*
          * Fid location database
          */
index e029687..1547c2a 100644 (file)
@@ -40,8 +40,11 @@ struct lu_seq_mgr_ops {
 struct lu_seq_mgr {
         /* seq management fields */
         struct semaphore       m_seq_sem;
+        /* each MDS has own range of seqs ended with this value
+         * if it is overflowed the new one should be got from master node */
+        __u64                  m_seq_last;
+        /* last allocated seq */
         __u64                  m_seq;
-
         /* ops related stuff */
         void                  *m_opaque;
         struct lu_seq_mgr_ops *m_ops;
@@ -56,7 +59,7 @@ int seq_mgr_setup(struct lu_context *, struct lu_seq_mgr *);
 int seq_mgr_read(struct lu_context *, struct lu_seq_mgr *);
 int seq_mgr_write(struct lu_context *, struct lu_seq_mgr *);
 int seq_mgr_alloc(struct lu_context *, struct lu_seq_mgr *, __u64 *);
-
+int seq_mgr_range_alloc(struct lu_context *, struct lu_seq_mgr *, __u64 *);
 struct lu_site;
 #if 0
 int fid_is_local(struct lu_site *site, const struct lu_fid *fid);
index a97815c..56ffc5e 100644 (file)
@@ -144,6 +144,9 @@ enum {
         /* maximal objects in sequence */
         LUSTRE_FID_SEQ_WIDTH = 10000,
 
+        /* range of seqs for one MDS */
+        LUSTRE_SEQ_RANGE = 1000,
+
         /* initial fid id value */
         LUSTRE_FID_INIT_OID  = 1UL,