Whamcloud - gitweb
LU-14430 mdt: fix maximum ACL handling 13/42013/4
authorMikhail Pershin <mpershin@whamcloud.com>
Sun, 28 Feb 2021 09:24:12 +0000 (12:24 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 28 Apr 2021 02:11:00 +0000 (02:11 +0000)
commitaa92caa21fa2a4473dce5889de7fcd17e171c1a0
tree85d692a4f7fd878bea172de491d658cae51aa87c
parent5a8dc02609ace484079a66c13e9e35c04af7f06c
LU-14430 mdt: fix maximum ACL handling

Having maximum ACL cause big reply buffer and in that case
server could return -ERANGE in mdt_pack_acl2body() expecting
a client to resend RPC with bigger buffer. The problem is
that even in that case server can return -ERANGE causing
userspace tool to get this error after all.

Instead of estimating reply sizes in mdt_pack_acl2body()
let's just rely on mdt_fix_reply() code which does buffer
grow when it is needed

- add more credits for osd_create in ldiskfs because it
  copies also default ACLs during create
- remove code returning -ERANGE in mdt_pack_acl2body() and
  rely on mdt_fix_reply() reply buffers grow
- test is added to create as many ACLs as possible

Test-Parameters: env=ONLY=103e testlist=sanity
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: If7af5c61f89ee1220d7982d4c61a7357051a811c
Reviewed-on: https://review.whamcloud.com/42013
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>
lustre/include/dt_object.h
lustre/mdd/mdd_dir.c
lustre/mdt/mdt_handler.c
lustre/osd-ldiskfs/osd_handler.c
lustre/tests/sanity.sh