- /*
- * Do not return result of calling fld_cache_insert()
- * here. First of all because it may return -EEXIST. Another
- * reason is that, we do not want to stop proceeding because of
- * cache errors.
- */
- fld_cache_insert(fld->lcf_cache, seq, mds);
- } else {
- CERROR("%s: Can't create FLD entry, rc %d\n",
- fld->lcf_name, rc);
- }
-
- RETURN(rc);
-}
-EXPORT_SYMBOL(fld_client_create);
-
-int fld_client_delete(struct lu_client_fld *fld, seqno_t seq,
- const struct lu_env *env)
-{
- struct md_fld md_fld = { .mf_seq = seq, .mf_mds = 0 };
- struct lu_fld_target *target;
- int rc;
- ENTRY;
-
- fld->lcf_flags |= LUSTRE_FLD_RUN;
- fld_cache_delete(fld->lcf_cache, seq);
-
- target = fld_client_get_target(fld, seq);
- LASSERT(target != NULL);
-
- CDEBUG(D_INFO, "%s: Delete fld entry (seq: "LPX64") on "
- "target %s (idx "LPU64")\n", fld->lcf_name, seq,
- fld_target_name(target), target->ft_idx);
-
-#ifdef __KERNEL__
- if (target->ft_srv != NULL) {
- LASSERT(env != NULL);
- rc = fld_server_delete(target->ft_srv,
- env, seq);
- } else {
-#endif
- rc = fld_client_rpc(target->ft_exp,
- &md_fld, FLD_DELETE);
-#ifdef __KERNEL__
- }
-#endif
-
- RETURN(rc);
-}
-EXPORT_SYMBOL(fld_client_delete);
-
-int fld_client_lookup(struct lu_client_fld *fld,
- seqno_t seq, mdsno_t *mds,
- const struct lu_env *env)
-{
- struct md_fld md_fld = { .mf_seq = seq, .mf_mds = 0 };
- struct lu_fld_target *target;
- int rc;
- ENTRY;
-
- fld->lcf_flags |= LUSTRE_FLD_RUN;
-
- rc = fld_cache_lookup(fld->lcf_cache, seq, mds);
- if (rc == 0)