Whamcloud - gitweb
LU-13359 quota: call rhashtable_lookup near params decl 76/39676/3
authorMr NeilBrown <neilb@suse.de>
Fri, 14 Aug 2020 04:02:20 +0000 (14:02 +1000)
committerOleg Drokin <green@whamcloud.com>
Sat, 12 Sep 2020 15:43:56 +0000 (15:43 +0000)
commit1d116c8ff68fc784141b647b790e4b4861460797
tree98a618174287b5d12801671001d2ac8484eafb12
parentac5fcdce025b4825500c0308d89dfdab1faece51
LU-13359 quota: call rhashtable_lookup near params decl

rhashtable_lookup() is an inline function which depends - for
performancs - on the 'rhashtable_params' being visible and
consnt.  So it should only be called in the same file that
declared the params.

A recent patch make pools_hash_params an external variable and calls
rhashtable_lookup from a separate file, which will break the
optimisation.

So add lov_pool_find() and use it to maintainer optimization.

Fixes: 6b9f849fd5f4 ("LU-13359 quota: make used for pool correct")
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ieeb3b080491f5b2c9c825885fe7a42f4a8599a2a
Reviewed-on: https://review.whamcloud.com/39676
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lov/lov_internal.h
lustre/lov/lov_obd.c
lustre/lov/lov_pool.c