[Bugs] [Bug 1736481] New: capture stat failure error while setting the gfid
bugzilla at redhat.com
bugzilla at redhat.com
Thu Aug 1 18:06:30 UTC 2019
https://bugzilla.redhat.com/show_bug.cgi?id=1736481
Bug ID: 1736481
Summary: capture stat failure error while setting the gfid
Product: GlusterFS
Version: 7
Status: NEW
Component: posix
Assignee: bugs at gluster.org
Reporter: rabhat at redhat.com
CC: bugs at gluster.org
Target Milestone: ---
Classification: Community
Description of problem:
For create operation, after the entry is created, posix xlator tries to set the
gfid for that entry. While doing that, there are several places where setting
gfid can fail. While the failure is handled in all the cases, for one of the
failure cases, the errno is not captured. Capturing this might help in
debugging.
int
posix_gfid_set(xlator_t *this, const char *path, loc_t *loc, dict_t *xattr_req,
pid_t pid, int *op_errno)
{
uuid_t uuid_req;
uuid_t uuid_curr;
int ret = 0;
ssize_t size = 0;
struct stat stat = {
0,
};
*op_errno = 0;
if (!xattr_req) {
if (pid != GF_SERVER_PID_TRASH) {
gf_msg(this->name, GF_LOG_ERROR, EINVAL, P_MSG_INVALID_ARGUMENT,
"xattr_req is null");
*op_errno = EINVAL;
ret = -1;
}
goto out;
}
if (sys_lstat(path, &stat) != 0) {
ret = -1;
gf_msg(this->name, GF_LOG_ERROR, errno, P_MSG_LSTAT_FAILED,
"lstat on %s failed", path);
goto out;
}
HERE, errno is not captured.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list