Whamcloud - gitweb
LU-8066 llite: remove redundant lookup in dump_pgcache 10/33010/5
authorNeilBrown <neilb@suse.com>
Sun, 16 Sep 2018 21:28:41 +0000 (17:28 -0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 1 Oct 2018 14:00:46 +0000 (14:00 +0000)
commit10afbcfe2cc1a87dd0c4f2ef2d194de87c18f9bd
tree7cd7c467afb5f2453d85222fdac457e7e74a40ba
parentc543f5db670c20106e93e77526808598c44baa4f
LU-8066 llite: remove redundant lookup in dump_pgcache

Both the 'next' and the 'show' functions for the dump_page_cache
seqfile perform a lookup based on the current file index.  This is
needless duplication.

The reason appears to be that the state that needs to be communicated
from "next" to "show" is two pointers, but seq_file only provides for
a single pointer to be returned from next and passed to show.

So make use of the new 'seq_private' structure to store the extra
pointer.
So when 'next' (or 'start') find something, it returns the page and
stores the clob in the private area.
'show' accepts the page as an argument, and finds the clob where it
was stored.

Linux-commit: 85b6542bbade42935386661cb45d90c4e13766b7

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: I6a45430f7ba3007dcd70bdf09c4c7ed5a213533d
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/33010
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/vvp_dev.c