]>
git.proxmox.com Git - ceph.git/blob - ceph/src/librbd/exclusive_lock/AutomaticPolicy.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #ifndef CEPH_LIBRBD_EXCLUSIVE_LOCK_AUTOMATIC_POLICY_H
5 #define CEPH_LIBRBD_EXCLUSIVE_LOCK_AUTOMATIC_POLICY_H
7 #include "librbd/exclusive_lock/Policy.h"
13 namespace exclusive_lock
{
15 class AutomaticPolicy
: public Policy
{
17 AutomaticPolicy(ImageCtx
*image_ctx
) : m_image_ctx(image_ctx
) {
20 bool may_auto_request_lock() override
{
24 int lock_requested(bool force
) override
;
27 ImageCtx
*m_image_ctx
;
31 } // namespace exclusive_lock
34 #endif // CEPH_LIBRBD_EXCLUSIVE_LOCK_AUTOMATIC_POLICY_H