* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
#include "fld_internal.h"
const char fld_index_name[] = "fld";
+EXPORT_SYMBOL(fld_index_name);
-static const struct dt_index_features fld_index_features = {
+const struct dt_index_features fld_index_features = {
.dif_flags = DT_IND_UPDATE,
.dif_keysize_min = sizeof(seqno_t),
.dif_keysize_max = sizeof(seqno_t),
.dif_recsize_min = sizeof(mdsno_t),
- .dif_recsize_max = sizeof(mdsno_t)
+ .dif_recsize_max = sizeof(mdsno_t),
+ .dif_ptrsize = 4
};
+EXPORT_SYMBOL(fld_index_features);
+
/*
* number of blocks to reserve for particular operations. Should be function of
* ... something. Stub for now.
rc = dt_obj->do_index_ops->dio_insert(env, dt_obj,
fld_rec(env, mds),
fld_key(env, seq),
- th, BYPASS_CAPA);
+ th, BYPASS_CAPA, 1);
dt_dev->dd_ops->dt_trans_stop(env, th);
} else
rc = PTR_ERR(th);
rc = dt_obj->do_index_ops->dio_lookup(env, dt_obj, rec,
fld_key(env, seq), BYPASS_CAPA);
- if (rc == 0)
+ if (rc > 0) {
*mds = be64_to_cpu(*(__u64 *)rec);
+ rc = 0;
+ } else
+ rc = -ENOENT;
RETURN(rc);
}
int rc;
ENTRY;
- dt_obj = dt_store_open(env, dt, fld_index_name, &fid);
+ dt_obj = dt_store_open(env, dt, "", fld_index_name, &fid);
if (!IS_ERR(dt_obj)) {
fld->lsf_obj = dt_obj;
rc = dt_obj->do_ops->do_index_try(env, dt_obj,