]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/linux/ceph/cls_lock_client.h
Merge branch 'stable/for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-bionic-kernel.git] / include / linux / ceph / cls_lock_client.h
CommitLineData
f66241cb
DF
1#ifndef _LINUX_CEPH_CLS_LOCK_CLIENT_H
2#define _LINUX_CEPH_CLS_LOCK_CLIENT_H
3
4#include <linux/ceph/osd_client.h>
5
6enum ceph_cls_lock_type {
7 CEPH_CLS_LOCK_NONE = 0,
8 CEPH_CLS_LOCK_EXCLUSIVE = 1,
9 CEPH_CLS_LOCK_SHARED = 2,
10};
11
d4ed4a53
DF
12struct ceph_locker_id {
13 struct ceph_entity_name name; /* locker's client name */
14 char *cookie; /* locker's cookie */
15};
16
17struct ceph_locker_info {
18 struct ceph_entity_addr addr; /* locker's address */
19};
20
21struct ceph_locker {
22 struct ceph_locker_id id;
23 struct ceph_locker_info info;
24};
25
f66241cb
DF
26int ceph_cls_lock(struct ceph_osd_client *osdc,
27 struct ceph_object_id *oid,
28 struct ceph_object_locator *oloc,
29 char *lock_name, u8 type, char *cookie,
30 char *tag, char *desc, u8 flags);
31int ceph_cls_unlock(struct ceph_osd_client *osdc,
32 struct ceph_object_id *oid,
33 struct ceph_object_locator *oloc,
34 char *lock_name, char *cookie);
35int ceph_cls_break_lock(struct ceph_osd_client *osdc,
36 struct ceph_object_id *oid,
37 struct ceph_object_locator *oloc,
38 char *lock_name, char *cookie,
39 struct ceph_entity_name *locker);
40
d4ed4a53
DF
41void ceph_free_lockers(struct ceph_locker *lockers, u32 num_lockers);
42
43int ceph_cls_lock_info(struct ceph_osd_client *osdc,
44 struct ceph_object_id *oid,
45 struct ceph_object_locator *oloc,
46 char *lock_name, u8 *type, char **tag,
47 struct ceph_locker **lockers, u32 *num_lockers);
48
f66241cb 49#endif