From: Wang Shilong Date: Fri, 27 Mar 2020 02:05:17 +0000 (+0800) Subject: LU-13394 llite: avoid sending OST RPC for project setting X-Git-Tag: 2.13.54~197 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F89%2F38089%2F2;p=fs%2Flustre-release.git 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 --- 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);