]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: use snap_lock to protect ImageCtx->size
authorJosh Durgin <jdurgin@redhat.com>
Wed, 25 Feb 2015 01:19:59 +0000 (17:19 -0800)
committerJosh Durgin <jdurgin@redhat.com>
Thu, 26 Feb 2015 01:27:34 +0000 (17:27 -0800)
commit85825008bc8af27b01c51e45d05c7cabe8929a84
treedac56c0e2d86beaf4e161cf1333e2081cfa59d60
parent7fed0a366d5b81c2ab4af1f56eb5b278c8e297ff
librbd: use snap_lock to protect ImageCtx->size

Since this is often looked up by snap_id anyway, snap_lock
is easy to use for this.

This lets us avoid taking md_lock in many places.

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