diff options
Diffstat (limited to 'include/linux/ceph/ceph_fs.h')
-rw-r--r-- | include/linux/ceph/ceph_fs.h | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h index 2ad7b860f062..2623cffc73a1 100644 --- a/include/linux/ceph/ceph_fs.h +++ b/include/linux/ceph/ceph_fs.h | |||
@@ -53,6 +53,29 @@ struct ceph_file_layout { | |||
53 | __le32 fl_pg_pool; /* namespace, crush ruleset, rep level */ | 53 | __le32 fl_pg_pool; /* namespace, crush ruleset, rep level */ |
54 | } __attribute__ ((packed)); | 54 | } __attribute__ ((packed)); |
55 | 55 | ||
56 | #define ceph_file_layout_su(l) ((__s32)le32_to_cpu((l).fl_stripe_unit)) | ||
57 | #define ceph_file_layout_stripe_count(l) \ | ||
58 | ((__s32)le32_to_cpu((l).fl_stripe_count)) | ||
59 | #define ceph_file_layout_object_size(l) ((__s32)le32_to_cpu((l).fl_object_size)) | ||
60 | #define ceph_file_layout_cas_hash(l) ((__s32)le32_to_cpu((l).fl_cas_hash)) | ||
61 | #define ceph_file_layout_object_su(l) \ | ||
62 | ((__s32)le32_to_cpu((l).fl_object_stripe_unit)) | ||
63 | #define ceph_file_layout_pg_pool(l) \ | ||
64 | ((__s32)le32_to_cpu((l).fl_pg_pool)) | ||
65 | |||
66 | static inline unsigned ceph_file_layout_stripe_width(struct ceph_file_layout *l) | ||
67 | { | ||
68 | return le32_to_cpu(l->fl_stripe_unit) * | ||
69 | le32_to_cpu(l->fl_stripe_count); | ||
70 | } | ||
71 | |||
72 | /* "period" == bytes before i start on a new set of objects */ | ||
73 | static inline unsigned ceph_file_layout_period(struct ceph_file_layout *l) | ||
74 | { | ||
75 | return le32_to_cpu(l->fl_object_size) * | ||
76 | le32_to_cpu(l->fl_stripe_count); | ||
77 | } | ||
78 | |||
56 | #define CEPH_MIN_STRIPE_UNIT 65536 | 79 | #define CEPH_MIN_STRIPE_UNIT 65536 |
57 | 80 | ||
58 | int ceph_file_layout_is_valid(const struct ceph_file_layout *layout); | 81 | int ceph_file_layout_is_valid(const struct ceph_file_layout *layout); |
@@ -282,6 +305,8 @@ enum { | |||
282 | CEPH_SESSION_RENEWCAPS, | 305 | CEPH_SESSION_RENEWCAPS, |
283 | CEPH_SESSION_STALE, | 306 | CEPH_SESSION_STALE, |
284 | CEPH_SESSION_RECALL_STATE, | 307 | CEPH_SESSION_RECALL_STATE, |
308 | CEPH_SESSION_FLUSHMSG, | ||
309 | CEPH_SESSION_FLUSHMSG_ACK, | ||
285 | }; | 310 | }; |
286 | 311 | ||
287 | extern const char *ceph_session_op_name(int op); | 312 | extern const char *ceph_session_op_name(int op); |
@@ -457,7 +482,8 @@ struct ceph_mds_reply_cap { | |||
457 | __u8 flags; /* CEPH_CAP_FLAG_* */ | 482 | __u8 flags; /* CEPH_CAP_FLAG_* */ |
458 | } __attribute__ ((packed)); | 483 | } __attribute__ ((packed)); |
459 | 484 | ||
460 | #define CEPH_CAP_FLAG_AUTH 1 /* cap is issued by auth mds */ | 485 | #define CEPH_CAP_FLAG_AUTH (1 << 0) /* cap is issued by auth mds */ |
486 | #define CEPH_CAP_FLAG_RELEASE (1 << 1) /* release the cap */ | ||
461 | 487 | ||
462 | /* inode record, for bundling with mds reply */ | 488 | /* inode record, for bundling with mds reply */ |
463 | struct ceph_mds_reply_inode { | 489 | struct ceph_mds_reply_inode { |
@@ -658,6 +684,14 @@ struct ceph_mds_caps { | |||
658 | __le32 time_warp_seq; | 684 | __le32 time_warp_seq; |
659 | } __attribute__ ((packed)); | 685 | } __attribute__ ((packed)); |
660 | 686 | ||
687 | struct ceph_mds_cap_peer { | ||
688 | __le64 cap_id; | ||
689 | __le32 seq; | ||
690 | __le32 mseq; | ||
691 | __le32 mds; | ||
692 | __u8 flags; | ||
693 | } __attribute__ ((packed)); | ||
694 | |||
661 | /* cap release msg head */ | 695 | /* cap release msg head */ |
662 | struct ceph_mds_cap_release { | 696 | struct ceph_mds_cap_release { |
663 | __le32 num; /* number of cap_items that follow */ | 697 | __le32 num; /* number of cap_items that follow */ |