diff options
author | M. Mohan Kumar <mohan@in.ibm.com> | 2010-06-16 04:57:22 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2010-08-02 15:28:31 -0400 |
commit | 01a622bd7409bb7af38e784cff814e5e723f7951 (patch) | |
tree | 1b6e0d9806e560d7f89e0efa8981cfba4c213361 /net/9p | |
parent | 4b43516ab19b748b48322937fd9307af17541c4d (diff) |
9p: Implement TMKDIR
Implement TMKDIR as part of 2000.L Work
Synopsis
size[4] Tmkdir tag[2] fid[4] name[s] mode[4] gid[4]
size[4] Rmkdir tag[2] qid[13]
Description
mkdir asks the file server to create a directory with given name,
mode and gid. The qid for the new directory is returned with
the mkdir reply message.
Note: 72 is selected as the opcode for TMKDIR from the reserved list.
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net/9p')
-rw-r--r-- | net/9p/client.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index cdfbd6740796..a3bdd341f2ac 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -1653,3 +1653,34 @@ error: | |||
1653 | 1653 | ||
1654 | } | 1654 | } |
1655 | EXPORT_SYMBOL(p9_client_mknod_dotl); | 1655 | EXPORT_SYMBOL(p9_client_mknod_dotl); |
1656 | |||
1657 | int p9_client_mkdir_dotl(struct p9_fid *fid, char *name, int mode, | ||
1658 | gid_t gid, struct p9_qid *qid) | ||
1659 | { | ||
1660 | int err; | ||
1661 | struct p9_client *clnt; | ||
1662 | struct p9_req_t *req; | ||
1663 | |||
1664 | err = 0; | ||
1665 | clnt = fid->clnt; | ||
1666 | P9_DPRINTK(P9_DEBUG_9P, ">>> TMKDIR fid %d name %s mode %d gid %d\n", | ||
1667 | fid->fid, name, mode, gid); | ||
1668 | req = p9_client_rpc(clnt, P9_TMKDIR, "dsdd", fid->fid, name, mode, | ||
1669 | gid); | ||
1670 | if (IS_ERR(req)) | ||
1671 | return PTR_ERR(req); | ||
1672 | |||
1673 | err = p9pdu_readf(req->rc, clnt->proto_version, "Q", qid); | ||
1674 | if (err) { | ||
1675 | p9pdu_dump(1, req->rc); | ||
1676 | goto error; | ||
1677 | } | ||
1678 | P9_DPRINTK(P9_DEBUG_9P, "<<< RMKDIR qid %x.%llx.%x\n", qid->type, | ||
1679 | (unsigned long long)qid->path, qid->version); | ||
1680 | |||
1681 | error: | ||
1682 | p9_free_req(clnt, req); | ||
1683 | return err; | ||
1684 | |||
1685 | } | ||
1686 | EXPORT_SYMBOL(p9_client_mkdir_dotl); | ||