Whamcloud - gitweb
LU-9679 osc: simplify osc_extent_find() 91/41691/5
authorNeilBrown <neilb@suse.com>
Thu, 13 Dec 2018 00:32:56 +0000 (11:32 +1100)
committerOleg Drokin <green@whamcloud.com>
Sat, 13 Mar 2021 18:33:32 +0000 (18:33 +0000)
commit3e6b7a785cab514a9703f6ae8d792113f5c53d19
treefddf7dcff10a1dadbac18829fa57eddf1f2328e0
parentcfa2c25f1b9b03442cf354bccd062088983057b9
LU-9679 osc: simplify osc_extent_find()

osc_extent_find() contains some code with the same functionality as
osc_extent_merge().  So replace that code with a call to
osc_extent_merge().

This requires that we set cur->oe_grants earlier, as
osc_extent_merge() needs that.
It also requires that osc_extent_merge() allow the victim to be
OES_INV.

Also:

 - fix a pre-existing bug - osc_extent_merge() should never try to
   merge two extends with different ->oe_mppr as later alignment
   checks can get confused.
 - Remove a redundant list_del_init() which is already included in
   __osc_extent_remove().

Linux-Commit: 85ebb57ddc5b ("lustre: osc: simplify osc_extent_find()")

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I8a1e0d492f583ba9baf28bafa42d4e31c29ac0da
Reviewed-on: https://review.whamcloud.com/41691
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osc/osc_cache.c