X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Fuapi%2Flinux%2Flustre%2Flustre_user.h;h=25a3642747fb4ef0224e8673892252d7ead11eea;hb=refs%2Fchanges%2F96%2F50796%2F5;hp=151dbf86a400f3054357d5f3dc5e8b9243b89ede;hpb=594b780062db7e015837faefa75f7352293f54ae;p=fs%2Flustre-release.git diff --git a/lustre/include/uapi/linux/lustre/lustre_user.h b/lustre/include/uapi/linux/lustre/lustre_user.h index 151dbf8..25a3642 100644 --- a/lustre/include/uapi/linux/lustre/lustre_user.h +++ b/lustre/include/uapi/linux/lustre/lustre_user.h @@ -1106,6 +1106,16 @@ static inline bool lmv_is_known_hash_type(__u32 type) #define LMV_HASH_FLAG_KNOWN 0xbe000000 +/* migration failure may leave hash type as + * LMV_HASH_TYPE_UNKNOWN|LMV_HASH_FLAG_BAD_TYPE, which should be treated as + * sane, so such directory can be accessed (resume migration or unlink). + */ +static inline bool lmv_is_sane_hash_type(__u32 type) +{ + return lmv_is_known_hash_type(type) || + type == (LMV_HASH_TYPE_UNKNOWN | LMV_HASH_FLAG_BAD_TYPE); +} + /* both SPLIT and MIGRATION are set for directory split */ static inline bool lmv_hash_is_splitting(__u32 hash) {