LASSERT(name != NULL);
LASSERT(tar->ft_srv != NULL || tar->ft_exp != NULL);
- if (fld->lcf_flags != LUSTRE_FLD_INIT) {
- CERROR("%s: Attempt to add target %s (idx "LPU64") "
- "on fly - skip it\n", fld->lcf_name, name,
- tar->ft_idx);
- RETURN(0);
- } else {
- CDEBUG(D_INFO, "%s: Adding target %s (idx "
- LPU64")\n", fld->lcf_name, name, tar->ft_idx);
- }
+ CDEBUG(D_INFO, "%s: Adding target %s (idx "LPU64")\n", fld->lcf_name,
+ name, tar->ft_idx);
OBD_ALLOC_PTR(target);
if (target == NULL)
RETURN(-EINVAL);
}
- fld->lcf_count = 0;
+ fld->lcf_count = 0;
spin_lock_init(&fld->lcf_lock);
- fld->lcf_hash = &fld_hash[hash];
- fld->lcf_flags = LUSTRE_FLD_INIT;
+ fld->lcf_hash = &fld_hash[hash];
INIT_LIST_HEAD(&fld->lcf_targets);
cache_size = FLD_CLIENT_CACHE_SIZE /
int rc;
ENTRY;
- fld->lcf_flags |= LUSTRE_FLD_RUN;
-
- rc = fld_cache_lookup(fld->lcf_cache, seq, &res);
- if (rc == 0) {
- *mds = res.lsr_index;
- RETURN(0);
- }
+ rc = fld_cache_lookup(fld->lcf_cache, seq, &res);
+ if (rc == 0) {
+ *mds = res.lsr_index;
+ RETURN(0);
+ }
/* Can not find it in the cache */
target = fld_client_get_target(fld, seq);