mirror of
https://github.com/torvalds/linux.git
synced 2024-12-22 19:01:37 +00:00
ceph: update common header files
This updates the common header files used by the different ceph related modules. Specifically it adds definitions required by the rbd watch/notify feature. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
This commit is contained in:
parent
21f3b5f1bb
commit
483fac7148
@ -139,6 +139,15 @@ struct ceph_dir_layout {
|
|||||||
#define CEPH_MSG_OSD_MAP 41
|
#define CEPH_MSG_OSD_MAP 41
|
||||||
#define CEPH_MSG_OSD_OP 42
|
#define CEPH_MSG_OSD_OP 42
|
||||||
#define CEPH_MSG_OSD_OPREPLY 43
|
#define CEPH_MSG_OSD_OPREPLY 43
|
||||||
|
#define CEPH_MSG_WATCH_NOTIFY 44
|
||||||
|
|
||||||
|
|
||||||
|
/* watch-notify operations */
|
||||||
|
enum {
|
||||||
|
WATCH_NOTIFY = 1, /* notifying watcher */
|
||||||
|
WATCH_NOTIFY_COMPLETE = 2, /* notifier notified when done */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* pool operations */
|
/* pool operations */
|
||||||
enum {
|
enum {
|
||||||
@ -213,6 +222,8 @@ struct ceph_client_mount {
|
|||||||
struct ceph_mon_request_header monhdr;
|
struct ceph_mon_request_header monhdr;
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
#define CEPH_SUBSCRIBE_ONETIME 1 /* i want only 1 update after have */
|
||||||
|
|
||||||
struct ceph_mon_subscribe_item {
|
struct ceph_mon_subscribe_item {
|
||||||
__le64 have_version; __le64 have;
|
__le64 have_version; __le64 have;
|
||||||
__u8 onetime;
|
__u8 onetime;
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
* osdmap encoding versions
|
* osdmap encoding versions
|
||||||
*/
|
*/
|
||||||
#define CEPH_OSDMAP_INC_VERSION 5
|
#define CEPH_OSDMAP_INC_VERSION 5
|
||||||
#define CEPH_OSDMAP_INC_VERSION_EXT 5
|
#define CEPH_OSDMAP_INC_VERSION_EXT 6
|
||||||
#define CEPH_OSDMAP_VERSION 5
|
#define CEPH_OSDMAP_VERSION 5
|
||||||
#define CEPH_OSDMAP_VERSION_EXT 5
|
#define CEPH_OSDMAP_VERSION_EXT 6
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* fs id
|
* fs id
|
||||||
@ -181,9 +181,17 @@ enum {
|
|||||||
/* read */
|
/* read */
|
||||||
CEPH_OSD_OP_READ = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 1,
|
CEPH_OSD_OP_READ = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 1,
|
||||||
CEPH_OSD_OP_STAT = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 2,
|
CEPH_OSD_OP_STAT = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 2,
|
||||||
|
CEPH_OSD_OP_MAPEXT = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 3,
|
||||||
|
|
||||||
/* fancy read */
|
/* fancy read */
|
||||||
CEPH_OSD_OP_MASKTRUNC = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 4,
|
CEPH_OSD_OP_MASKTRUNC = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 4,
|
||||||
|
CEPH_OSD_OP_SPARSE_READ = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 5,
|
||||||
|
|
||||||
|
CEPH_OSD_OP_NOTIFY = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 6,
|
||||||
|
CEPH_OSD_OP_NOTIFY_ACK = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 7,
|
||||||
|
|
||||||
|
/* versioning */
|
||||||
|
CEPH_OSD_OP_ASSERT_VER = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 8,
|
||||||
|
|
||||||
/* write */
|
/* write */
|
||||||
CEPH_OSD_OP_WRITE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 1,
|
CEPH_OSD_OP_WRITE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 1,
|
||||||
@ -205,6 +213,8 @@ enum {
|
|||||||
CEPH_OSD_OP_CREATE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 13,
|
CEPH_OSD_OP_CREATE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 13,
|
||||||
CEPH_OSD_OP_ROLLBACK= CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 14,
|
CEPH_OSD_OP_ROLLBACK= CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 14,
|
||||||
|
|
||||||
|
CEPH_OSD_OP_WATCH = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 15,
|
||||||
|
|
||||||
/** attrs **/
|
/** attrs **/
|
||||||
/* read */
|
/* read */
|
||||||
CEPH_OSD_OP_GETXATTR = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_ATTR | 1,
|
CEPH_OSD_OP_GETXATTR = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_ATTR | 1,
|
||||||
@ -223,6 +233,9 @@ enum {
|
|||||||
CEPH_OSD_OP_BALANCEREADS = CEPH_OSD_OP_MODE_SUB | 3,
|
CEPH_OSD_OP_BALANCEREADS = CEPH_OSD_OP_MODE_SUB | 3,
|
||||||
CEPH_OSD_OP_UNBALANCEREADS = CEPH_OSD_OP_MODE_SUB | 4,
|
CEPH_OSD_OP_UNBALANCEREADS = CEPH_OSD_OP_MODE_SUB | 4,
|
||||||
CEPH_OSD_OP_SCRUB = CEPH_OSD_OP_MODE_SUB | 5,
|
CEPH_OSD_OP_SCRUB = CEPH_OSD_OP_MODE_SUB | 5,
|
||||||
|
CEPH_OSD_OP_SCRUB_RESERVE = CEPH_OSD_OP_MODE_SUB | 6,
|
||||||
|
CEPH_OSD_OP_SCRUB_UNRESERVE = CEPH_OSD_OP_MODE_SUB | 7,
|
||||||
|
CEPH_OSD_OP_SCRUB_STOP = CEPH_OSD_OP_MODE_SUB | 8,
|
||||||
|
|
||||||
/** lock **/
|
/** lock **/
|
||||||
CEPH_OSD_OP_WRLOCK = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_LOCK | 1,
|
CEPH_OSD_OP_WRLOCK = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_LOCK | 1,
|
||||||
@ -328,6 +341,8 @@ enum {
|
|||||||
CEPH_OSD_CMPXATTR_MODE_U64 = 2
|
CEPH_OSD_CMPXATTR_MODE_U64 = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define RADOS_NOTIFY_VER 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* an individual object operation. each may be accompanied by some data
|
* an individual object operation. each may be accompanied by some data
|
||||||
* payload
|
* payload
|
||||||
@ -359,6 +374,11 @@ struct ceph_osd_op {
|
|||||||
struct {
|
struct {
|
||||||
__le64 snapid;
|
__le64 snapid;
|
||||||
} __attribute__ ((packed)) snap;
|
} __attribute__ ((packed)) snap;
|
||||||
|
struct {
|
||||||
|
__le64 cookie;
|
||||||
|
__le64 ver;
|
||||||
|
__u8 flag; /* 0 = unwatch, 1 = watch */
|
||||||
|
} __attribute__ ((packed)) watch;
|
||||||
};
|
};
|
||||||
__le32 payload_len;
|
__le32 payload_len;
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
@ -402,4 +422,5 @@ struct ceph_osd_reply_head {
|
|||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user