Thanks! So now: A_PATH -> path -> full_path -> newpath A_PATH_LINK -> lnk -> full_link_path -> oldpath
while I viewed it the other way around. I guess it's not important what is left/right, old/new :) as long as it's consistent. Alex. On Tue, Jul 24, 2012 at 11:27 PM, Alexander Block <abloc...@googlemail.com> wrote: > On Thu, Jul 19, 2012 at 3:25 PM, Alex Lyakas > <alex.bolshoy.bt...@gmail.com> wrote: >> +static int process_link(const char *path, const char *lnk, void *user) >> +{ >> + int ret; >> + struct btrfs_receive *r = user; >> + char *full_path = path_cat(r->full_subvol_path, path); >> + >> + if (g_verbose >= 1) >> + fprintf(stderr, "link %s -> %s\n", path, lnk); >> + >> + ret = link(lnk, full_path); >> + if (ret < 0) { >> + ret = -errno; >> + fprintf(stderr, "ERROR: link %s -> %s failed. %s\n", path, >> + lnk, strerror(-ret)); >> + } >> >> Actually it has to be: >> char *full_link_path = path_cat(r->full_subvol_path, lnk); >> ... >> ret = link(full_path/*oldpath*/, full_link_path/*newpath*/); >> ... >> free(full_link_path); >> >> Thanks, >> Alex. > > Actually, the pathes got mixed up in-kernel. You'll find a pushed fix > in the kernel repo. I also pushed a fix to btrfs-progs containing the > full_link_path. Thanks again :) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html