]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: use ImageCtx->snap_lock for ImageCtx->features
authorJosh Durgin <jdurgin@redhat.com>
Tue, 24 Feb 2015 02:44:05 +0000 (18:44 -0800)
committerJosh Durgin <jdurgin@redhat.com>
Wed, 25 Feb 2015 23:41:50 +0000 (15:41 -0800)
commitcffd93a32f7fdb0224b5eca0ce9c46a7fc1381a4
treeed3744126b54069426eca31e014a92725cdcd17c
parente1f2c97256fdc776449f7487d54a21944160edc3
librbd: use ImageCtx->snap_lock for ImageCtx->features

This was being protected by md_lock, but that has become too coarse
since it is used to prevent writes from proceeding while flushing
caches for a snapshot. With the addition of ObjectMap and
ImageWatcher, writeback could try to acquire md_lock again, leading to
a deadlock.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
src/librbd/ImageCtx.cc
src/librbd/ImageCtx.h
src/librbd/ObjectMap.cc
src/librbd/internal.cc