[Gluster-devel] dht and rename: how is it supposed to work?

Amar Tumballi amar at gluster.com
Fri Jul 29 05:33:34 UTC 2011


On Fri, Jul 29, 2011 at 10:59 AM, Emmanuel Dreyfus <manu at netbsd.org> wrote:

> On Fri, Jul 29, 2011 at 05:15:10AM +0000, Emmanuel Dreyfus wrote:
> >  CALL  symlink(0xbfbff990,0xbfbfc91c)
> >  MISC  link-target: "i386"
> >  NAMI  "inst.04684a"
> >  RET   symlink 0
> >  CALL  __posix_rename(0xbfbfc91c,0xbfbff995)
> >  NAMI  "inst.04684a"
> >  NAMI  "machine"
> >  RET   __posix_rename -1 errno 1 Operation not permitted
>
> I found a possible cause. dht code ineed takes care of the directory case:
>        if (IA_ISDIR (oldloc->inode->ia_type)) {
>                dht_rename_dir (frame, this);
>        } else {
>                local->op_ret = 0;
>                dht_rename_create_links (frame);
>        }
>
> But if I add a log for oldloc->inode->ia_type, I can see it is IA_IFLNK
> and not IA_IFDIR: this checks for the symlink instead of checking the
> symlink target, therefore it fails to correctly detect it is a directory.
>
> Opinions?
>
>
rename(2) can be performed on a symlink too. Hence, I guess what distribute
is doing is valid here.

Regards,
Amar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20110729/8d4c6aec/attachment-0003.html>


More information about the Gluster-devel mailing list