From: tappro Date: Fri, 12 May 2006 09:22:51 +0000 (+0000) Subject: add ls_node_id into struct lu_site X-Git-Tag: v1_8_0_110~486^2~1835 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=37f9149ba65e61ebe253110bc451a6787f6946e7;p=fs%2Flustre-release.git add ls_node_id into struct lu_site add m_seq_last into struct lu_seq_mgr add LU_SEQ_RANGE value to indicate range of sequences for one MDS --- diff --git a/lustre/include/linux/lu_object.h b/lustre/include/linux/lu_object.h index 97f12fe..5422a16 100644 --- a/lustre/include/linux/lu_object.h +++ b/lustre/include/linux/lu_object.h @@ -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 */ diff --git a/lustre/include/linux/lustre_fid.h b/lustre/include/linux/lustre_fid.h index e029687..1547c2a 100644 --- a/lustre/include/linux/lustre_fid.h +++ b/lustre/include/linux/lustre_fid.h @@ -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); diff --git a/lustre/include/linux/lustre_idl.h b/lustre/include/linux/lustre_idl.h index a97815c..56ffc5e 100644 --- a/lustre/include/linux/lustre_idl.h +++ b/lustre/include/linux/lustre_idl.h @@ -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,