Whamcloud - gitweb
LU-7473 acl: increase ACL entries limitation 90/19790/29
authorFan Yong <fan.yong@intel.com>
Sun, 2 Oct 2016 04:05:16 +0000 (12:05 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 16 May 2017 05:44:00 +0000 (05:44 +0000)
commit64b2fad22a4eb4727315709e014d8f74c5a7f289
tree6328f29db307283c8efb60ca3fd6df4d9d0266ab
parentcdc7b3bb16537fc513a64b4f20824b9832efcdf9
LU-7473 acl: increase ACL entries limitation

Originally, the limitation of ACL entries is 32, that is not
enough for some use cases. In fact, restricting ACL entries
count is mainly for preparing the RPC reply buffer to receive
the ACL data. So we cannot make the ACL entries count to be
unlimited. But we can enlarge the RPC reply buffer to hold
more ACL entries. On the other hand, MDT backend filesystem
has its own EA size limitation. For example, for ldiskfs case,
if large EA enable, then the max ACL size is 1048492 bytes;
otherwise, it is 4012 bytes. For ZFS backend, such value is
32768 bytes. With such hard limitation, we can calculate how
many ACL entries we can have at most. This patch increases
the RPC reply buffer to match such hard limitation. For old
client, to avoid buffer overflow because of large ACL data
(more than 32 ACL entries), the MDT will forbid the old client
to access the file with large ACL data. As for how to know
whether it is old client or new, a new connection flag
OBD_CONNECT_LARGE_ACL is used for that.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I557d2696a8df84bf83fcd3955292227d7aa0284c
Reviewed-on: https://review.whamcloud.com/19790
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
23 files changed:
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_acl.h
lustre/include/lustre_export.h
lustre/llite/llite_lib.c
lustre/mdc/mdc_locks.c
lustre/mdc/mdc_reint.c
lustre/mdc/mdc_request.c
lustre/mdd/mdd_device.c
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_internal.h
lustre/mdd/mdd_object.c
lustre/mdd/mdd_permission.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_lib.c
lustre/mdt/mdt_xattr.c
lustre/obdecho/echo_client.c
lustre/ptlrpc/layout.c
lustre/ptlrpc/wiretest.c
lustre/target/tgt_handler.c
lustre/tests/conf-sanity.sh
lustre/utils/wirecheck.c
lustre/utils/wiretest.c