diff options
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r-- | xlators/protocol/client/src/client-messages.h | 10 | ||||
-rw-r--r-- | xlators/protocol/client/src/client-rpc-fops.c | 9 |
2 files changed, 18 insertions, 1 deletions
diff --git a/xlators/protocol/client/src/client-messages.h b/xlators/protocol/client/src/client-messages.h index 923917643bf..ea7727e8d1b 100644 --- a/xlators/protocol/client/src/client-messages.h +++ b/xlators/protocol/client/src/client-messages.h @@ -45,7 +45,7 @@ */ #define GLFS_PC_BASE GLFS_MSGID_COMP_PC -#define GLFS_PC_NUM_MESSAGES 63 +#define GLFS_PC_NUM_MESSAGES 65 #define GLFS_PC_MSGID_END (GLFS_PC_BASE + GLFS_NUM_MESSAGES + 1) /* Messages with message IDs */ #define glfs_msg_start_x GLFS_PC_BASE, "Invalid: Start of messages" @@ -618,6 +618,14 @@ * */ +/*! + * @messageid + * @diagnosis + * @recommendedaction + * + */ +#define PC_MSG_GFID_NULL (GLFS_PC_BASE + 65) + /*------------*/ #define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages" diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c index 2e2851685fa..19b7cf6b0e9 100644 --- a/xlators/protocol/client/src/client-rpc-fops.c +++ b/xlators/protocol/client/src/client-rpc-fops.c @@ -4065,6 +4065,15 @@ client3_3_mkdir (call_frame_t *frame, xlator_t *this, args = data; + if (!args->xdata || !dict_get (args->xdata, "gfid-req")) { + op_errno = EPERM; + gf_msg_callingfn (this->name, GF_LOG_WARNING, op_errno, + PC_MSG_GFID_NULL, "mkdir: %s is received " + "without gfid-req %p", args->loc->path, + args->xdata); + goto unwind; + } + local = mem_get0 (this->local_pool); if (!local) { op_errno = ENOMEM; |