gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Amar Tumballi
Subject: Re: [Gluster-devel] dht and rename: how is it supposed to work?
Date: Fri, 29 Jul 2011 11:03:34 +0530



On Fri, Jul 29, 2011 at 10:59 AM, Emmanuel Dreyfus <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]