__u32);
__u64 (*store)(const struct lu_env *, const struct dt_it *);
int (*load)(const struct lu_env *, const struct dt_it *, __u64);
-int (*key_rec)(const struct lu_env *, const struct dt_it *, void *);
init
is called to allocate and initialize an instance of "iterator" which
cookie ->store() method returns. these two methods allow to implement
functionality like POSIX readdir where current position is stored as an
integer.
-key_rec
- is not used currently
3. Transactions
===============
int (*load)(const struct lu_env *env,
const struct dt_it *di,
__u64 hash);
-
- /**
- * Not used
- */
- int (*key_rec)(const struct lu_env *env,
- const struct dt_it *di,
- void *key_rec);
} dio_it;
};
return rc;
}
-static int lfsck_orphan_it_key_rec(const struct lu_env *env,
- const struct dt_it *di,
- void *key_rec)
-{
- return 0;
-}
-
static const struct dt_index_operations lfsck_orphan_index_ops = {
.dio_lookup = lfsck_orphan_index_lookup,
.dio_declare_insert = lfsck_orphan_index_declare_insert,
.rec = lfsck_orphan_it_rec,
.store = lfsck_orphan_it_store,
.load = lfsck_orphan_it_load,
- .key_rec = lfsck_orphan_it_key_rec,
}
};
return it->lit_obj->do_index_ops->dio_it.load(env, it->lit_it, hash);
}
-/**
- * Implementation of dt_it_ops::key_rec.
- *
- * Used with regular (non-striped) objects.
- *
- * \see dt_it_ops::rec() in the API description for details.
- */
-static int lod_it_key_rec(const struct lu_env *env, const struct dt_it *di,
- void *key_rec)
-{
- const struct lod_it *it = (const struct lod_it *)di;
-
- LOD_CHECK_IT(env, it);
- return it->lit_obj->do_index_ops->dio_it.key_rec(env, it->lit_it,
- key_rec);
-}
-
static const struct dt_index_operations lod_index_ops = {
.dio_lookup = lod_lookup,
.dio_declare_insert = lod_declare_insert,
.rec_size = lod_it_rec_size,
.store = lod_it_store,
.load = lod_it_load,
- .key_rec = lod_it_key_rec,
}
};
RETURN(rc);
}
-static int osd_otable_it_key_rec(const struct lu_env *env,
- const struct dt_it *di, void *key_rec)
-{
- return 0;
-}
-
const struct dt_index_operations osd_otable_ops = {
.dio_it = {
.init = osd_otable_it_init,
.rec = osd_otable_it_rec,
.store = osd_otable_it_store,
.load = osd_otable_it_load,
- .key_rec = osd_otable_it_key_rec,
}
};
RETURN(rc);
}
-static int osd_otable_it_key_rec(const struct lu_env *env,
- const struct dt_it *di, void *key_rec)
-{
- return 0;
-}
-
const struct dt_index_operations osd_otable_ops = {
.dio_it = {
.init = osd_otable_it_init,
.rec = osd_otable_it_rec,
.store = osd_otable_it_store,
.load = osd_otable_it_load,
- .key_rec = osd_otable_it_key_rec,
}
};
const struct dt_key *key);
void osp_it_put(const struct lu_env *env, struct dt_it *di);
__u64 osp_it_store(const struct lu_env *env, const struct dt_it *di);
-int osp_it_key_rec(const struct lu_env *env, const struct dt_it *di,
- void *key_rec);
int osp_it_next_page(const struct lu_env *env, struct dt_it *di);
/* osp_md_object.c */
int osp_md_declare_create(const struct lu_env *env, struct dt_object *dt,
.rec = osp_md_index_it_rec,
.store = osp_it_store,
.load = osp_it_load,
- .key_rec = osp_it_key_rec,
}
};
return rc;
}
-int osp_it_key_rec(const struct lu_env *env, const struct dt_it *di,
- void *key_rec)
-{
- return 0;
-}
-
static const struct dt_index_operations osp_orphan_index_ops = {
.dio_lookup = osp_orphan_index_lookup,
.dio_declare_insert = osp_orphan_index_declare_insert,
.rec = osp_orphan_it_rec,
.store = osp_it_store,
.load = osp_orphan_it_load,
- .key_rec = osp_it_key_rec,
}
};