]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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, 2 Jul 2023 12:19:01 +0000 (14:19 +0200)
commita8572e1c68ce37a630e91b5bc13ab5ba5ca9ca5e
tree2852faf63b8f52f80879b43176f919ae7cd48216
parent6187f7019e9fa5b262a545374dce3b92720cfb3e
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 quincy ]
src/librbd/cache/ImageWriteback.cc [ ditto ]
src/librbd/io/ImageDispatchSpec.h [ ditto ]
src/librbd/crypto/luks/FormatRequest.cc [ ImageArea support not
  in quincy ]
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 quincy ]
26 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/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