Whamcloud - gitweb
LU-8015 utils: fix lr_link() to get correct src and dest 99/19599/5
authorJian Yu <jian.yu@intel.com>
Fri, 15 Apr 2016 07:54:20 +0000 (00:54 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 22 Apr 2016 15:48:37 +0000 (15:48 +0000)
commita72e6ee375248636cac1ea212d517254c8850b88
tree25c3e057627fdf2659d6e2851dd7b645a9167a35
parent2a4205dd5d254f99df9124d0ffe722db4500280b
LU-8015 utils: fix lr_link() to get correct src and dest

The current codes in lr_link() of lustre_rsync.c can not
find out the correct info->src and info->dest in the
following situations:
1) the source name ends with the destination name
2) the file has two links with the same name but
   in different directories

This patch fixes the above issue by using the path of the
parent FID and target name to construct info->dest, and
comparing the path of the target FID with info->dest to
get the correct info->src.

Test-Parameters: testlist=lustre-rsync-test
Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ia92b01c069bde01bd0f094017bd2502292afc7f8
Reviewed-on: http://review.whamcloud.com/19599
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/lustre-rsync-test.sh
lustre/utils/lustre_rsync.c