aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/ceph_fs.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-12-22 14:24:33 -0500
committerSage Weil <sage@newdream.net>2009-12-23 11:17:22 -0500
commit6df058c025ce343052c5516b1d8a9a7e73cddd64 (patch)
tree58230bd258f71c2c3adf56a55d11ed39f404d12a /fs/ceph/ceph_fs.h
parent0cf90ab5b075821940873e73cdbfeb8edc3dabe8 (diff)
ceph: include transaction id in ceph_msg_header (protocol change)
Many (most?) message types include a transaction id. By including it in the fixed size header, we always have it available even when we are unable to allocate memory for the (larger, variable sized) message body. This will allow us to error out the appropriate request instead of (silently) dropping the reply. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/ceph_fs.h')
-rw-r--r--fs/ceph/ceph_fs.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/ceph/ceph_fs.h b/fs/ceph/ceph_fs.h
index e2fd0247827e..e87dfa6ec8e5 100644
--- a/fs/ceph/ceph_fs.h
+++ b/fs/ceph/ceph_fs.h
@@ -35,7 +35,7 @@
35 * internal cluster protocols separately from the public, 35 * internal cluster protocols separately from the public,
36 * client-facing protocol. 36 * client-facing protocol.
37 */ 37 */
38#define CEPH_OSD_PROTOCOL 7 /* cluster internal */ 38#define CEPH_OSD_PROTOCOL 8 /* cluster internal */
39#define CEPH_MDS_PROTOCOL 9 /* cluster internal */ 39#define CEPH_MDS_PROTOCOL 9 /* cluster internal */
40#define CEPH_MON_PROTOCOL 5 /* cluster internal */ 40#define CEPH_MON_PROTOCOL 5 /* cluster internal */
41#define CEPH_OSDC_PROTOCOL 22 /* server/client */ 41#define CEPH_OSDC_PROTOCOL 22 /* server/client */
@@ -136,7 +136,6 @@ struct ceph_mon_request_header {
136struct ceph_mon_statfs { 136struct ceph_mon_statfs {
137 struct ceph_mon_request_header monhdr; 137 struct ceph_mon_request_header monhdr;
138 struct ceph_fsid fsid; 138 struct ceph_fsid fsid;
139 __le64 tid;
140} __attribute__ ((packed)); 139} __attribute__ ((packed));
141 140
142struct ceph_statfs { 141struct ceph_statfs {
@@ -146,7 +145,6 @@ struct ceph_statfs {
146 145
147struct ceph_mon_statfs_reply { 146struct ceph_mon_statfs_reply {
148 struct ceph_fsid fsid; 147 struct ceph_fsid fsid;
149 __le64 tid;
150 __le64 version; 148 __le64 version;
151 struct ceph_statfs st; 149 struct ceph_statfs st;
152} __attribute__ ((packed)); 150} __attribute__ ((packed));
@@ -333,7 +331,7 @@ union ceph_mds_request_args {
333#define CEPH_MDS_FLAG_WANT_DENTRY 2 /* want dentry in reply */ 331#define CEPH_MDS_FLAG_WANT_DENTRY 2 /* want dentry in reply */
334 332
335struct ceph_mds_request_head { 333struct ceph_mds_request_head {
336 __le64 tid, oldest_client_tid; 334 __le64 oldest_client_tid;
337 __le32 mdsmap_epoch; /* on client */ 335 __le32 mdsmap_epoch; /* on client */
338 __le32 flags; /* CEPH_MDS_FLAG_* */ 336 __le32 flags; /* CEPH_MDS_FLAG_* */
339 __u8 num_retry, num_fwd; /* count retry, fwd attempts */ 337 __u8 num_retry, num_fwd; /* count retry, fwd attempts */
@@ -356,7 +354,6 @@ struct ceph_mds_request_release {
356 354
357/* client reply */ 355/* client reply */
358struct ceph_mds_reply_head { 356struct ceph_mds_reply_head {
359 __le64 tid;
360 __le32 op; 357 __le32 op;
361 __le32 result; 358 __le32 result;
362 __le32 mdsmap_epoch; 359 __le32 mdsmap_epoch;
@@ -542,7 +539,6 @@ struct ceph_mds_caps {
542 __le32 migrate_seq; 539 __le32 migrate_seq;
543 __le64 snap_follows; 540 __le64 snap_follows;
544 __le32 snap_trace_len; 541 __le32 snap_trace_len;
545 __le64 client_tid; /* for FLUSH(SNAP) -> FLUSH(SNAP)_ACK */
546 542
547 /* authlock */ 543 /* authlock */
548 __le32 uid, gid, mode; 544 __le32 uid, gid, mode;