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>
This commit is contained in:
parent
2f9e555f79
commit
451fd20fc8
@ -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] = '/';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user