Commit ed95b21a authored by Ilya Dryomov's avatar Ilya Dryomov

rbd: support for exclusive-lock feature

Add basic support for RBD_FEATURE_EXCLUSIVE_LOCK feature.  Maintenance
operations (resize, snapshot create, etc) are offloaded to librbd via
returning -EOPNOTSUPP - librbd should request the lock and execute the
operation.
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
Reviewed-by: default avatarMike Christie <mchristi@redhat.com>
Tested-by: default avatarMike Christie <mchristi@redhat.com>
parent 99d16943
This diff is collapsed.
...@@ -28,6 +28,17 @@ ...@@ -28,6 +28,17 @@
#define RBD_DATA_PREFIX "rbd_data." #define RBD_DATA_PREFIX "rbd_data."
#define RBD_ID_PREFIX "rbd_id." #define RBD_ID_PREFIX "rbd_id."
#define RBD_LOCK_NAME "rbd_lock"
#define RBD_LOCK_TAG "internal"
#define RBD_LOCK_COOKIE_PREFIX "auto"
enum rbd_notify_op {
RBD_NOTIFY_OP_ACQUIRED_LOCK = 0,
RBD_NOTIFY_OP_RELEASED_LOCK = 1,
RBD_NOTIFY_OP_REQUEST_LOCK = 2,
RBD_NOTIFY_OP_HEADER_UPDATE = 3,
};
/* /*
* For format version 1, rbd image 'foo' consists of objects * For format version 1, rbd image 'foo' consists of objects
* foo.rbd - image metadata * foo.rbd - image metadata
......
...@@ -15,6 +15,7 @@ const char *ceph_entity_type_name(int type) ...@@ -15,6 +15,7 @@ const char *ceph_entity_type_name(int type)
default: return "unknown"; default: return "unknown";
} }
} }
EXPORT_SYMBOL(ceph_entity_type_name);
const char *ceph_osd_op_name(int op) const char *ceph_osd_op_name(int op)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment