]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: fix a bunch of issues with restarting RefreshRequest
authorIlya Dryomov <idryomov@gmail.com>
Fri, 2 Sep 2022 14:58:36 +0000 (16:58 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 6 Sep 2022 18:23:52 +0000 (20:23 +0200)
commit3ed31c39a33664d876ef558a90779f9eaacf6c86
treeff53c2af0f84a8416a36991251991c06a7c74fa8
parent3a59b7b6207aa6d4f12b1950c43f1f20d52d958e
librbd: fix a bunch of issues with restarting RefreshRequest

Make RefreshRequest properly restartable, at least up until and including
V2_REFRESH_PARENT step:

- clear m_migration_spec when skipping GET_MIGRATION_HEADER
- don't rely on potentially stale m_incomplete_update on retry
- reset m_legacy_parent when retrying more than just V2_GET_PARENT
- don't rely on potentially stale m_parent_md.overlap and
  m_head_parent_overlap on retry
- clear m_metadata before fetching image metadata (but not before
  fetching pool metadata)
- clear m_op_features when skipping V2_GET_OP_FEATURES
- clear m_group_spec on EOPNOTSUPP error in V2_GET_GROUP
- reset m_legacy_snapshot when retrying more than just V2_GET_SNAPSHOTS
- don't rely on potentially stale m_snap_parents on retry

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 6bd89ea119520cf5a45ac93b0e16edf35ddd4e57)
src/librbd/image/RefreshRequest.cc