retry: Avoid assertion during retried extents
commit5bb852eaf7f2d3bd527dcb7bf0e5cf5f92eb339e
authorEric Blake <eblake@redhat.com>
Mon, 30 Sep 2019 20:41:10 +0000 (30 15:41 -0500)
committerEric Blake <eblake@redhat.com>
Wed, 2 Oct 2019 16:24:38 +0000 (2 11:24 -0500)
tree18fa9912a6c8986a767e27d78e220b860b72d3c5
parent3e95ee6cde5105157526a5b35cd5e25783d8f666
retry: Avoid assertion during retried extents

If the plugin's .extents made progress before failing, retrying the
call with the original offset that differs from the offset expected by
extents will cause an assertion failure.  We have to perform each
retry iteration with a fresh extents object, and copy it on success.

The sh plugin could trigger this with an extents callback that
produces valid data followed by garbage, as will be shown in the next
patch.

Fixes: f0f0ec49
Signed-off-by: Eric Blake <eblake@redhat.com>
filters/retry/retry.c