]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: stop passing IOContext to image dispatch write methods
authorIlya Dryomov <idryomov@gmail.com>
Tue, 13 Jun 2023 11:36:02 +0000 (13:36 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 18 Jun 2023 15:25:01 +0000 (17:25 +0200)
commit584f865ae116185087176715ced014b625f04e82
treed8778616505dcf1cdfde95bffad8cee97d21337f
parente4b1e0466354942c935e9eca2ab2858e75049415
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>
27 files changed:
src/librbd/api/Io.cc
src/librbd/cache/ImageWriteback.cc
src/librbd/cache/WriteLogImageDispatch.cc
src/librbd/cache/WriteLogImageDispatch.h
src/librbd/crypto/CryptoImageDispatch.h
src/librbd/crypto/luks/FlattenRequest.cc
src/librbd/crypto/luks/FormatRequest.cc
src/librbd/exclusive_lock/ImageDispatch.cc
src/librbd/exclusive_lock/ImageDispatch.h
src/librbd/io/ImageDispatch.cc
src/librbd/io/ImageDispatch.h
src/librbd/io/ImageDispatchInterface.h
src/librbd/io/ImageDispatchSpec.h
src/librbd/io/ImageDispatcher.cc
src/librbd/io/QosImageDispatch.cc
src/librbd/io/QosImageDispatch.h
src/librbd/io/QueueImageDispatch.cc
src/librbd/io/QueueImageDispatch.h
src/librbd/io/RefreshImageDispatch.cc
src/librbd/io/RefreshImageDispatch.h
src/librbd/io/WriteBlockImageDispatch.cc
src/librbd/io/WriteBlockImageDispatch.h
src/librbd/migration/ImageDispatch.cc
src/librbd/migration/ImageDispatch.h
src/test/librbd/io/test_mock_ImageRequest.cc
src/test/librbd/journal/test_mock_Replay.cc
src/test/librbd/mock/io/MockImageDispatch.h