Re: dht and rename: how is it supposed to work?

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

 





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



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux