Whamcloud - gitweb
LU-12650 lib: fix strings comparison during mount searching
get_root_path() returns path to "lustre" mount instead "lustre1"
because last symbol is not taking in account during comparison.
This bug has influence to get_root_path() users.
For example, fid2path use get_root_path().
lfs path2fid /mnt/lustre2/foodir3
[0x200000401:0x1:0x0]
lfs fid2path lustre2 [0x200000401:0x1:0x0]
lfs fid2path: cannot find '[0x200000401:0x1:0x0]': No such file or
directory
umount /mnt/lustre
lfs fid2path lustre2 [0x200000401:0x1:0x0]
foodir3
This fix adds strings length comparison.
Signed-off-by: Artem Blagodarenko <c17828@cray.com>
Cray-bug-id: LUS-7693
Change-Id: I3275d2182486d25389814f4c25b3f2a54ec29469
Reviewed-on: https://review.whamcloud.com/35755
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>