LU_KEY_INIT_FINI(fld, struct fld_thread_info);
/* context key: fld_thread_key */
-LU_CONTEXT_KEY_DEFINE(fld, LCT_MD_THREAD|LCT_DT_THREAD);
+LU_CONTEXT_KEY_DEFINE(fld, LCT_MD_THREAD | LCT_DT_THREAD | LCT_MG_THREAD);
cfs_proc_dir_entry_t *fld_type_proc_dir = NULL;
int rc;
ENTRY;
- info = lu_context_key_get(&env->le_ctx, &fld_thread_key);
- erange = &info->fti_lrange;
+ info = lu_context_key_get(&env->le_ctx, &fld_thread_key);
+ LASSERT(info != NULL);
+ erange = &info->fti_lrange;
/* Lookup it in the cache. */
rc = fld_cache_lookup(fld->lsf_cache, seq, erange);
*out = *in;
/* For old 2.0 client, the 'lsr_flags' is uninitialized.
- * Set it as 'LU_SEQ_RANGE_MDT' by default.
- * Old 2.0 liblustre client cannot talk with new 2.1 server. */
- if (!(exp->exp_connect_flags & OBD_CONNECT_64BITHASH) &&
- !((exp->exp_connect_flags & OBD_CONNECT_MDS) &&
- (exp->exp_connect_flags & OBD_CONNECT_FID)) &&
- !(exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) &&
+ * Set it as 'LU_SEQ_RANGE_MDT' by default. */
+ if (!(exp_connect_flags(exp) & OBD_CONNECT_64BITHASH) &&
+ !(exp_connect_flags(exp) & OBD_CONNECT_MDS_MDS) &&
+ !(exp_connect_flags(exp) & OBD_CONNECT_LIGHTWEIGHT) &&
!exp->exp_libclient)
out->lsr_flags = LU_SEQ_RANGE_MDT;
fld->lsf_control_exp = NULL;
- /* Insert reserved sequence number of ".lustre" into fld cache. */
if (lsr_flags == LU_SEQ_RANGE_MDT) {
- range.lsr_start = FID_SEQ_DOT_LUSTRE;
+ /* Insert reserved sequence of "ROOT" and ".lustre"
+ * into fld cache. */
+ range.lsr_start = FID_SEQ_LOCAL_FILE;
range.lsr_end = FID_SEQ_DOT_LUSTRE + 1;
range.lsr_index = 0;
range.lsr_flags = lsr_flags;