summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix.h
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-10-21 20:56:23 +0300
committerAmar Tumballi <amar@kadalu.io>2020-01-21 13:49:06 +0000
commitd8e685a96170a433dde93a6bc6fb8c07babb01a5 (patch)
tree6ca880bbc404e1ef1ea6853da95db1e99e995818 /xlators/storage/posix/src/posix.h
parent18549de12bcfafe4ac30fc2e11ad7a3f3c216b38 (diff)
posix-entry-ops.c/posix.h: improve GFID_NULL_CHECK_AND_GOTO macro
The macro already fetches from the dictionary the gfid-req variable. Instead of throwing it away, keep it and in 2 cases, re-use it later. updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: Id6d42535132805ab69e7e3b802c140b90f2f8958
Diffstat (limited to 'xlators/storage/posix/src/posix.h')
-rw-r--r--xlators/storage/posix/src/posix.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/xlators/storage/posix/src/posix.h b/xlators/storage/posix/src/posix.h
index c68658924ac..ce4e1193639 100644
--- a/xlators/storage/posix/src/posix.h
+++ b/xlators/storage/posix/src/posix.h
@@ -61,7 +61,7 @@
#define DISK_SPACE_CHECK_AND_GOTO(frame, priv, xdata, op_ret, op_errno, out) \
do { \
if (frame->root->pid >= 0 && priv->disk_space_full && \
- !dict_get(xdata, GLUSTERFS_INTERNAL_FOP_KEY)) { \
+ !dict_get_sizen(xdata, GLUSTERFS_INTERNAL_FOP_KEY)) { \
op_ret = -1; \
op_errno = ENOSPC; \
gf_msg_debug("posix", ENOSPC, \
@@ -89,9 +89,8 @@
#endif
#define GFID_NULL_CHECK_AND_GOTO(frame, this, loc, xattr_req, op_ret, \
- op_errno, out) \
+ op_errno, _uuid_req, out) \
do { \
- uuid_t _uuid_req; \
int _ret = 0; \
/* TODO: Remove pid check once trash implements client side \
* logic to assign gfid for entry creations inside .trashcan \
@@ -101,9 +100,7 @@
_ret = dict_get_gfuuid(xattr_req, "gfid-req", &_uuid_req); \
if (_ret) { \
gf_msg(this->name, GF_LOG_ERROR, EINVAL, P_MSG_NULL_GFID, \
- "failed to get the gfid from" \
- " dict for %s", \
- loc->path); \
+ "failed to get the gfid from dict for %s", loc->path); \
op_ret = -1; \
op_errno = EINVAL; \
goto out; \