Whamcloud - gitweb
LU-9537 utils: implement "lfs getstripe --fid" for directories 14/43714/4
authorYoann Valeri <yoann.valeri@cea.fr>
Wed, 12 May 2021 09:48:04 +0000 (11:48 +0200)
committerOleg Drokin <green@whamcloud.com>
Wed, 2 Jun 2021 17:49:06 +0000 (17:49 +0000)
commitb57c88fe4b70392ca915c18e51d50ce90256ba69
tree1e24ea727b348da53b77a1cb8f4e713ee8aa19fc
parent8d1635a6182312200695983d0462dadba60af14a
LU-9537 utils: implement "lfs getstripe --fid" for directories

Enhance the lfs command by displaying a directory fid when using "lfs
getstripe --fid" on one.

When displaying information through "lfs getstripe --fid", we would
check if the given path was associated to a directory or not. If so,
the fid display would just be skipped, showing a simple blank line.
However, a user could still find the fid of a directory by using "lfs
path2fid" on the same directory.  Therefore, this patch adds a hook to
the underlying "llapi_fd2fid()" (called internally by "lfs path2fid")
when trying to display a directory fid with "lfs getstripe --fid".

Signed-off-by: Yoann Valeri <yoann.valeri@cea.fr>
Change-Id: Ia153717e3feb1a359b8b54297995365fc34a1c29
Reviewed-on: https://review.whamcloud.com/43714
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh
lustre/utils/liblustreapi.c