diff options
author | Amar Tumballi <amarts@redhat.com> | 2012-06-04 10:41:50 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-06-04 14:01:26 -0700 |
commit | 7c73a25a78774bfbca9fbbafb7ead2dffafaa5b1 (patch) | |
tree | e653ba2b58d039c8d64997c024b247f76e6e7cfa | |
parent | 72ac995f844bf1a0cd7e2b51e9f38e7250de9bba (diff) |
posix: fix the 'ENOENT' logs for setxattr()
from marker, setxattr() is attempted on the path even after the
unlink() happens if the fd is still active. In such cases, we should
not be logging the failures.
Change-Id: Icdd9c951f0d331cdda0bec42ae343302b2dbafde
BUG: 766611
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.com/3514
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r-- | xlators/storage/posix/src/posix-helpers.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index 71e1eb495f4..6a9333a0112 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -663,12 +663,13 @@ posix_handle_pair (xlator_t *this, const char *real_path, "supported (try remounting " "brick with 'user_xattr' " "flag)"); - } else if (errno == ENOENT && - !posix_special_xattr (marker_xattrs, - trav->key)) { - gf_log (this->name, GF_LOG_ERROR, - "setxattr on %s failed: %s", real_path, - strerror (errno)); + } else if (errno == ENOENT) { + if (!posix_special_xattr (marker_xattrs, + trav->key)) { + gf_log (this->name, GF_LOG_ERROR, + "setxattr on %s failed: %s", + real_path, strerror (errno)); + } } else { #ifdef GF_DARWIN_HOST_OS |