From 7c73a25a78774bfbca9fbbafb7ead2dffafaa5b1 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 4 Jun 2012 10:41:50 +0530 Subject: 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 Reviewed-on: http://review.gluster.com/3514 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Anand Avati --- xlators/storage/posix/src/posix-helpers.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'xlators/storage') diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index 71e1eb49..6a9333a0 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 -- cgit