Skip to content
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

nautilus: librbd: snapshot object maps can go inconsistent during copyup #29722

Merged
merged 3 commits into from Aug 20, 2019

Conversation

@dillaman
Copy link
Contributor

commented Aug 18, 2019

idryomov added 3 commits Apr 22, 2019
librbd: avoid repeatedly invoking is_zero() in CopyupRequest
Invoke is_zero() just once, either in handle_read_from_parent() or
handle_deep_copy().

Initialize m_copyup_is_zero to true to preserve existing behavior:
on an empty bufferlist is_zero() returns true.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit b011336)
librbd: don't update snapshot object maps if copyup data is all zeros
If the data read from the parent is all zeros, deep copyup isn't
performed.  However snapshot object maps are updated unconditionally,
causing inconsistencies where nonexistent objects are marked
OBJECT_EXISTS or OBJECT_EXISTS_CLEAN.

Fixes: http://tracker.ceph.com/issues/39435
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 4456dc3)
librbd: the first post-migration snapshot isn't always dirty
Currently, the first post-migration snapshot is always marked EXISTS
(i.e. dirty).  This is wrong, because the data can be inherited from
a pre-migration snapshot, handled by deep copy.

Mark all post-migration snapshots EXISTS_CLEAN in this case.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 5b9d85c)

@dillaman dillaman added this to the nautilus milestone Aug 18, 2019

@trociny
Copy link
Contributor

left a comment

LGTM

@yuriw

This comment has been minimized.

Copy link
Contributor

commented Aug 19, 2019

@yuriw yuriw merged commit 1ad4ad9 into ceph:nautilus Aug 20, 2019

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-39499-nautilus branch Aug 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.