From 81574598ce65af3260978415ce2225af99e86cff Mon Sep 17 00:00:00 2001 From: sage Date: Fri, 22 Apr 2005 04:52:47 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@159 29311d96-e01e-0410-9327-a35deaab8ce9 --- ceph/config.cc | 2 +- ceph/mds/MDS.cc | 6 +++--- ceph/messages/MOSDRead.h | 10 ++++++++++ ceph/messages/MOSDReadReply.h | 9 +++++++++ ceph/messages/MOSDWrite.h | 13 +++++++++++++ ceph/messages/MOSDWriteReply.h | 9 +++++++++ 6 files changed, 45 insertions(+), 4 deletions(-) diff --git a/ceph/config.cc b/ceph/config.cc index 7b766363d09bb..896e7e933e19c 100644 --- a/ceph/config.cc +++ b/ceph/config.cc @@ -59,7 +59,7 @@ md_config_t g_conf = { client_op_mknod: 10, client_op_link: false, client_op_unlink: 10, - client_op_rename: 100, + client_op_rename: 00, client_op_mkdir: 10, client_op_rmdir: 10, diff --git a/ceph/mds/MDS.cc b/ceph/mds/MDS.cc index 20c4e2271a575..346eb5a60daff 100644 --- a/ceph/mds/MDS.cc +++ b/ceph/mds/MDS.cc @@ -373,11 +373,11 @@ void MDS::handle_client_request(MClientRequest *req) */ case MDS_OP_TRUNCATE: - if (!req->get_ino()) break; // can be called w/ either ino OR path + if (!req->get_iarg()) break; // can be called w/ either fh OR path case MDS_OP_CLOSE: case MDS_OP_FSYNC: - ref = mdcache->get_inode(req->get_ino()); + ref = mdcache->get_inode(req->get_iarg()); // FIXME: WRONG, look up fh! } if (!ref) { @@ -1708,7 +1708,7 @@ void MDS::handle_client_close(MClientRequest *req, CInode *cur) // reply MClientReply *reply = new MClientReply(req); reply->set_trace_dist( cur, whoami ); - reply->set_iarg( req->get_iarg() ); + //reply->set_iarg( req->get_iarg() ); messenger->send_message(reply, req->get_source(), 0, MDS_PORT_SERVER); diff --git a/ceph/messages/MOSDRead.h b/ceph/messages/MOSDRead.h index 847edcea1dd9f..f179147658eb8 100644 --- a/ceph/messages/MOSDRead.h +++ b/ceph/messages/MOSDRead.h @@ -3,6 +3,16 @@ #include "msg/Message.h" +/* + * OSD read request + * + * oid - object id + * offset, len -- guess + * + * caveat: if len=0, then the _entire_ object is read. this is currently + * used by the MDS, and pretty much a dumb idea in general. + */ + typedef struct { long tid; size_t len; diff --git a/ceph/messages/MOSDReadReply.h b/ceph/messages/MOSDReadReply.h index c2896281019e1..a9ab3693fbf46 100644 --- a/ceph/messages/MOSDReadReply.h +++ b/ceph/messages/MOSDReadReply.h @@ -3,6 +3,15 @@ #include "MOSDRead.h" +/* + * OSD Read Reply + * + * oid - object id + * offset, len - data returned + * + * len may not match the read request, if the end of object is hit. + */ + typedef struct { long tid; off_t offset; diff --git a/ceph/messages/MOSDWrite.h b/ceph/messages/MOSDWrite.h index 699e5f7bb46e8..548a3864ab877 100644 --- a/ceph/messages/MOSDWrite.h +++ b/ceph/messages/MOSDWrite.h @@ -3,6 +3,19 @@ #include "msg/Message.h" +/* + * OSD Write + * + * tid - caller's transaction id + * + * oid - object id + * offset, len - + * + * flags - passed to open(). not used at all.. this should be removed? + * + */ + + typedef struct { long tid; off_t offset; diff --git a/ceph/messages/MOSDWriteReply.h b/ceph/messages/MOSDWriteReply.h index 8aa4b02c9b3e7..f05b975d7872e 100644 --- a/ceph/messages/MOSDWriteReply.h +++ b/ceph/messages/MOSDWriteReply.h @@ -3,6 +3,15 @@ #include "MOSDWrite.h" +/* + * OSD WRite Reply + * + * tid - caller's transaction # + * oid - object id + * offset, len - ... + * result - result code, matchines write() system call: # of bytes written, or error code. + */ + typedef struct { long tid; long result; -- 2.39.5