LU-6142 lod: return pools_hash_params to being static.
A recent patch changes pools_hash_params in lod_pool.c to no longer
be 'static'. This is not ideal.
rhashtable interfaces are mostly 'static inlines' which contain a lot
of code which is mostly optimised away providing that the 'params'
structure is const and locally visible. When these interfaces are
called with a params structure in another file, the code produces is
quite inefficient and wasteful.
It is generally cleaner to provide accessor functions which can be
exported to other compilation units. It is even beneficial to do that
within the one file.
This patch introduces
lod_pool_exists()
and
lod_pool_find()
The first is 'extern' and thus 'pools_hash_params' can not be static.
The second is used in several places in lod_pool.c, improving code
quality and maintainability.
Fixes:
0a998f4723f5 ("LU-14825 lod: pool spilling")
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ieafe2f23fe5cc71d9bdce73cbe7360f5cb540edf
Reviewed-on: https://review.whamcloud.com/45070
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>