-
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
lsattr is broken #1691
Comments
@behlendorf This is a development blocker for the Pentoo Linux project (run by another Gentoo developer), so I consider fixing this to be a high priority. I promised the Pentoo Linux project that I would write a fix within 24 hours. Making Gentoo Portage happy requires only implementing ZFS_IOC_GETFLAGS, which makes this a proper subset of #229, rather than a duplicate. It would be appropriate to reopen this, but I cannot do that because you closed it. |
Unlikely it helps with the Linux version, we had to implement flags in OSX. Only weirdness was that OSX would sometimes set "only flags" when ZFS expects "flags AND mode". We have to look up mode in this case: https://github.com/zfs-osx/zfs/blob/master/module/zfs/zfs_vnops_osx.c#L572 and Darwins flag mapping https://github.com/zfs-osx/zfs/blob/master/module/zfs/zfs_vnops_osx_lib.c#L377 |
Gentoo Portage's FEATURES=xattr breaks because python's xattr.list() reads regular atrributes too. We implement FS_IOC_GETFLAGS to fix this. Only flags common to both both Linux and Solaris are returned. Flags cannot be set until FS_IOC_SETFLAGS is implemented. Issue openzfs#1691 Original-patch-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]>
I have opened a pull request for the read case, which should be sufficient to make Gentoo Portage's FEATURES=xattr work and anything else that depends on python's xattr.list(). I consider the write case to be a separate issue with lower priority. |
Gentoo Portage's FEATURES=xattr breaks because python's xattr.list() reads regular atrributes too. We implement FS_IOC_GETFLAGS to fix this. Only flags common to both both Linux and Solaris are returned. Flags cannot be set until FS_IOC_SETFLAGS is implemented. 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 openzfs#229 should implement something equivalent. Closes openzfs#1691 Original-patch-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]>
Gentoo Portage's FEATURES=xattr breaks because python's xattr.list() reads regular attributes. Implementing FS_IOC_GETFLAGS fixes this. Only flags common to both both Linux and Solaris are returned. Flags cannot be set until FS_IOC_SETFLAGS is implemented. 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 openzfs#229 should implement something equivalent. Closes openzfs#1691 Original-patch-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]>
Gentoo Portage's FEATURES=xattr breaks because python's xattr.list() reads regular attributes. Implementing FS_IOC_GETFLAGS fixes this. Only flags common to both Linux and Solaris are returned. Flags cannot be set until FS_IOC_SETFLAGS is implemented. 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 openzfs#229 should implement something equivalent. Closes openzfs#1691 Original-patch-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]>
@ryao The FS_IOC_GETFLAGS implementation looks reasonable and if it resolves an issue you're having with Gentoo Portage by all means pull it in. I may have caused this when I merged 88c2839 to return the correct error codes. However, I'd prefer to avoid pulling this work in upstream until we have a working get and set. It doesn't look like a lot of work to get there if we just handle the attributes which map directly. My suggestion would be to do something similar to what @lundman suggests. This is in fact almost all done in the original patch. We should just need to fill in the xvattr for There are existing test cases in xfstests to verify this was done correctly. @ryao and chance I can persuade you to finish the write side of this as well? |
@behlendorf The approach taken in behlendorf/zfs@d80bd25 risks clearing existing attributes that cannot be set by the GNU chattr. It also treats the output of copy_from_user() as an error code when it returns the number of bytes that could not be copied upon error. I will take some time to do the write case. |
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 openzfs#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 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 openzfs#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 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 openzfs#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 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 openzfs#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 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 openzfs#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 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 openzfs#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 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 openzfs#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 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 openzfs#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 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 openzfs#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 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 openzfs#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 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 openzfs#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 openzfs#1691 Original-patch-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]>
We add support for lsattr and chattr. This resolves a regression caused by 88c2839 that broke python's xattr.list(). This broke Gentoo Portage's FEATURES=xattr, which depended on this. 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 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 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 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 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 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]> Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#1691
lsattr and python's xattr.list() use an ioctl instead of the VFS call, which is not currently supported:
https://github.com/zfsonlinux/zfs/blob/master/module/zfs/zpl_file.c#L480
The result is that anything using it breaks. This includes Gentoo Portage's FEATURES=xattr:
https://bugs.gentoo.org/show_bug.cgi?id=483516
The text was updated successfully, but these errors were encountered: