X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Flod%2Flod_internal.h;h=ac1d25616941167b1fdfbda58ecd58e2f169bb4e;hb=a213c3341903ff553df2e1cc42dd14a7b3d98845;hp=d4928c795fd90579c62db4d92e0da203e73118d0;hpb=8d3c7316fc94297e1d92f4ec31cf941a389f6f82;p=fs%2Flustre-release.git diff --git a/lustre/lod/lod_internal.h b/lustre/lod/lod_internal.h index d4928c79..ac1d256 100644 --- a/lustre/lod/lod_internal.h +++ b/lustre/lod/lod_internal.h @@ -278,11 +278,11 @@ struct lod_thread_info { struct lu_attr lti_attr; struct lod_it lti_it; struct ldlm_res_id lti_res_id; - - /* used to hold lu_dirent, NAME_MAX + sizeof(struct lu_dirent) */ - char lti_key[NAME_MAX + sizeof(struct lu_dirent)]; - + /* used to hold lu_dirent, sizeof(struct lu_dirent) + NAME_MAX */ + char lti_key[sizeof(struct lu_dirent) + NAME_MAX]; struct dt_object_format lti_format; + struct lu_name lti_name; + struct lu_buf lti_linkea_buf; }; extern const struct lu_device_operations lod_lu_ops; @@ -358,6 +358,17 @@ static inline struct lod_thread_info *lod_env_info(const struct lu_env *env) return info; } +static inline struct lu_name * +lod_name_get(const struct lu_env *env, const void *area, int len) +{ + struct lu_name *lname; + + lname = &lod_env_info(env)->lti_name; + lname->ln_name = area; + lname->ln_namelen = len; + return lname; +} + #define lod_foreach_ost(__dev, index) \ if ((__dev)->lod_osts_size > 0) \ cfs_foreach_bit((__dev)->lod_ost_bitmap, (index)) @@ -414,7 +425,8 @@ int lod_initialize_objects(const struct lu_env *env, struct lod_object *mo, struct lov_ost_data_v1 *objs); int lod_store_def_striping(const struct lu_env *env, struct dt_object *dt, struct thandle *th); -int lod_verify_striping(struct lod_device *d, const struct lu_buf *buf, int specific); +int lod_verify_striping(struct lod_device *d, const struct lu_buf *buf, + bool is_from_disk); int lod_generate_and_set_lovea(const struct lu_env *env, struct lod_object *mo, struct thandle *th); int lod_ea_store_resize(struct lod_thread_info *info, int size);