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

librbd: A client opening an image mid-resize can result in the object map being invalidated #5279

Merged
7 commits merged into from Jul 28, 2015

Conversation

Projects
None yet
2 participants
@dillaman
Contributor

dillaman commented Jul 17, 2015

@dillaman dillaman added this to the hammer milestone Jul 17, 2015

ghost pushed a commit that referenced this pull request Jul 19, 2015

Merge pull request #5279: A client opening an image mid-resize can re…
…sult in the object map being invalidated

Reviewed-by: Loic Dachary <ldachary@redhat.com>

ghost pushed a commit that referenced this pull request Jul 19, 2015

Merge pull request #5279: A client opening an image mid-resize can re…
…sult in the object map being invalidated

Reviewed-by: Loic Dachary <ldachary@redhat.com>

@ghost ghost changed the title from A client opening an image mid-resize can result in the object map being invalidated to DNM: A client opening an image mid-resize can result in the object map being invalidated Jul 19, 2015

@ghost

This comment has been minimized.

ghost commented Jul 19, 2015

@dillaman could you please rebase and remove the DNM when it is done ? Thanks :-)

dillaman added some commits Mar 25, 2015

librbd: move object map codes to common location
These codes will need to be accessible from cls_rbd and librbd.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 4ac584c)
librbd: only update image flags when holding exclusive lock
It was possible for a client to open an image while another client
was shrinking an image.  This would result in the former invalidating
the object map on-disk if it openned the image between updating the
image header and resizing the object map.

Fixes: #11791
Backport: hammer
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit eb81a6a)
tests: add new unit tests for object map invalidation
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 0215e97)
tests: fixed TestObjectMap.InvalidateFlagInMemoryOnly
librados and librados_test_stub return different result codes
for a read full object operation.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 2ace2b7)
librados_test_stub: read op should return number of bytes read
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit f8a7b50)
librbd: don't attempt to invalidate an object map in R/O mode
The ImageWatcher is not initialized when in R/O mode, which
resulted in a NULL pointer dereference.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 64d740f)
librbd: new ImageWatcher::is_lock_supported method
The new version does not attempt to acquire the snap_lock, to avoid
cases where a recursive lock would result.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>

@dillaman dillaman changed the title from DNM: A client opening an image mid-resize can result in the object map being invalidated to A client opening an image mid-resize can result in the object map being invalidated Jul 19, 2015

@dillaman

This comment has been minimized.

Contributor

dillaman commented Jul 19, 2015

@dachary Done -- rebase automatically removed the duplicate commits.

ghost pushed a commit that referenced this pull request Jul 19, 2015

Merge pull request #5279: A client opening an image mid-resize can re…
…sult in the object map being invalidated

Reviewed-by: Loic Dachary <ldachary@redhat.com>

@ghost ghost self-assigned this Jul 28, 2015

ghost pushed a commit that referenced this pull request Jul 28, 2015

Loic Dachary
Merge pull request #5279 from ceph/wip-12237-hammer
A client opening an image mid-resize can result in the object map being invalidated

Reviewed-by: Loic Dachary <ldachary@redhat.com>

@ghost ghost merged commit d62c3ea into hammer Jul 28, 2015

@ghost ghost changed the title from A client opening an image mid-resize can result in the object map being invalidated to librbd: A client opening an image mid-resize can result in the object map being invalidated Aug 4, 2015

@dillaman dillaman deleted the wip-12237-hammer branch Sep 7, 2015

This issue was closed.

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