Whamcloud - gitweb
LU-13077 pfl: cleanup xattr checking
[fs/lustre-release.git] / lustre / include / uapi / linux / lustre / lustre_user.h
index bec8c97..fdcc379 100644 (file)
@@ -755,6 +755,12 @@ static inline bool lov_pattern_supported_normal_comp(__u32 pattern)
 #define XATTR_LUSTRE_PREFIX    "lustre."
 #define XATTR_LUSTRE_LOV       XATTR_LUSTRE_PREFIX"lov"
 
+/* Please update if XATTR_LUSTRE_LOV".set" groks more flags in the future */
+#define allowed_lustre_lov(att) (strcmp((att), XATTR_LUSTRE_LOV".add") == 0 || \
+                       strcmp((att), XATTR_LUSTRE_LOV".set") == 0 || \
+                       strcmp((att), XATTR_LUSTRE_LOV".set.flags") == 0 || \
+                       strcmp((att), XATTR_LUSTRE_LOV".del") == 0)
+
 #define lov_user_ost_data lov_user_ost_data_v1
 struct lov_user_ost_data_v1 {     /* per-stripe data structure */
        struct ost_id l_ost_oi;   /* OST object ID */