Whamcloud - gitweb
LU-12616 obclass: fix MDS start/stop race
[fs/lustre-release.git] / lustre / utils / lustreapi_internal.h
index 92e4994..c0662b4 100644 (file)
@@ -144,7 +144,9 @@ static inline bool llapi_dir_stripe_index_is_valid(int64_t index)
 
 static inline bool llapi_dir_hash_type_is_valid(int64_t hash)
 {
-       return hash > LMV_HASH_TYPE_UNKNOWN && hash <  LMV_HASH_TYPE_MAX;
+       int64_t _hash = hash & LMV_HASH_TYPE_MASK;
+
+       return _hash > LMV_HASH_TYPE_UNKNOWN && _hash <  LMV_HASH_TYPE_MAX;
 }
 
 /*
@@ -155,4 +157,12 @@ int libcfs_ukuc_stop(struct lustre_kernelcomm *l);
 int libcfs_ukuc_get_rfd(struct lustre_kernelcomm *link);
 int libcfs_ukuc_msg_get(struct lustre_kernelcomm *l, char *buf, int maxsize,
                        int transport);
+
+enum get_lmd_info_type {
+       GET_LMD_INFO = 1,
+       GET_LMD_STRIPE = 2,
+};
+
+int get_lmd_info_fd(char *path, int parentfd, int dirfd,
+                   void *lmd_buf, int lmd_len, enum get_lmd_info_type type);
 #endif /* _LUSTREAPI_INTERNAL_H_ */