]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: only update image flags when holding exclusive lock
authorJason Dillaman <dillaman@redhat.com>
Tue, 23 Jun 2015 15:14:51 +0000 (11:14 -0400)
committerJason Dillaman <dillaman@redhat.com>
Sun, 19 Jul 2015 17:44:16 +0000 (13:44 -0400)
commit27c99ea972a7b218ea591b208d0d1dd51eef6f95
tree5ed810fedcc62ac2f2470556324c8abcae48eac5
parentef453630200ab72373f08357ca6b5ac5c5bbb397
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 eb81a6a7e391327ac993fd406443b206a7f7bffc)
src/librbd/ObjectMap.cc