]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd/object_map: don't resize object map in handle_load_object_map()
authorIlya Dryomov <idryomov@gmail.com>
Thu, 4 Jan 2024 10:39:20 +0000 (11:39 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Sat, 20 Jan 2024 15:06:54 +0000 (16:06 +0100)
commit275a299cd48d2ddac36608d6633a6b79c8927351
treef9cf9092e8f64fc150f1bb58324dbf102f46d1dd
parent2ab5b52f71c88cb55f8ed82f1dfd0115fdd6e022
librbd/object_map: don't resize object map in handle_load_object_map()

Currently it's done in two cases:

- if the loaded object map is larger than expected based on byte size,
  it's truncated to expected number of objects
- in case of deep-copy, if the loaded object map is smaller than diff
  state, it's expanded to get "track the largest of all versions in the
  set" semantics

Both of these cases can be easily dealt with without modifying the
object map.  Being able to process a const object map is needed for
working on in-memory object map which is external to DiffRequest.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/librbd/object_map/DiffRequest.cc
src/test/librbd/object_map/test_mock_DiffRequest.cc