New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mimic: librbd: object map improperly flagged as invalidated #24413

Merged
merged 5 commits into from Oct 15, 2018

Conversation

Projects
None yet
4 participants
@dillaman
Copy link
Contributor

dillaman commented Oct 3, 2018

dillaman added some commits Sep 14, 2018

librbd: test_flags helper should require snap id parameter
The HEAD and snapshots have potentially different flag states
since object maps get invalidated per revision.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 8620827)

Conflicts:
	src/librbd/ObjectMap.cc: trivial resolution
	src/test/librbd/test_Migration.cc: DNE
librbd: converted object map snapshot remove state machine to new style
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 5877018)

Conflicts:
	src/librbd/object_map/SnapshotRemoveRequest.cc: trivial resolution

@dillaman dillaman added this to the mimic milestone Oct 3, 2018

int r = m_image_ctx.get_flags(m_snap_id, &flags);
assert(r == 0);
int r = m_image_ctx.get_flags(m_snap_id, &m_flags);
ceph_assert(r == 0);

This comment has been minimized.

@trociny

trociny Oct 4, 2018

Contributor

@dillaman Was it your intention to use the new style assert here? Because in other commits it looked like you preferred to use the old style assert.

This comment has been minimized.

@dillaman

dillaman Oct 4, 2018

Contributor

@trociny updated

dillaman added some commits Sep 14, 2018

librbd: do not invalidate object map when attempting to delete non-ex…
…istent snapshot

If duplicate snapshot remove requests are received by the lock owner from a peer
client, the first request will remove the object map. If the second request
arrives while the first is in-progress, it will again attempt to remove the
object map but fail to load it since it's already been deleted. This incorrectly
results in the next object map being flagged as invalid.

Fixes: http://tracker.ceph.com/issues/24516
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 0a31c55)

Conflicts:
	src/librbd/object_map/SnapshotRemoveRequest.cc: trivial resolution
librbd: do not invalidate object map if update races with copyup
The copyup state machine needs to iterate over all object maps to update
the existence for the object. If an snapshot is being removed concurrently,
it's possible to invalidate the object map for the image.

Fixes: http://tracker.ceph.com/issues/24516
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 5a1cb46)

Conflicts:
	src/librbd/ObjectMap.cc: trivial resolution
	src/librbd/ObjectMap.h: trivial resolution
	src/librbd/io/CopyupRequest.cc: trivial resolution
	src/test/librbd/deep_copy/test_mock_ObjectCopyRequest.cc: trivial resolution
	src/test/librbd/test_mock_ObjectMap.cc: trivial resolution
librbd: keep IO blocked until after snapshot object map created
The IO was being unblocked before object map was created, allowing
a potential copyup request to fail to update a still-to-be-created
object map.

Fixes: http://tracker.ceph.com/issues/24516
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 1e87440)

Conflicts:
	src/librbd/object_map/SnapshotCreateRequest.cc: trivial resolution
	src/librbd/operation/SnapshotCreateRequest.cc: trivial resolution

@dillaman dillaman force-pushed the dillaman:wip-36225-mimic branch from 78f076c to f88b8ff Oct 4, 2018

@trociny

trociny approved these changes Oct 4, 2018

Copy link
Contributor

trociny left a comment

LGTM

@yuriw

This comment has been minimized.

Copy link
Contributor

yuriw commented Oct 12, 2018

@yuriw yuriw merged commit c5d7d1b into ceph:mimic Oct 15, 2018

4 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment