summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/cluster/afr/src/afr-common.c5
-rw-r--r--xlators/cluster/dht/src/dht-common.c21
-rw-r--r--xlators/cluster/stripe/src/stripe.c7
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c2
4 files changed, 33 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 7e54bfe5bd1..4091cc2a269 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -628,6 +628,11 @@ afr_lookup_self_heal_check (xlator_t *this, afr_local_t *local,
local->self_heal.need_data_self_heal = _gf_true;
}
+ if (uuid_compare (buf->ia_gfid, lookup_buf->ia_gfid)) {
+ /* mismatching gfid */
+ gf_log (this->name, GF_LOG_WARNING,
+ "%s: gfid different on subvolume", local->loc.path);
+ }
}
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 0220d5e59e0..10f61cca005 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -170,6 +170,13 @@ dht_lookup_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (!op_ret && uuid_is_null (local->gfid))
memcpy (local->gfid, stbuf->ia_gfid, 16);
+ /* Check if the gfid is different for file from other node */
+ if (!op_ret && uuid_compare (local->gfid, stbuf->ia_gfid)) {
+ gf_log (this->name, GF_LOG_WARNING,
+ "%s: gfid different on %s",
+ local->loc.path, prev->this->name);
+ }
+
LOCK (&frame->lock);
{
/* TODO: assert equal mode on stbuf->st_mode and
@@ -662,6 +669,12 @@ dht_lookup_everywhere_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (uuid_is_null (local->gfid))
memcpy (local->gfid, buf->ia_gfid, 16);
+ if (uuid_compare (local->gfid, buf->ia_gfid)) {
+ gf_log (this->name, GF_LOG_WARNING,
+ "%s: gfid differs on subvolume %s",
+ loc->path, prev->this->name);
+ }
+
is_linkfile = check_is_linkfile (inode, buf, xattr);
is_dir = check_is_dir (inode, buf, xattr);
@@ -873,6 +886,12 @@ dht_lookup_linkfile_cbk (call_frame_t *frame, void *cookie,
goto err;
}
+ if (uuid_compare (local->gfid, stbuf->ia_gfid)) {
+ gf_log (this->name, GF_LOG_WARNING,
+ "%s: gfid different on data file on %s",
+ local->loc.path, subvol->name);
+ }
+
if ((stbuf->ia_nlink == 1)
&& (conf && conf->unhashed_sticky_bit)) {
stbuf->ia_prot.sticky = 1;
@@ -977,7 +996,7 @@ dht_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* This is required for handling stale linkfile deletion,
* or any more call which happens from this 'loc'.
*/
- if (uuid_is_null (local->gfid) && !op_ret)
+ if (!op_ret && uuid_is_null (local->gfid))
memcpy (local->gfid, stbuf->ia_gfid, 16);
if (ENTRY_MISSING (op_ret, op_errno)) {
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
index f83be785a09..de160261472 100644
--- a/xlators/cluster/stripe/src/stripe.c
+++ b/xlators/cluster/stripe/src/stripe.c
@@ -266,6 +266,13 @@ stripe_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local->stbuf_size = buf->ia_size;
if (local->postparent_size < postparent->ia_size)
local->postparent_size = postparent->ia_size;
+
+ /* Make sure the gfid on all the nodes are same */
+ if (uuid_compare (local->stbuf.ia_gfid, buf->ia_gfid)) {
+ gf_log (this->name, GF_LOG_WARNING,
+ "%s: gfid different on subvolume",
+ local->loc.path);
+ }
}
}
UNLOCK (&frame->lock);
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index 5c01fb5abe6..9d0ed5ace5a 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -2204,7 +2204,7 @@ client3_1_lookup_cbk (struct rpc_req *req, struct iovec *iov, int count,
if ((!uuid_is_null (inode->gfid))
&& (uuid_compare (stbuf.ia_gfid, inode->gfid) != 0)) {
- gf_log (frame->this->name, GF_LOG_WARNING,
+ gf_log (frame->this->name, GF_LOG_DEBUG,
"gfid changed for %s", local->loc.path);
rsp.op_ret = -1;
rsp.op_errno = ESTALE;