summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2018-06-26 10:40:08 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2018-07-02 19:32:52 +0000
commit451fd20fc8be25d8b99d5e8dfcdb43eaa3f94c72 (patch)
tree44ade1e1d5a84d44ca09949a9fd0c1917faf9839 /xlators
parent2f9e555f79ce69668950693ed2e09cfafd2b7ec1 (diff)
storage/posix: Add warning logs on failure
posix_readdirp_fill will fail to update the iatt information if posix_handle_path fails. There is currently no log message to indicate this making debugging difficult. Change-Id: I6bce360ea7d1696501637433f80e02794fe1368f updates: bz#1564071 Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/storage/posix/src/posix-inode-fd-ops.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c
index ccddf0ed745..2ebdd1a8bf1 100644
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
@@ -5025,11 +5025,21 @@ posix_readdirp_fill (xlator_t *this, fd_t *fd, gf_dirent_t *entries, dict_t *dic
itable = fd->inode->table;
len = posix_handle_path (this, fd->inode->gfid, NULL, NULL, 0);
- if (len <= 0)
+ if (len <= 0) {
+ gf_msg (this->name, GF_LOG_WARNING, 0, P_MSG_HANDLEPATH_FAILED,
+ "Failed to create handle path, fd=%p, gfid=%s",
+ fd, uuid_utoa (fd->inode->gfid));
return -1;
+ }
+
hpath = alloca (len + 256); /* NAME_MAX */
- if (posix_handle_path (this, fd->inode->gfid, NULL, hpath, len) <= 0)
+ if (posix_handle_path (this, fd->inode->gfid, NULL, hpath, len) <= 0) {
+ gf_msg (this->name, GF_LOG_WARNING, 0, P_MSG_HANDLEPATH_FAILED,
+ "Failed to create handle path, fd=%p, gfid=%s",
+ fd, uuid_utoa (fd->inode->gfid));
return -1;
+ }
+
len = strlen (hpath);
hpath[len] = '/';