summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-05-02 11:38:33 +0530
committerVijay Bellur <vijay@gluster.com>2012-05-02 22:59:11 -0700
commit170a3a411c88f6ce1662c55440a372f512e901d1 (patch)
tree43fc3af043a30f0ddb75e2ade29a68d9e0826e64 /xlators/storage/posix
parent7ee1c22353e3af4153d1716a5f3629615de4510e (diff)
log cleanup: in setxattr() path
* in posix we log occassionally if errno is ENOTSUP, added a suggestion to mount with 'user_xattr' option. * changed server's *etxattr_cbk to log ENOTSUP in debug level. * changed client's *etxattr_cbk to log ENOTSUP in debug level. Change-Id: Icd604050aaa68546011f2c950ecd7883ac6ee820 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 811957 Reviewed-on: http://review.gluster.com/3140 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/storage/posix')
-rw-r--r--xlators/storage/posix/src/posix-helpers.c8
-rw-r--r--xlators/storage/posix/src/posix.c20
2 files changed, 24 insertions, 4 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index f4334302f27..06b5cedcb12 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -660,7 +660,9 @@ posix_handle_pair (xlator_t *this, const char *real_path,
GF_LOG_OCCASIONALLY(gf_xattr_enotsup_log,
this->name,GF_LOG_WARNING,
"Extended attributes not "
- "supported");
+ "supported (try remounting "
+ "brick with 'user_xattr' "
+ "flag)");
} else if (errno == ENOENT &&
!posix_special_xattr (marker_xattrs,
trav->key)) {
@@ -707,7 +709,9 @@ posix_fhandle_pair (xlator_t *this, int fd,
GF_LOG_OCCASIONALLY(gf_xattr_enotsup_log,
this->name,GF_LOG_WARNING,
"Extended attributes not "
- "supported");
+ "supported (try remounting "
+ "brick with 'user_xattr' "
+ "flag)");
} else if (errno == ENOENT) {
gf_log (this->name, GF_LOG_ERROR,
"fsetxattr on fd=%d failed: %s", fd,
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 447558a13ba..b92ab19e616 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -2569,6 +2569,19 @@ posix_getxattr (call_frame_t *frame, xlator_t *this,
size = sys_lgetxattr (real_path, key, NULL, 0);
if (size <= 0) {
op_errno = errno;
+ if ((op_errno == ENOTSUP) || (op_errno == ENOSYS)) {
+ GF_LOG_OCCASIONALLY (gf_posix_xattr_enotsup_log,
+ this->name, GF_LOG_WARNING,
+ "Extended attributes not "
+ "supported (try remounting"
+ " brick with 'user_xattr' "
+ "flag)");
+ } else {
+ gf_log (this->name, GF_LOG_ERROR,
+ "getxattr failed on %s: %s (%s)",
+ real_path, key, strerror (op_errno));
+ }
+
goto done;
}
value = GF_CALLOC (size + 1, sizeof(char), gf_posix_mt_char);
@@ -2597,7 +2610,9 @@ posix_getxattr (call_frame_t *frame, xlator_t *this,
GF_LOG_OCCASIONALLY (gf_posix_xattr_enotsup_log,
this->name, GF_LOG_WARNING,
"Extended attributes not "
- "supported.");
+ "supported (try remounting"
+ " brick with 'user_xattr' "
+ "flag)");
}
else {
gf_log (this->name, GF_LOG_ERROR,
@@ -2756,7 +2771,8 @@ posix_fgetxattr (call_frame_t *frame, xlator_t *this,
GF_LOG_OCCASIONALLY (gf_posix_xattr_enotsup_log,
this->name, GF_LOG_WARNING,
"Extended attributes not "
- "supported.");
+ "supported (try remounting "
+ "brick with 'user_xattr' flag)");
}
else {
gf_log (this->name, GF_LOG_ERROR,