Closed adammoody closed 2 years ago
@ofaaland , would you please review this when you get a chance? If you have suggestions, please let me know.
In case someone doesn't have libattr installed, I protected the libattr-related lines with a HAVE_LIBATTR
check. For now, I've left the cmake check as required, but we could likely back that off to make it optional.
I also dropped the input ctx
variable and replaced it with NULL since we weren't using it anyway. To use, I think we'd want to fill in the fields of the struct with pointers to functions, as in the example here:
@adammoody To be clear, the current (and intended) behavior is that libattr
is required when ENABLE_XATTRS=ON
?
@daltonbohning , yes, that's the goal, but we're assuming that one has libattr available. If we find common setups that use xattrs but do not have libattr installed, I think we could do more work to make libattr optional.
@daltonbohning , yes, that's the goal, but we're assuming that one has libattr available. If we find common setups that use xattrs but do not have libattr installed, I think we could do more work to make libattr optional.
@adammoody Thanks. Luckily, so far it seems our (DAOS) setups do have libattr installed/available.
This adds a cmake find_package check for libattr, which is used for
attr_copy_action
when copying extended attributes. When xattr support is enabled, libattr is marked as required. However, this also adds compile-time checks in the code to disable libattr code if is was not found so that it could be optional rather than required.