]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs: rename ceph_mds_request_head and _args with a _legacy postfix
authorJeff Layton <jlayton@redhat.com>
Mon, 29 Aug 2016 11:16:40 +0000 (07:16 -0400)
committerJeff Layton <jlayton@redhat.com>
Mon, 29 Aug 2016 14:33:46 +0000 (10:33 -0400)
We're going to need to introduce new versions of these structures in
order to expand the setattr union member. Rename the existing ones so
that it's clear that they are for legacy clients and servers.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/client/Client.cc
src/client/MetaRequest.h
src/include/ceph_fs.h
src/include/types.h
src/messages/MClientRequest.h

index ddf38f9beff1a89cb8d690ed8c5005041d138b8c..433f1b0168a97f00e71f80e9858f388f1724a9b5 100644 (file)
@@ -2146,7 +2146,7 @@ MClientRequest* Client::build_client_request(MetaRequest *request)
   MClientRequest *req = new MClientRequest(request->get_op());
   req->set_tid(request->tid);
   req->set_stamp(request->op_stamp);
-  memcpy(&req->head, &request->head, sizeof(ceph_mds_request_head));
+  memcpy(&req->head, &request->head, sizeof(ceph_mds_request_head_legacy));
 
   // if the filepath's haven't been set, set them!
   if (request->path.empty()) {
index 1776bdefbe47fd1d235a517f49a13f75f1c9a138..2640c5afc8c36a4bfaa462b82485e67095b63c82 100644 (file)
@@ -27,7 +27,7 @@ private:
 public:
   uint64_t tid;
   utime_t  op_stamp;
-  ceph_mds_request_head head;
+  ceph_mds_request_head_legacy head;
   filepath path, path2;
   bufferlist data;
   int inode_drop; //the inode caps this operation will drop
@@ -86,7 +86,7 @@ public:
     got_unsafe(false), item(this), unsafe_item(this),
     unsafe_dir_item(this), unsafe_target_item(this),
     caller_cond(0), dispatch_cond(0) {
-    memset(&head, 0, sizeof(ceph_mds_request_head));
+    memset(&head, 0, sizeof(ceph_mds_request_head_legacy));
     head.op = op;
   }
   ~MetaRequest();
index 1610aaf17cc2cd63cbc8dba62d5d4d760623a392..b4f2ae6e4146ca023dd18e1c4a7bc3b1332efd34 100644 (file)
@@ -399,7 +399,7 @@ extern const char *ceph_mds_op_name(int op);
 #define CEPH_READDIR_FRAG_COMPLETE     (1<<8)
 #define CEPH_READDIR_HASH_ORDER                (1<<9)
 
-union ceph_mds_request_args {
+union ceph_mds_request_args_legacy {
        struct {
                __le32 mask;                 /* CEPH_CAP_* */
        } __attribute__ ((packed)) getattr;
@@ -456,7 +456,7 @@ union ceph_mds_request_args {
 #define CEPH_MDS_FLAG_REPLAY        1  /* this is a replayed op */
 #define CEPH_MDS_FLAG_WANT_DENTRY   2  /* want dentry in reply */
 
-struct ceph_mds_request_head {
+struct ceph_mds_request_head_legacy {
        __le64 oldest_client_tid;
        __le32 mdsmap_epoch;           /* on client */
        __le32 flags;                  /* CEPH_MDS_FLAG_* */
@@ -466,7 +466,7 @@ struct ceph_mds_request_head {
        __le32 caller_uid, caller_gid;
        __le64 ino;                    /* use this ino for openc, mkdir, mknod,
                                          etc. (if replaying) */
-       union ceph_mds_request_args args;
+       union ceph_mds_request_args_legacy args;
 } __attribute__ ((packed));
 
 /* cap/lease release record */
index 7735654bf927304209a22cbf7c025b08a0cea1a4..545006c61aef560ec1618798efce4050e36c4ef0 100644 (file)
@@ -244,7 +244,7 @@ WRITE_RAW_ENCODER(ceph_fsid)
 WRITE_RAW_ENCODER(ceph_file_layout)
 WRITE_RAW_ENCODER(ceph_dir_layout)
 WRITE_RAW_ENCODER(ceph_mds_session_head)
-WRITE_RAW_ENCODER(ceph_mds_request_head)
+WRITE_RAW_ENCODER(ceph_mds_request_head_legacy)
 WRITE_RAW_ENCODER(ceph_mds_request_release)
 WRITE_RAW_ENCODER(ceph_filelock)
 WRITE_RAW_ENCODER(ceph_mds_caps_head)
index 1c374591057600c61be3d1ca6f9ea6ad1b41169b..6d0c27ec6c1677ee18689e36c5f602293b838ace 100644 (file)
@@ -50,7 +50,7 @@ class MClientRequest : public Message {
   static const int COMPAT_VERSION = 1;
 
 public:
-  struct ceph_mds_request_head head;
+  struct ceph_mds_request_head_legacy head;
   utime_t stamp;
 
   struct Release {