Whamcloud - gitweb
LU-14801: utils: improve performance of 'lfs find -perm' 18/44118/11
authorCourrier Guillaume <guillaume.courrier@cea.fr>
Wed, 23 Jun 2021 09:15:08 +0000 (11:15 +0200)
committerOleg Drokin <green@whamcloud.com>
Sun, 10 Oct 2021 03:31:09 +0000 (03:31 +0000)
commit8c2d87037d4b761428ddad076e296ee05c85cc52
treecc4bd322d1f2afcbf247f725ead8bf4c664b2cce
parent8a770616a5ad21360ecba63c3643cadd245a2a50
LU-14801: utils: improve performance of 'lfs find -perm'

The current implementation of the "-perm" predicate queries the
stat information on the OST while it is not necessary. This patch
fixes that issue by moving the check to the correct location in
`cb_find_init`

On a simple setup with 1 MDT and 2 OSTs we observed for around 8000
files:
- 2.3s without the patch
- 1.9s with the patch

Test-Parameters: trivial
Change-Id: I30c0e89d136556058eadf6bede062577c6d36eaf
Signed-off-by: Courrier Guillaume <guillaume.courrier@cea.fr>
Reviewed-on: https://review.whamcloud.com/44118
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Reviewed-by: Rick Mohr <mohrrf@ornl.gov>
Reviewed-by: Anjus George <georgea@ornl.gov>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
lustre/utils/liblustreapi.c