summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/ptlrpc/layout.c
diff options
context:
space:
mode:
authorFan Yong <fan.yong@intel.com>2018-05-29 10:21:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-31 18:55:36 +0200
commit6f17a0443972fb700dca7f0be882206ae23c27d6 (patch)
treef7e3b3c292c0b24e1f14af6f9d286f1e3c91d1d5 /drivers/staging/lustre/lustre/ptlrpc/layout.c
parenta694be449afb7f8581f491a675aa885263b6f2b3 (diff)
downloadop-kernel-dev-6f17a0443972fb700dca7f0be882206ae23c27d6.zip
op-kernel-dev-6f17a0443972fb700dca7f0be882206ae23c27d6.tar.gz
staging: lustre: 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> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7473 Reviewed-on: https://review.whamcloud.com/19790 Reviewed-by: Andreas Dilger <andreas.dilger@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> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/ptlrpc/layout.c')
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/layout.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c
index 2855f38..417d4a1 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/layout.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c
@@ -992,9 +992,7 @@ EXPORT_SYMBOL(RMF_EADATA);
struct req_msg_field RMF_EAVALS = DEFINE_MSGF("eavals", 0, -1, NULL, NULL);
EXPORT_SYMBOL(RMF_EAVALS);
-struct req_msg_field RMF_ACL =
- DEFINE_MSGF("acl", RMF_F_NO_SIZE_CHECK,
- LUSTRE_POSIX_ACL_MAX_SIZE, NULL, NULL);
+struct req_msg_field RMF_ACL = DEFINE_MSGF("acl", 0, -1, NULL, NULL);
EXPORT_SYMBOL(RMF_ACL);
/* FIXME: this should be made to use RMF_F_STRUCT_ARRAY */
OpenPOWER on IntegriCloud