diff options
author | Anand Avati <avati@gluster.com> | 2010-10-29 04:32:18 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-10-29 03:42:28 -0700 |
commit | 413b2a5f9b77fd3d7f3b26c848482ec7b914102f (patch) | |
tree | 394167ed9b834714094c95dd972c4155e85bd2ef /xlators/protocol | |
parent | ffbe9470cd189b7921509c08c9b2d308b8ac390e (diff) |
protocol/client: add check for changed gfids to fail revalidates
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 971 (dynamic volume management)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/client/src/client3_1-fops.c | 9 |
1 files changed, 9 insertions, 0 deletions
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: |