You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Mike Christie <mchristi@redhat.com> Tested-by: Mike Christie <mchristi@redhat.com>
This commit is contained in:
+800
-20
File diff suppressed because it is too large
Load Diff
@@ -28,6 +28,17 @@
|
||||
#define RBD_DATA_PREFIX "rbd_data."
|
||||
#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
|
||||
* foo.rbd - image metadata
|
||||
|
||||
@@ -15,6 +15,7 @@ const char *ceph_entity_type_name(int type)
|
||||
default: return "unknown";
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(ceph_entity_type_name);
|
||||
|
||||
const char *ceph_osd_op_name(int op)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user