From: braam Date: Tue, 28 Jan 2003 05:02:22 +0000 (+0000) Subject: - lib lustre planning document X-Git-Tag: v1_7_100~1^94~140 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c70c987f69a009d120451fe8adf16efcb343b5ab;p=fs%2Flustre-release.git - lib lustre planning document - mds server document - return detailed status in body->flags --- diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 8cb45c2..b3e8267 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -107,6 +107,7 @@ int mds_open(struct mds_update_record *rec, int offset, RETURN(rc); } dir = parent->d_inode; + body->flags |= IT_OPEN_LOOKUP; down(&dir->i_sem); dchild = lookup_one_len(lustre_msg_buf(req->rq_reqmsg, 3), @@ -116,11 +117,17 @@ int mds_open(struct mds_update_record *rec, int offset, GOTO(out_unlock, rc = PTR_ERR(dchild)); } + if (dchild->d_inode) + body->flags |= IT_OPEN_POS; + else + body->flags |= IT_OPEN_NEG; + /* Negative dentry, just create the file */ if ((rec->ur_flags & O_CREAT) && !dchild->d_inode) { int err; void *handle; mds_start_transno(mds); + body->flags |= IT_OPEN_CREATE; handle = fsfilt_start(obd, dir, FSFILT_OP_CREATE); if (IS_ERR(handle)) { rc = PTR_ERR(handle); @@ -155,6 +162,7 @@ int mds_open(struct mds_update_record *rec, int offset, if (!S_ISREG(dchild->d_inode->i_mode)) GOTO(out_ldput, rc = 0); + body->flags |= IT_OPEN_OPEN; mfd = kmem_cache_alloc(mds_file_cache, GFP_KERNEL); if (!mfd) { CERROR("mds: out of memory\n");