aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph/ceph_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ceph/ceph_fs.h')
-rw-r--r--include/linux/ceph/ceph_fs.h35
1 files changed, 28 insertions, 7 deletions
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h
index c3c74aef289d..b8e995fbd867 100644
--- a/include/linux/ceph/ceph_fs.h
+++ b/include/linux/ceph/ceph_fs.h
@@ -43,6 +43,10 @@
43#define CEPH_FEATURE_NOSRCADDR (1<<1) 43#define CEPH_FEATURE_NOSRCADDR (1<<1)
44#define CEPH_FEATURE_MONCLOCKCHECK (1<<2) 44#define CEPH_FEATURE_MONCLOCKCHECK (1<<2)
45#define CEPH_FEATURE_FLOCK (1<<3) 45#define CEPH_FEATURE_FLOCK (1<<3)
46#define CEPH_FEATURE_SUBSCRIBE2 (1<<4)
47#define CEPH_FEATURE_MONNAMES (1<<5)
48#define CEPH_FEATURE_RECONNECT_SEQ (1<<6)
49#define CEPH_FEATURE_DIRLAYOUTHASH (1<<7)
46 50
47 51
48/* 52/*
@@ -55,10 +59,10 @@ struct ceph_file_layout {
55 __le32 fl_stripe_count; /* over this many objects */ 59 __le32 fl_stripe_count; /* over this many objects */
56 __le32 fl_object_size; /* until objects are this big, then move to 60 __le32 fl_object_size; /* until objects are this big, then move to
57 new objects */ 61 new objects */
58 __le32 fl_cas_hash; /* 0 = none; 1 = sha256 */ 62 __le32 fl_cas_hash; /* UNUSED. 0 = none; 1 = sha256 */
59 63
60 /* pg -> disk layout */ 64 /* pg -> disk layout */
61 __le32 fl_object_stripe_unit; /* for per-object parity, if any */ 65 __le32 fl_object_stripe_unit; /* UNUSED. for per-object parity, if any */
62 66
63 /* object -> pg layout */ 67 /* object -> pg layout */
64 __le32 fl_pg_preferred; /* preferred primary for pg (-1 for none) */ 68 __le32 fl_pg_preferred; /* preferred primary for pg (-1 for none) */
@@ -69,6 +73,12 @@ struct ceph_file_layout {
69 73
70int ceph_file_layout_is_valid(const struct ceph_file_layout *layout); 74int ceph_file_layout_is_valid(const struct ceph_file_layout *layout);
71 75
76struct ceph_dir_layout {
77 __u8 dl_dir_hash; /* see ceph_hash.h for ids */
78 __u8 dl_unused1;
79 __u16 dl_unused2;
80 __u32 dl_unused3;
81} __attribute__ ((packed));
72 82
73/* crypto algorithms */ 83/* crypto algorithms */
74#define CEPH_CRYPTO_NONE 0x0 84#define CEPH_CRYPTO_NONE 0x0
@@ -126,9 +136,18 @@ int ceph_file_layout_is_valid(const struct ceph_file_layout *layout);
126 136
127 137
128/* osd */ 138/* osd */
129#define CEPH_MSG_OSD_MAP 41 139#define CEPH_MSG_OSD_MAP 41
130#define CEPH_MSG_OSD_OP 42 140#define CEPH_MSG_OSD_OP 42
131#define CEPH_MSG_OSD_OPREPLY 43 141#define CEPH_MSG_OSD_OPREPLY 43
142#define CEPH_MSG_WATCH_NOTIFY 44
143
144
145/* watch-notify operations */
146enum {
147 WATCH_NOTIFY = 1, /* notifying watcher */
148 WATCH_NOTIFY_COMPLETE = 2, /* notifier notified when done */
149};
150
132 151
133/* pool operations */ 152/* pool operations */
134enum { 153enum {
@@ -203,8 +222,10 @@ struct ceph_client_mount {
203 struct ceph_mon_request_header monhdr; 222 struct ceph_mon_request_header monhdr;
204} __attribute__ ((packed)); 223} __attribute__ ((packed));
205 224
225#define CEPH_SUBSCRIBE_ONETIME 1 /* i want only 1 update after have */
226
206struct ceph_mon_subscribe_item { 227struct ceph_mon_subscribe_item {
207 __le64 have_version; __le64 have; 228 __le64 have_version; __le64 have;
208 __u8 onetime; 229 __u8 onetime;
209} __attribute__ ((packed)); 230} __attribute__ ((packed));
210 231
@@ -457,7 +478,7 @@ struct ceph_mds_reply_inode {
457 struct ceph_timespec rctime; 478 struct ceph_timespec rctime;
458 struct ceph_frag_tree_head fragtree; /* (must be at end of struct) */ 479 struct ceph_frag_tree_head fragtree; /* (must be at end of struct) */
459} __attribute__ ((packed)); 480} __attribute__ ((packed));
460/* followed by frag array, then symlink string, then xattr blob */ 481/* followed by frag array, symlink string, dir layout, xattr blob */
461 482
462/* reply_lease follows dname, and reply_inode */ 483/* reply_lease follows dname, and reply_inode */
463struct ceph_mds_reply_lease { 484struct ceph_mds_reply_lease {