Whamcloud - gitweb
LU-7239 mdd: make mdd_attr_set() synchronous less often 99/16699/7
authorOlaf Faaland <faaland1@llnl.gov>
Tue, 6 Nov 2018 18:24:27 +0000 (10:24 -0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 23 Jan 2019 09:19:31 +0000 (09:19 +0000)
commitf8e9fb6e10f5b10a83c85b26f146380dd91cb384
treebe5f263333df902b7247f8d782512a1c4515f6e0
parent707820692275a448eaaf18f4fa5312cff47384be
LU-7239 mdd: make mdd_attr_set() synchronous less often

In permission_needs_sync(), test mode changes for S_ISUID or S_ISVTX
rather than simply checking whether the new mode in the incoming
request has those bits set.  Similarly check for uid and gid changes.

Prior to these changes, copying a directory tree into lustre, whose
directories' modes have S_ISUID | S_ISGID | S_ISVTX set, is
unnecessarily slow because chmod() system calls are synchronous
whether they change the actual permissions or not.

Change-Id: I41d3297a007eb4b796790b3b3de0ad355d17cb58
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-on: https://review.whamcloud.com/16699
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdd/mdd_object.c