summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorVikas Gorur <vikas@zresearch.com>2009-02-19 04:26:47 -0800
committerAnand V. Avati <avati@dev.gluster.com>2009-02-19 04:35:31 -0800
commited1d91986cdaf0240b4e6a8c920f17b7f2d6d57b (patch)
tree0c4fa744422492dcb9f1052ce8462851fb476216 /xlators
parent1c701badce280d8de92a5314881824725deec1e6 (diff)
warn on ERANGE error for lgetxattr in posix
(amended to fit in 80 columns) ERANGE is usually caused by the user reducing the number of AFR's children but continues to use the old backend. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/storage/posix/src/xattr-cache.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/xattr-cache.c b/xlators/storage/posix/src/xattr-cache.c
index a39c35ae234..0af4e353625 100644
--- a/xlators/storage/posix/src/xattr-cache.c
+++ b/xlators/storage/posix/src/xattr-cache.c
@@ -40,6 +40,24 @@ __hgetxattr (xattr_cache_handle_t *handle, xlator_t *this,
if (op_ret == -1)
op_ret = -errno;
+
+ if (errno == ERANGE) {
+ /*
+ * xattr array is bigger than expected.
+ * This usually happens when user reduces
+ * the number of AFR's children but continues
+ * to use the old backend.
+ */
+
+ gf_log (this->name, GF_LOG_WARNING,
+ "%s: Have you reduced the number of "
+ "cluster/replicate's children but are "
+ "continuing to use the same backend? "
+ "Please populate the backend freshly "
+ "when doing such a migration.",
+ strerror (errno));
+ }
+
} else {
ret = fd_ctx_get (handle->fd, this, &tmp_pfd);
if (ret < 0) {