X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Fdt_object.h;h=3c342a8acdd425144dd549ee8634c7bcc7eed008;hb=6d185ec7e0c91daf5903f8d9e03e1d5b163b7fbb;hp=6cdd013359ce3eea02ffb8f6acc3b07f89aa4f46;hpb=f6d6a552398eb1e65857d9bf1afaaf98c8dc1a79;p=fs%2Flustre-release.git diff --git a/lustre/include/dt_object.h b/lustre/include/dt_object.h index 6cdd013..3c342a8 100644 --- a/lustre/include/dt_object.h +++ b/lustre/include/dt_object.h @@ -262,6 +262,7 @@ struct dt_object_format { enum dt_format_type dof_type; union { struct dof_regular { + int striped; } dof_reg; struct dof_dir { } dof_dir; @@ -382,6 +383,7 @@ struct dt_object_operations { void (*do_ah_init)(const struct lu_env *env, struct dt_allocation_hint *ah, struct dt_object *parent, + struct dt_object *child, cfs_umode_t child_mode); /** * Create new object on this device. @@ -842,6 +844,19 @@ struct dt_object *local_file_find_or_create_with_fid(const struct lu_env *env, struct dt_object *parent, const char *name, __u32 mode); +struct dt_object * +local_index_find_or_create(const struct lu_env *env, + struct local_oid_storage *los, + struct dt_object *parent, + const char *name, __u32 mode, + const struct dt_index_features *ft); +struct dt_object * +local_index_find_or_create_with_fid(const struct lu_env *env, + struct dt_device *dt, + const struct lu_fid *fid, + struct dt_object *parent, + const char *name, __u32 mode, + const struct dt_index_features *ft); int dt_lookup_dir(const struct lu_env *env, struct dt_object *dir, const char *name, struct lu_fid *fid); @@ -868,6 +883,15 @@ int dt_record_read(const struct lu_env *env, struct dt_object *dt, struct lu_buf *buf, loff_t *pos); int dt_record_write(const struct lu_env *env, struct dt_object *dt, const struct lu_buf *buf, loff_t *pos, struct thandle *th); +typedef int (*dt_index_page_build_t)(const struct lu_env *env, + union lu_page *lp, int nob, + const struct dt_it_ops *iops, + struct dt_it *it, __u32 attr, void *arg); +int dt_index_walk(const struct lu_env *env, struct dt_object *obj, + const struct lu_rdpg *rdpg, dt_index_page_build_t filler, + void *arg); +int dt_index_read(const struct lu_env *env, struct dt_device *dev, + struct idx_info *ii, const struct lu_rdpg *rdpg); static inline struct thandle *dt_trans_create(const struct lu_env *env, struct dt_device *d) @@ -1352,6 +1376,18 @@ static inline int dt_commit_async(const struct lu_env *env, return dev->dd_ops->dt_commit_async(env, dev); } +static inline int dt_init_capa_ctxt(const struct lu_env *env, + struct dt_device *dev, + int mode, unsigned long timeout, + __u32 alg, struct lustre_capa_key *keys) +{ + LASSERT(dev); + LASSERT(dev->dd_ops); + LASSERT(dev->dd_ops->dt_init_capa_ctxt); + return dev->dd_ops->dt_init_capa_ctxt(env, dev, mode, + timeout, alg, keys); +} + static inline int dt_lookup(const struct lu_env *env, struct dt_object *dt, struct dt_rec *rec,