[Gluster-devel] Node replaced by another machine

Anand Avati anand.avati at gmail.com
Mon Nov 28 13:45:15 UTC 2011


On Mon, Nov 28, 2011 at 10:46 AM, Emmanuel Dreyfus <manu at netbsd.org> wrote:

> Emmanuel Dreyfus <manu at netbsd.org> wrote:
>
> > Looking at FUSE exchanges, I can see that after machine2 replaced the
> > node, machine1 gets the new inode number using READDIR, but the inode
> > number returned by LOOKUP is the one for the deleted node. The only way
> > to work it around is to unmount and remount the filesystem.
>
> Below is a change that seems to fix the issue. I was figuring if this could
> not have nasty side effects and then I had the idea to check latest code in
> git: the exact same fix is already there.
>
> Are there related changes that should be bundled with that one in order to
> have the thing working properly?
>
> --- xlators/protocol/client/src/client3_1-fops.c.orig
> +++ xlators/protocol/client/src/client3_1-fops.c
> @@ -2210,9 +2210,11 @@
>         if ((!uuid_is_null (inode->gfid))
>             && (uuid_compare (stbuf.ia_gfid, inode->gfid) != 0)) {
>                gf_log (frame->this->name, GF_LOG_WARNING,
>                        "gfid changed for %s", local->loc.path);
> -               memcpy(&stbuf.ia_gfid, &inode->gfid, sizeof(inode->gfid));
> +               rsp.op_ret = -1;
> +               op_errno = ESTALE;
> +               goto out;
>         }
>
>         rsp.op_ret = 0;
>
>
I figure this is because you have http://review.gluster.com/231 in your
testing tree? That change leads to exactly the behavior you described. We
need to revisit the need for that patch.

Avati
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20111128/0ed723af/attachment-0003.html>


More information about the Gluster-devel mailing list