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

luminous: rbd: librbd: object map improperly flagged as invalidated #24415

Merged
merged 5 commits into from Oct 5, 2018

Conversation

Projects
None yet
4 participants
@dillaman
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/librbd/operation/SnapshotRemoveRequest.cc: trivial resolution
	src/test/librbd/test_DeepCopy.cc: DNE
	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
	src/librbd/object_map/SnapshotRemoveRequest.h: trivial resolution

@dillaman dillaman added this to the luminous 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

ceph_assert or 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/deep_copy/ObjectCopyRequest.cc: moved to rbd-mirror image sync
	src/librbd/io/CopyupRequest.cc: trivial resolution
	src/test/librbd/deep_copy/test_mock_ObjectCopyRequest.cc: moved to rbd-mirror image sync
	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-36224-luminous branch from 61412f9 to 8975ba0 Oct 4, 2018

@trociny

trociny approved these changes Oct 4, 2018

LGTM

@yuriw

This comment has been minimized.

Contributor

yuriw commented Oct 4, 2018

@yuriw yuriw merged commit 6f8ac15 into ceph:luminous Oct 5, 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

@dillaman dillaman deleted the dillaman:wip-36224-luminous branch Oct 5, 2018

@smithfarm smithfarm changed the title from luminous: librbd: object map improperly flagged as invalidated to luminous: rbd: librbd: object map improperly flagged as invalidated Oct 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment