From 6e0bd2e60ee74da8299ea40ae3a5e01d5a53d429 Mon Sep 17 00:00:00 2001 From: Wang Shilong Date: Fri, 27 Mar 2020 10:05:17 +0800 Subject: [PATCH] LU-13394 llite: avoid sending OST RPC for project setting LL_IOC_FSSETXATTR ioctl could be used to handle inode flags setting, currently it is mainly used to hanlde project ID changing. The only flags for project is inherit flag, there is no need to send this to OST, so we could avoid this kind of RPC to OSS. Change-Id: Ief97959216be807d5efe936eba368d5262a521b0 Signed-off-by: Wang Shilong Reviewed-on: https://review.whamcloud.com/38089 Tested-by: jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Li Xi Reviewed-by: Oleg Drokin --- lustre/llite/file.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 75b82f7..58caaae 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -3239,6 +3239,11 @@ int ll_ioctl_fssetxattr(struct inode *inode, unsigned int cmd, if (obj == NULL) GOTO(out_fsxattr, rc); + /* Avoiding OST RPC if this is only project ioctl */ + if (fsxattr.fsx_xflags == 0 || + fsxattr.fsx_xflags == FS_XFLAG_PROJINHERIT) + GOTO(out_fsxattr, rc); + OBD_ALLOC_PTR(attr); if (attr == NULL) GOTO(out_fsxattr, rc = -ENOMEM); -- 1.8.3.1