From 177bf334bf800b261fff0eacb7c7965a915a4af3 Mon Sep 17 00:00:00 2001 From: adilger Date: Thu, 3 Oct 2002 22:29:57 +0000 Subject: [PATCH] Pack inode data into reply for mds_open(). --- lustre/mds/handler.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 24e6381..f4857aa 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -667,6 +667,7 @@ out: static int mds_open(struct ptlrpc_request *req) { struct dentry *de; + struct inode *inode; struct mds_body *body; struct file *file; struct vfsmount *mnt; @@ -713,11 +714,12 @@ static int mds_open(struct ptlrpc_request *req) RETURN(0); } + inode = de->d_inode; + /* check if this inode has seen a delayed object creation */ if (req->rq_reqmsg->bufcount > 1) { void *handle; struct lov_mds_md *lmm; - struct inode *inode = de->d_inode; struct obd_run_ctxt saved; struct obd_ucred uc; int rc, rc2; @@ -737,7 +739,7 @@ static int mds_open(struct ptlrpc_request *req) if (!rc) rc = mds_update_last_rcvd(mds, handle, req); - rc2 = mds_fs_commit(mds, de->d_inode, handle); + rc2 = mds_fs_commit(mds, inode, handle); if (rc2 && !rc) rc = rc2; pop_ctxt(&saved); @@ -764,6 +766,8 @@ out_md: list_add(&mfd->mfd_list, &med->med_open_head); body = lustre_msg_buf(req->rq_repmsg, 0); + mds_pack_inode2fid(&body->fid1, inode); + mds_pack_inode2body(body, inode); /* FIXME: need to have cookies involved here */ body->extra = (__u64) (unsigned long)file; RETURN(0); @@ -1117,7 +1121,7 @@ static int mds_setup(struct obd_device *obddev, obd_count len, void *buf) mds->mds_service = ptlrpc_init_svc(MDS_NEVENTS, MDS_NBUFS, MDS_BUFSIZE, MDS_MAXREQSIZE, - MDS_REQUEST_PORTAL, MDC_REPLY_PORTAL, + MDS_REQUEST_PORTAL, MDC_REPLY_PORTAL, "self", mds_handle, "mds"); if (!mds->mds_service) { CERROR("failed to start service\n"); -- 1.8.3.1