diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2016-03-14 10:59:38 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-04-29 06:57:39 -0700 |
commit | b246b07896fefb261c9fb07f3f29f0d03b81b88d (patch) | |
tree | 90891fa20acd22529e2d2dcc53faec39e53134ea /xlators/protocol/server | |
parent | f8948e2c5ce3154f571c8ae16eb5804560e26590 (diff) |
dht/afr/client/posix: Fail mkdir without gfid-req
Do not allow directory creations without gfids as
after the directories are created, operations
on them fail anyway. So it is better to fail mkdir.
BUG: 1317361
Change-Id: I8f8e3b38bbded1960b7215bac0432500f7e78038
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/13690
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/protocol/server')
-rw-r--r-- | xlators/protocol/server/src/server-rpc-fops.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c index 7056af1d437..b9236705532 100644 --- a/xlators/protocol/server/src/server-rpc-fops.c +++ b/xlators/protocol/server/src/server-rpc-fops.c @@ -491,20 +491,23 @@ server_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, server_state_t *state = NULL; inode_t *link_inode = NULL; rpcsvc_request_t *req = NULL; + client_t *client = NULL; GF_PROTOCOL_DICT_SERIALIZE (this, xdata, &rsp.xdata.xdata_val, rsp.xdata.xdata_len, op_errno, out); state = CALL_STATE (frame); + client = frame->root->client; if (op_ret < 0) { gf_msg (this->name, fop_log_level (GF_FOP_MKDIR, op_errno), op_errno, PS_MSG_DIR_INFO, - "%"PRId64": MKDIR %s (%s/%s) ==> (%s)", + "%"PRId64": MKDIR %s (%s/%s) client: %s", frame->root->unique, (state->loc.path) ? state->loc.path : "", uuid_utoa (state->resolve.pargfid), - state->resolve.bname, strerror (op_errno)); + state->resolve.bname, + (!client || !client->client_uid) ? "-":client->client_uid); goto out; } |