4967a3eb9d
The registered xattr .list handler was simplified in the 4.5 kernel to only perform a permission check. Given a dentry for the file it must return a boolean indicating if the name is visible. This differs slightly from the previous APIs which also required the function to copy the name in to the provided list and return its size. That is now all the responsibility of the caller. This should be straight forward change to make to ZoL since we've always required the caller to make the copy. However, this was slightly complicated by the need to support 3 older APIs. Yes, between 2.6.32 and 4.5 there are 4 versions of this interface! Therefore, while the functional change in this patch is small it includes significant cleanup to make the code understandable and maintainable. These changes include: - Improved configure checks for .list, .get, and .set interfaces. - Interfaces checked from newest to oldest. - Strict checking for each possible known interface. - Configure fails when no known interface is available. - HAVE_*_XATTR_LIST renamed HAVE_XATTR_LIST_* for consistency with similar iops and fops configure checks. - POSIX_ACL_XATTR_{DEFAULT|ACCESS} were removed forcing callers to move to their replacements, XATTR_NAME_POSIX_ACL_{DEFAULT|ACCESS}. Compatibility wrapper were added for old kernels. - ZPL_XATTR_LIST_WRAPPER added which behaves the same as the existing ZPL_XATTR_{GET|SET} WRAPPERs. Only the inode is guaranteed to be a valid pointer, passing NULL for the 'list' and 'name' variables is allowed and must be checked for. All .list functions were updated to use the wrapper to aid readability. - zpl_xattr_filldir() updated to use the .list function for its permission check which is consistent with the updated Linux 4.5 interface. If a .list function is registered it should return 0 to indicate a name should be skipped, if there is no registered function the name will be added. - Additional documentation from xattr(7) describing the correct behavior for each namespace was added before the relevant handlers. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Chase <tim@chase2k.com> Signed-off-by: Chunwei Chen <tuxoko@gmail.com> Issue #4228 |
||
---|---|---|
.. | ||
.gitignore | ||
always-no-bool-compare.m4 | ||
always-no-unused-but-set-variable.m4 | ||
config.awk | ||
deb.am | ||
kernel-acl.m4 | ||
kernel-automount.m4 | ||
kernel-bdev-block-device-operations.m4 | ||
kernel-bdev-logical-size.m4 | ||
kernel-bdev-physical-size.m4 | ||
kernel-bdi-setup-and-register.m4 | ||
kernel-bio-bvec-iter.m4 | ||
kernel-bio-end-io-t-args.m4 | ||
kernel-bio-failfast.m4 | ||
kernel-bio-rw-barrier.m4 | ||
kernel-bio-rw-discard.m4 | ||
kernel-blk-queue-flush.m4 | ||
kernel-blk-queue-max-hw-sectors.m4 | ||
kernel-blk-queue-max-segments.m4 | ||
kernel-blkdev-get-by-path.m4 | ||
kernel-blkdev-get.m4 | ||
kernel-block-device-operations-release-void.m4 | ||
kernel-clear-inode.m4 | ||
kernel-commit-metadata.m4 | ||
kernel-create-nameidata.m4 | ||
kernel-current_bio_tail.m4 | ||
kernel-d-make-root.m4 | ||
kernel-d-obtain-alias.m4 | ||
kernel-d-prune-aliases.m4 | ||
kernel-declare-event-class.m4 | ||
kernel-dentry-operations.m4 | ||
kernel-dirty-inode.m4 | ||
kernel-discard-granularity.m4 | ||
kernel-elevator-change.m4 | ||
kernel-encode-fh-inode.m4 | ||
kernel-evict-inode.m4 | ||
kernel-fallocate.m4 | ||
kernel-file-inode.m4 | ||
kernel-fmode-t.m4 | ||
kernel-follow-down-one.m4 | ||
kernel-fsync.m4 | ||
kernel-generic_io_acct.m4 | ||
kernel-get-disk-ro.m4 | ||
kernel-get-gendisk.m4 | ||
kernel-get-link.m4 | ||
kernel-insert-inode-locked.m4 | ||
kernel-invalidate-bdev-args.m4 | ||
kernel-is_owner_or_cap.m4 | ||
kernel-kmap-atomic-args.m4 | ||
kernel-kobj-name-len.m4 | ||
kernel-lookup-bdev.m4 | ||
kernel-lookup-nameidata.m4 | ||
kernel-lseek-execute.m4 | ||
kernel-mk-request-fn.m4 | ||
kernel-mkdir-umode-t.m4 | ||
kernel-mount-nodev.m4 | ||
kernel-open-bdev-exclusive.m4 | ||
kernel-put-link.m4 | ||
kernel-security-inode-init.m4 | ||
kernel-set-nlink.m4 | ||
kernel-sget-args.m4 | ||
kernel-show-options.m4 | ||
kernel-shrink.m4 | ||
kernel-truncate-range.m4 | ||
kernel-truncate-setsize.m4 | ||
kernel-vfs-iterate.m4 | ||
kernel-vfs-rw-iterate.m4 | ||
kernel-xattr-handler.m4 | ||
kernel.m4 | ||
mount-helper.m4 | ||
rpm.am | ||
Rules.am | ||
suppressed-warnings.txt | ||
tgz.am | ||
user-arch.m4 | ||
user-dracut.m4 | ||
user-frame-larger-than.m4 | ||
user-libblkid.m4 | ||
user-libuuid.m4 | ||
user-runstatedir.m4 | ||
user-systemd.m4 | ||
user-sysvinit.m4 | ||
user-udev.m4 | ||
user-zlib.m4 | ||
user.m4 | ||
zfs-build.m4 | ||
zfs-meta.m4 |