Whamcloud - gitweb
LU-14430 mdd: fix inheritance of big default ACLs 94/41494/6
authorMikhail Pershin <mpershin@whamcloud.com>
Fri, 12 Feb 2021 07:16:24 +0000 (10:16 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 22 Feb 2021 19:26:24 +0000 (19:26 +0000)
commitf3d03bc38a3afdef83635d578ee0b2ffdd985685
tree98009976fd5785f1e191c7d8f9a3b4f6ba280727
parent7c0f6912e6bd1e0f18f4be5dd5d750d989fa7ce6
LU-14430 mdd: fix inheritance of big default ACLs

If the number of default ACLs in directory is more than 31, then
mdd_acl_init() fails to inherit them for a newly created file.
This limitation is caused by using a fixed-size def_acl_buf buffer
in the mdd_create()->mdd_acl_init() call chain. Instead, the
default ACL buffer should be increased when it is needed.

Patch adds check for -ERANGE after mdd_acl_init(), reallocates
default ACL buffer with required size and calls mdd_acl_init()
again. Thus big default ACL are processed as expected.

Fixes: 6350af100c20 ("LU-3437 mdd: Fix ACL/def_ACL during object creation")
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I700da90c09f824955fcb8dc7ca0bc2f581f916a0
Reviewed-on: https://review.whamcloud.com/41494
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdd/mdd_dir.c
lustre/tests/sanity.sh