Whamcloud - gitweb
LU-12806 llapi: use name_to_handle_at in llapi_fd2fid 92/36292/19
authorQuentin Bouget <quentin.bouget@cea.fr>
Thu, 12 Dec 2019 08:47:23 +0000 (09:47 +0100)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Jan 2020 05:30:59 +0000 (05:30 +0000)
commit7ff384eee1945440d5cc9a0658750fa3276fba6a
tree69f6085f810580fffbc646ae9c36e9666866cf5f
parentf0aa632d42551fcc0e7950e13b14cee70d8bab37
LU-12806 llapi: use name_to_handle_at in llapi_fd2fid

Reimplement llapi_fd2fid so as to use name_to_handle_at() rather than
using an ioctl() call.

This patch also updates llapi_fid2path as using file descriptor
obtained from a call to open() + O_PATH is valid with
name_to_handle_at(), is more efficient and also works for symlinks
out of the box.

Signed-off-by: Quentin Bouget <quentin.bouget@cea.fr>
Change-Id: Ic7e83c7fdf924363ed59a0681267d960e660db6d
Reviewed-on: https://review.whamcloud.com/36292
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/llite/llite_nfs.c
lustre/utils/liblustreapi_fid.c