From 56bb088c328b4f987bee7c7809dfb35bc8fb6f4a Mon Sep 17 00:00:00 2001 From: shaver Date: Mon, 28 Oct 2002 23:42:49 +0000 Subject: [PATCH] Put back lustre_msg.version (in a different spot, though, so out-of-date clients will still barf -- I think this is a feature). Some ChangeLog updates. --- lustre/ChangeLog | 4 ++++ lustre/include/linux/lustre_idl.h | 1 + lustre/ptlrpc/client.c | 1 + lustre/ptlrpc/service.c | 8 ++++++++ 4 files changed, 14 insertions(+) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 6ea122c..53f9548 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -2,6 +2,10 @@ TBA * version v0_5_16 * bug fixes: - limit Lustre IOVs to PTL_MD_MAX_IOV (611336) + * protocol change to lustre_msg: move |version| and add |flags| + * added replay of create, unlink, link and rename operations during + MDS failover; recovery should be much more robust now + * remove failed OSCs from LOVs 2002-10-23 Phil Schwan * version v0_5_15 diff --git a/lustre/include/linux/lustre_idl.h b/lustre/include/linux/lustre_idl.h index 2aa465b..cefe7f1 100644 --- a/lustre/include/linux/lustre_idl.h +++ b/lustre/include/linux/lustre_idl.h @@ -117,6 +117,7 @@ struct lustre_msg { __u64 transno; __u32 status; __u32 bufcount; + __u32 version; __u32 buflens[0]; }; diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index d87ea31..92979c0 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -197,6 +197,7 @@ struct ptlrpc_request *ptlrpc_prep_req(struct obd_import *imp, int opcode, spin_unlock(&conn->c_lock); request->rq_reqmsg->magic = PTLRPC_MSG_MAGIC; + request->rq_reqmsg->version = PTLRPC_MSG_VERSION; request->rq_reqmsg->opc = HTON__u32(opcode); request->rq_reqmsg->flags = 0; diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index 5af5c4f..e80a8de 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -185,6 +185,14 @@ static int handle_incoming_request(struct obd_device *obddev, goto out; } + if (request->rq_reqmsg->version != PTLRPC_MSG_VERSION) { + CERROR("wrong lustre_msg version %d: ptl %d from "LPX64" xid " + LPD64"\n", + request->rq_reqmsg->version, svc->srv_req_portal, + event->initiator.nid, request->rq_xid); + goto out; + } + CDEBUG(D_NET, "got req "LPD64" (md: %p + %d)\n", request->rq_xid, event->mem_desc.start, event->offset); -- 1.8.3.1