Whamcloud - gitweb
LU-3888 utils: print lmm_fid as part of getstripe 65/10465/33
authorAndreas Dilger <andreas.dilger@intel.com>
Sat, 24 Sep 2016 05:32:39 +0000 (11:02 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 29 Sep 2016 14:59:57 +0000 (14:59 +0000)
commit4dfa29e8e0e77add076ef992bb9061519669dc16
tree250086043db29cfeb7ed7324e0302bcb52189624
parent7597c672850e7e9232f7400170455fd12aa08b8a
LU-3888 utils: print lmm_fid as part of getstripe

Print the lmm_fid in the standard DFID format in addition to the older
lmm_object_id and lmm_seq fields when using "lfs getstripe -v".  This
is still a bit of a hack, since lmm_mds_md_{v1,v3} do not store a
proper FID in the header, so the fields need to be parsed separately
instead of using lmm_oi_seq() and lmm_oi_id(), but at least userspace
can start using this output in scripts instead of needing to call
path2fid separately.

In the future, new layout formats should use proper FIDs instead of
ost_id fields.

Add "lfs getstripe -F" to print the lmm_fid of a file.  This should
match the inode FID from "lfs fid2path" for 2.x-created files.

Document "lfs getstripe -g" option in lfs.1 and usage message.

Fix lfs_fid2path() to not complain on the MDS if an invalid FID is
requested, since an error is returned to the application anyway.
Don't print errors in llapi_fid2path(), there is already one being
printed in lfs_fid2path().

Rename VERBOSE_ALL to VERBOSE_DEFAULT to make it more clear what this
is for, since it didn't actually print all of the components.

Add PFL VERBOSE_COMP_* flags to lustreapi.h to avoid future conflicts.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Lokesh Nagappa Jaliminche <lokesh.jaliminche@seagate.com>
Change-Id: I4e27797ec3905327ea0a88911b1c75193d500c1e
Reviewed-on: http://review.whamcloud.com/10465
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/doc/lfs.1
lustre/include/lustre/lustre_user.h
lustre/include/lustre/lustreapi.h
lustre/mdt/mdt_handler.c
lustre/tests/sanity.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi.c