summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/storage/posix/src/posix-helpers.c9
-rw-r--r--xlators/storage/posix/src/posix.c4
2 files changed, 8 insertions, 5 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index 47c47dab07e..678e3770769 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -1695,6 +1695,10 @@ __posix_fd_ctx_get (fd_t *fd, xlator_t *this, struct posix_fd **pfd_p,
dir = sys_opendir (real_path);
if (!dir) {
op_errno = errno;
+ gf_msg (this->name, GF_LOG_ERROR, op_errno,
+ P_MSG_READ_FAILED,
+ "Failed to get anonymous fd for "
+ "real_path: %s.", real_path);
GF_FREE (pfd);
pfd = NULL;
goto out;
@@ -1718,8 +1722,9 @@ __posix_fd_ctx_get (fd_t *fd, xlator_t *this, struct posix_fd **pfd_p,
op_errno = errno;
gf_msg (this->name, GF_LOG_ERROR, op_errno,
P_MSG_READ_FAILED,
- "Failed to get anonymous "
- "real_path: %s _fd = %d", real_path, _fd);
+ "Failed to get anonymous fd for "
+ "real_path: %s.", real_path);
+
GF_FREE (pfd);
pfd = NULL;
goto out;
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 503a6512130..fa41c4c90c8 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -3385,7 +3385,6 @@ posix_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
if (ret < 0) {
gf_msg (this->name, GF_LOG_WARNING, ret, P_MSG_PFD_NULL,
"pfd is NULL from fd=%p", fd);
- op_errno = -ret;
goto out;
}
@@ -5916,7 +5915,6 @@ posix_fstat (call_frame_t *frame, xlator_t *this,
if (ret < 0) {
gf_msg (this->name, GF_LOG_WARNING, op_errno, P_MSG_PFD_NULL,
"pfd is NULL, fd=%p", fd);
- op_errno = -ret;
goto out;
}
@@ -6348,7 +6346,7 @@ posix_do_readdir (call_frame_t *frame, xlator_t *this,
ret = posix_fd_ctx_get (fd, this, &pfd, &op_errno);
if (ret < 0) {
- gf_msg (this->name, GF_LOG_WARNING, -ret, P_MSG_PFD_NULL,
+ gf_msg (this->name, GF_LOG_WARNING, op_errno, P_MSG_PFD_NULL,
"pfd is NULL, fd=%p", fd);
goto out;
}