From 413b2a5f9b77fd3d7f3b26c848482ec7b914102f Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Fri, 29 Oct 2010 04:32:18 +0000 Subject: protocol/client: add check for changed gfids to fail revalidates Signed-off-by: Anand V. Avati Signed-off-by: Anand V. Avati BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971 --- xlators/protocol/client/src/client3_1-fops.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'xlators') diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index 6d20e342961..184f67d0b7e 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -1890,6 +1890,15 @@ client3_1_lookup_cbk (struct rpc_req *req, struct iovec *iov, int count, buf = NULL; } + if ((!uuid_is_null (inode->gfid)) + && (uuid_compare (stbuf.ia_gfid, inode->gfid) != 0)) { + gf_log (frame->this->name, GF_LOG_DEBUG, + "gfid changed for %s", local->loc.path); + rsp.op_ret = -1; + rsp.op_errno = ESTALE; + goto out; + } + rsp.op_ret = 0; out: -- cgit