X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Flov%2Flov_cl_internal.h;h=b8114514714deff4ffd1839c1b6dd171a51dbeae;hb=8d6d2914cf85be0508805cd5195163e1959652f4;hp=485f706962c8c25427a1ee3a20c7ebaeead22814;hpb=ccabce23bd9e366c345c852f565766a799f61238;p=fs%2Flustre-release.git diff --git a/lustre/lov/lov_cl_internal.h b/lustre/lov/lov_cl_internal.h index 485f706..b811451 100644 --- a/lustre/lov/lov_cl_internal.h +++ b/lustre/lov/lov_cl_internal.h @@ -122,6 +122,7 @@ enum lov_layout_type { LLT_EMPTY, /** empty file without body (mknod + truncate) */ LLT_RELEASED, /** file with no objects (data in HSM) */ LLT_COMP, /** support composite layout */ + LLT_FOREIGN, /** foreign layout */ LLT_NR }; @@ -134,6 +135,8 @@ static inline char *llt2str(enum lov_layout_type llt) return "RELEASED"; case LLT_COMP: return "COMPOSITE"; + case LLT_FOREIGN: + return "FOREIGN"; case LLT_NR: LBUG(); } @@ -147,9 +150,10 @@ static inline char *llt2str(enum lov_layout_type llt) */ static inline __u32 lov_entry_type(struct lov_stripe_md_entry *lsme) { - if ((lov_pattern(lsme->lsme_pattern) == LOV_PATTERN_RAID0) || + if ((lov_pattern(lsme->lsme_pattern) & LOV_PATTERN_RAID0) || (lov_pattern(lsme->lsme_pattern) == LOV_PATTERN_MDT)) - return lov_pattern(lsme->lsme_pattern); + return lov_pattern(lsme->lsme_pattern & + ~LOV_PATTERN_OVERSTRIPING); return 0; } @@ -352,14 +356,14 @@ static inline struct lov_stripe_md_entry *lov_lse(struct lov_object *lov, int i) static inline unsigned lov_flr_state(const struct lov_object *lov) { if (lov->lo_type != LLT_COMP) - return LCM_FL_NOT_FLR; + return LCM_FL_NONE; return lov->u.composite.lo_flags & LCM_FL_FLR_MASK; } static inline bool lov_is_flr(const struct lov_object *lov) { - return lov_flr_state(lov) != LCM_FL_NOT_FLR; + return lov_flr_state(lov) != LCM_FL_NONE; } static inline struct lov_layout_entry *lov_entry(struct lov_object *lov, int i) @@ -433,8 +437,6 @@ struct lov_lock { struct lov_page { struct cl_page_slice lps_cl; - /** layout_entry + stripe index, composed using lov_comp_index() */ - unsigned int lps_index; /* the layout gen when this page was created */ __u32 lps_layout_gen; }; @@ -463,18 +465,13 @@ struct lov_sublock_env { struct cl_io *lse_io; }; -struct lovsub_page { - struct cl_page_slice lsb_cl; -}; - - struct lov_thread_info { struct cl_object_conf lti_stripe_conf; struct lu_fid lti_fid; struct ost_lvb lti_lvb; struct cl_2queue lti_cl2q; struct cl_page_list lti_plist; - wait_queue_t lti_waiter; + wait_queue_entry_t lti_waiter; }; /** @@ -507,7 +504,6 @@ struct lov_io_sub { * \see cl_env_get() */ __u16 sub_refcheck; - __u16 sub_reenter; }; /** @@ -624,15 +620,16 @@ struct lov_io_sub *lov_sub_get(const struct lu_env *env, struct lov_io *lio, int lov_page_init (const struct lu_env *env, struct cl_object *ob, struct cl_page *page, pgoff_t index); -int lovsub_page_init (const struct lu_env *env, struct cl_object *ob, - struct cl_page *page, pgoff_t index); int lov_page_init_empty (const struct lu_env *env, struct cl_object *obj, struct cl_page *page, pgoff_t index); int lov_page_init_composite(const struct lu_env *env, struct cl_object *obj, struct cl_page *page, pgoff_t index); +int lov_page_init_foreign(const struct lu_env *env, struct cl_object *obj, + struct cl_page *page, pgoff_t index); struct lu_object *lov_object_alloc (const struct lu_env *env, const struct lu_object_header *hdr, struct lu_device *dev); + struct lu_object *lovsub_object_alloc(const struct lu_env *env, const struct lu_object_header *hdr, struct lu_device *dev); @@ -781,13 +778,6 @@ static inline struct lov_page *cl2lov_page(const struct cl_page_slice *slice) return container_of0(slice, struct lov_page, lps_cl); } -static inline struct lovsub_page * -cl2lovsub_page(const struct cl_page_slice *slice) -{ - LINVRNT(lovsub_is_object(&slice->cpl_obj->co_lu)); - return container_of0(slice, struct lovsub_page, lsb_cl); -} - static inline struct lov_io *cl2lov_io(const struct lu_env *env, const struct cl_io_slice *ios) {