* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
}
EXPORT_SYMBOL(fld_client_del_target);
-static void fld_client_proc_fini(struct lu_client_fld *fld);
-
#ifdef LPROCFS
static int fld_client_proc_init(struct lu_client_fld *fld)
{
return rc;
}
-static void fld_client_proc_fini(struct lu_client_fld *fld)
+void fld_client_proc_fini(struct lu_client_fld *fld)
{
ENTRY;
if (fld->lcf_proc_dir) {
return 0;
}
-static void fld_client_proc_fini(struct lu_client_fld *fld)
+void fld_client_proc_fini(struct lu_client_fld *fld)
{
return;
}
#endif
+EXPORT_SYMBOL(fld_client_proc_fini);
+
static inline int hash_is_sane(int hash)
{
return (hash >= 0 && hash < ARRAY_SIZE(fld_hash));
struct lu_fld_target *target, *tmp;
ENTRY;
- fld_client_proc_fini(fld);
-
cfs_spin_lock(&fld->lcf_lock);
cfs_list_for_each_entry_safe(target, tmp,
&fld->lcf_targets, ft_chain) {
return rc;
}
-int fld_client_lookup(struct lu_client_fld *fld,
- seqno_t seq, mdsno_t *mds,
- const struct lu_env *env)
+int fld_client_lookup(struct lu_client_fld *fld, seqno_t seq, mdsno_t *mds,
+ __u32 flags, const struct lu_env *env)
{
struct lu_seq_range res;
struct lu_fld_target *target;
rc = fld_cache_lookup(fld->lcf_cache, seq, &res);
if (rc == 0) {
- *mds = res.lsr_mdt;
+ *mds = res.lsr_index;
RETURN(0);
}
fld_target_name(target), target->ft_idx);
res.lsr_start = seq;
+ res.lsr_flags = flags;
#ifdef __KERNEL__
if (target->ft_srv != NULL) {
LASSERT(env != NULL);
#endif
if (rc == 0) {
- *mds = res.lsr_mdt;
+ *mds = res.lsr_index;
fld_cache_insert(fld->lcf_cache, &res);
}