Whamcloud - gitweb
LU-5434 mdd: disregard empty POSIX ACLs
Some files may have a POSIX ACL consisting of only a struct
posix_acl_xattr_header, resulting in unexpected permission errors.
Update mdd_check_acl() to return -EAGAIN when such ACLs are
encountered so the caller falls back to standard UNIX
permissions.
These empty ACLs originate from tools like cp. In some cases (e.g.
'cp -rp') just POSIX_ACL_XATTR_VERSION is given as the value of the
system.posix_acl_default extended attribute. Lustre accepts and
stores this value on disk, and the bad default ACL then propagates
from directories to newly created directory entries. Separate
patches will prevent the storage of these bad ACLs. This patch
mitigates problems caused by the ones already stored.
Other minor updates:
- Use the kernel function posix_acl_xattr_count() to count the
number of ACL entries.
- Convert remainder of mdd_check_acl() to TAB indentation.
Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: Ib4f7b3874696b7645b9de3f1f10ef45dc4105646
Reviewed-on: http://review.whamcloud.com/11300
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>