+/*
+ * BSD flags manipulation arguments.
+ *
+ * This provides a safe way to update the BSD flags field of an inode,
+ * which has some user components as well as some system components.
+ * What it provides is a compare-and-swap operation, whereby the caller
+ * fetches what the expected flags are, computes the new set, and then
+ * provides the old along with the new. If the old that's provided matches
+ * what's actually in the inode, the new value is set. The actual inode
+ * value is returned to the caller, and expected == actual is how the
+ * caller can determine that the operation succeeded.
+ *
+ * Some BSD flags (e.g. UF_COMPRESSED) can only be manipulated via this
+ * safe mechanism.
+ */
+struct fsioc_cas_bsdflags {
+ uint32_t expected_flags; /* [IN] expected flags */
+ uint32_t new_flags; /* [IN] new value to set */
+ uint32_t actual_flags; /* [OUT] the actual flags in inode */
+};