retry: Check size before transactions
Although it is unusual for a plugin to shrink size on reopen, it is
not impossible. Failure to check our bounds could result in violating
assumptions in the plugin that all requests are in-bounds. Note that
if the plugin gains a larger size, we merely never access the new tail
of the file (when the NBD protocol ever gains dynamic resize support,
we'll get to revisit how the retry filter fits in). If it reports a
smaller size, and the request tries to access that portion of the
file, then retry just the same as if can_write or similar disappears,
on the hopes that yet another retry will fix the problem.
Fixes:
f0f0ec49
Signed-off-by: Eric Blake <eblake@redhat.com>