Whamcloud - gitweb
LU-9679 osc: simplify osc_extent_find() 07/37607/7
authorNeilBrown <neilb@suse.com>
Thu, 13 Dec 2018 00:32:56 +0000 (11:32 +1100)
committerOleg Drokin <green@whamcloud.com>
Sun, 28 Jun 2020 02:47:02 +0000 (02:47 +0000)
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.

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.com>
Change-Id: I5fa56e04ed707ee91f99179030dae4bd45456061
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/37607
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

No differences found