X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Finclude%2Flustre_lmv.h;h=74d7937511df438764644911c2210c107a8236ff;hp=5d5afc8455cfb9b387a25e7b98a0d847223d6b23;hb=c23c68a52a04369101db2bd3b1d3da23025fcf48;hpb=ec4126dcee97eab9a377899221c05d3e15746ebf diff --git a/lustre/include/lustre_lmv.h b/lustre/include/lustre_lmv.h index 5d5afc8..74d79375 100644 --- a/lustre/include/lustre_lmv.h +++ b/lustre/include/lustre_lmv.h @@ -50,8 +50,6 @@ struct lmv_stripe_md { __u32 lsm_md_layout_version; __u32 lsm_md_migrate_offset; __u32 lsm_md_migrate_hash; - __u32 lsm_md_default_count; - __u32 lsm_md_default_index; char lsm_md_pool_name[LOV_MAXPOOLNAME + 1]; struct lmv_oinfo lsm_md_oinfo[0]; }; @@ -525,4 +523,25 @@ static inline bool lmv_is_fixed(const struct lmv_mds_md_v1 *lmv) return cpu_to_le32(lmv->lmv_hash_type) & LMV_HASH_FLAG_FIXED; } +static inline __u8 lmv_inherit_next(__u8 inherit) +{ + if (inherit == LMV_INHERIT_END || inherit == LMV_INHERIT_NONE) + return LMV_INHERIT_NONE; + + if (inherit == LMV_INHERIT_UNLIMITED || inherit > LMV_INHERIT_MAX) + return inherit; + + return inherit - 1; +} + +static inline __u8 lmv_inherit_rr_next(__u8 inherit_rr) +{ + if (inherit_rr == LMV_INHERIT_RR_NONE || + inherit_rr == LMV_INHERIT_RR_UNLIMITED || + inherit_rr > LMV_INHERIT_RR_MAX) + return inherit_rr; + + return inherit_rr - 1; +} + #endif