summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-06-01 00:14:39 +0000
committerAnand Avati <avati@gluster.com>2011-06-01 00:30:01 -0700
commit25b960346c22eff76cb456b97a828b84bd8fad38 (patch)
tree545fc870910905b8400b08906886e905ba30f745
parent654c4d856af0e939a52d850243194a9ff367197c (diff)
cluster/stripe: make sure gfid is checked with valid data
earlier logic of determining if different subvolumes have different gfid for same file had a flaw. It could have checked with a empty gfid field in case a reply comes from other subvolumes before first subvolume Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2773 ([glusterfs-3.2.0qa12]: stripe lookup says gfid different) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2773
-rw-r--r--xlators/cluster/stripe/src/stripe.c9
-rw-r--r--xlators/cluster/stripe/src/stripe.h1
2 files changed, 7 insertions, 3 deletions
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
index a06d275dfc8..8fd1000b381 100644
--- a/xlators/cluster/stripe/src/stripe.c
+++ b/xlators/cluster/stripe/src/stripe.c
@@ -333,11 +333,14 @@ stripe_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (local->postparent_size < postparent->ia_size)
local->postparent_size = postparent->ia_size;
+ if (uuid_is_null (local->ia_gfid))
+ uuid_copy (local->ia_gfid, buf->ia_gfid);
+
/* Make sure the gfid on all the nodes are same */
- if (uuid_compare (local->stbuf.ia_gfid, buf->ia_gfid)) {
+ if (uuid_compare (local->ia_gfid, buf->ia_gfid)) {
gf_log (this->name, GF_LOG_WARNING,
- "%s: gfid different on subvolume",
- local->loc.path);
+ "%s: gfid different on subvolume %s",
+ local->loc.path, prev->this->name);
}
}
}
diff --git a/xlators/cluster/stripe/src/stripe.h b/xlators/cluster/stripe/src/stripe.h
index 2d7b92dd5d1..6934244a7a6 100644
--- a/xlators/cluster/stripe/src/stripe.h
+++ b/xlators/cluster/stripe/src/stripe.h
@@ -181,6 +181,7 @@ struct stripe_local {
struct iobref *iobref;
gf_dirent_t entries;
dict_t *xattr;
+ uuid_t ia_gfid;
};
typedef struct stripe_local stripe_local_t;