Whamcloud - gitweb
LU-9679 osc: simplify osc_page_gang_lookup() 99/37599/2
authorNeilBrown <neilb@suse.com>
Mon, 17 Dec 2018 04:06:47 +0000 (15:06 +1100)
committerOleg Drokin <green@whamcloud.com>
Thu, 5 Mar 2020 22:35:27 +0000 (22:35 +0000)
commit510b93236e6e05e717b7f834bd0cfa8054d3a1cc
treeaad8759d411cf53c200f713b3341f963edf58a19
parenta4f049b96562fd502b1948fb082767351e040a1c
LU-9679 osc: simplify osc_page_gang_lookup()

osc_page_gang_lookup() has 4 values that it can receive from a
callback, and that it can return to the caller:
CLP_GANG_OKAY,
CLP_GANG_RESCHED,
CLP_GANG_AGAIN,
CLP_GANG_ABORT

"AGAIN" is never used.
"RESCHED" is not needed as a cond_resched() can safely be called at
the point this is returned, rather than returning it.
That leaves "OKAY" and "ABORT" which can simply by "true" and "false"
boolean values.

Internalizing the RESCHED case means the callers don't need to loop
themselves.  This simplifies calling patterns.

Linux-Commit: 1e8fd6f9806c ("lustre: osc_cache: simplify
osc_page_gang_lookup()")

Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Mr NeilBrown <neilb@suse.com>
Change-Id: I603963b72e4299bebcdaf4064428d6281fd12def
Reviewed-on: https://review.whamcloud.com/37599
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/cl_object.h
lustre/include/lustre_osc.h
lustre/mdc/mdc_dev.c
lustre/osc/osc_cache.c
lustre/osc/osc_io.c
lustre/osc/osc_lock.c