librbd: stop passing IOContext to image dispatch write methods
This is a major footgun since any value passed e.g. at the API layer
may be stale by the time we get to object dispatch. All callers are
passing the IOContext returned by get_data_io_context() for their
ImageCtx anyway, highlighting that the parameter is fictitious.
Only the read method can meaningfully take IOContext.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit
584f865ae116185087176715ced014b625f04e82)
Conflicts:
src/librbd/api/Io.cc [ commit
37057ba2f6bb ("librbd: pass
image_extents to create_{discard,write_same}()") and ImageArea
support not in pacific ]
src/librbd/cache/ImageWriteback.cc [ ditto ]
src/librbd/io/ImageDispatchSpec.h [ ditto ]
src/librbd/crypto/luks/FormatRequest.cc [ ImageArea support not
in pacific ]
src/test/librbd/io/test_mock_ImageRequest.cc [ ditto ]
src/test/librbd/journal/test_mock_Replay.cc [ ditto ]
src/librbd/crypto/luks/FlattenRequest.cc [ commit
84601d68a74f
("librbd/crypto: add format-specific flattening operation")
not in pacific ]