Whamcloud - gitweb
LU-8066 llite: use more private data in dump_pgcache 09/33009/14
authorNeilBrown <neilb@suse.com>
Tue, 11 Sep 2018 13:41:52 +0000 (09:41 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 21 Sep 2018 03:30:41 +0000 (03:30 +0000)
commitfbeb6e218f4c60a77db17142d3debc10d784f2d9
treeb4c1a4451b24cbb6d22196d9a768b00383850bf0
parent40367f7f988989d9fcf6ce393618394dcfb43e09
LU-8066 llite: use more private data in dump_pgcache

The dump_page_cache debugfs file allocates and frees an 'env' in each
call to vvp_pgcache_start,next,show.  This is likely to be fast, but
does introduce the need to check for errors.

It is reasonable to allocate a single 'env' when the file is opened,
and use that throughout.

So create 'seq_private' structure which stores the sbi, env, and
refcheck, and attach this to the seqfile.

Then use it throughout instead of allocating 'env' repeatedly.

Linux-commit: fc5f499af16c247c5bff68d2625a6d1ca48b3332

Test-Parameters: trivial envdefinitions="ONLY=63b" testlist=sanity
Test-Parameters: trivial envdefinitions="ONLY=118" testlist=sanity
Test-Parameters: trivial envdefinitions="ONLY=20" testlist=sanityn

Change-Id: Id7e7f5ec1729d1e5af041adcb247ca11299ed734
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/33009
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/vvp_dev.c