Merge pull request #11559 from dillaman/wip-17618

librbd: exclusive lock incorrectly initialized when switching to head revision

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
This commit is contained in:
Mykola Golub 2016-11-01 09:14:07 +02:00 committed by GitHub
commit 7b7d0984f0

View File

@ -56,7 +56,8 @@ void SetSnapRequest<I>::send_init_exclusive_lock() {
}
}
if (!m_image_ctx.test_features(RBD_FEATURE_EXCLUSIVE_LOCK)) {
if (m_image_ctx.read_only ||
!m_image_ctx.test_features(RBD_FEATURE_EXCLUSIVE_LOCK)) {
int r = 0;
if (send_refresh_parent(&r) != nullptr) {
send_complete();