-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement File Attribute Support #1693
Conversation
I consider this to be a high priority fix because it affects Gentoo Portage. https://bugs.gentoo.org/show_bug.cgi?id=483516 I have asked the Gentoo developer who encountered this problem to verify that it fixes it. I intend to fast track its inclusion into Gentoo's ZFS packaging. I plan to commit a revision to Gentoo's ZFS kernel package tomorrow that includes this unless an issue is found before then. |
@ryao Is this still something you're working on? |
@behlendorf I am trying to focus on the ZIO buffers right now. I plan to revisit this after I have my initial patches ready. |
I'm affected by this bug as well. Is it possible to move this to milestone 0.6.3 as is, and the enhanced version you're discussing to 0.6.4 ? |
@aarcane Maybe, I'd love to get this in 0.6.3 as well but it really just comes down to how much developer time is available. We'll try. |
@behlendorf @aarcane I have refreshed this pull request. The new patch addresses previous criticisms and passes XFS Test generic/079 on my system, which tests the immutable and append bits. |
@ryao Aside from the inline comments the general approach here looks good and it passed my local testing. If you can just address the comments and refresh the patch we should be able to get it in. |
@behlendorf The pull request has been refreshed. The changes since your review a 6 hours ago should only be to make corrections for the points you made. My system is preoccupied running ztest, so I am not at liberty to do my usual regression tests. While I do not expect there to be any regressions, I am relying on your systems to catch any mistakes with this refresh. |
@ryao The updated autoconf check fails incorrectly for the older interface. Including
diff --git a/config/kernel-is_owner_or_cap.m4 b/config/kernel-is_owner_or_cap.m4
index 7e34c66..d7e81c0 100644
--- a/config/kernel-is_owner_or_cap.m4
+++ b/config/kernel-is_owner_or_cap.m4
@@ -18,10 +18,11 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_OWNER_OR_CAPABLE], [
AC_MSG_RESULT(no)
AC_MSG_CHECKING([whether is_owner_or_cap() exists])
ZFS_LINUX_TRY_COMPILE([
+ #include <linux/sched.h>
#include <linux/fs.h>
],[
struct inode *ip = NULL;
- is_owner_or_cap(ip);
+ (void) is_owner_or_cap(ip);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_IS_OWNER_OR_CAP, 1, [is_owner_or_cap() ex |
@ryao Just a few more markups, can you refresh it again. |
We need inode_owner_or_capable() for ZFS file attributes in addition to xattrs, so it should go into its own file. This moves it into its own file and changes it to be more comprehensive. It will now fail if no known good API is detected. Signed-off-by: Richard Yao <[email protected]>
We add support for lsattr and chattr to resolve a regression caused by 88c2839 that broke Python's xattr.list(). That changet broke Gentoo Portage's FEATURES=xattr, which depended on Python's xattr.list(). Only attributes common to both Solaris and Linux are supported. These are 'a', 'd' and 'i' in Linux's lsattr and chattr commands. File attributes exclusive to Solaris are present in the ZFS code, but cannot be accessed or modified through this method. That was the case prior to this patch. The resolution of issue openzfs#229 should implement some method to permit access and modification of Solaris-specific attributes. https://bugs.gentoo.org/show_bug.cgi?id=483516 Issue openzfs#1691 Original-patch-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]>
We add support for lsattr and chattr. Only attributes common to both
Solaris and Linux are supported. These are 'a', 'd' and 'i'. File
attributes exclusive to Solaris are present in the ZFS code, but cannot
be accessed or modified through this method. That was the case prior to
this patch.
This commit removes the ZFS_IOC_GETFLAGS and ZFS_IOC_SETFLAGS macros in
recognition that this is not equivalent to the Solaris operation. The
resolution of issue #229 should implement something
equivalent that will permit access and modification of Solaris-specific
attributes.
This resolves a regression caused by
88c2839 that broke python's
xattr.list(). This broke Gentoo Portage's FEATURES=xattr, which depended
on this.
https://bugs.gentoo.org/show_bug.cgi?id=483516
Issue #1691
Original-patch-by: Brian Behlendorf [email protected]
Signed-off-by: Richard Yao [email protected]