Whamcloud - gitweb
LU-11367 som: integrate LSOM with lfs find 53/36553/3
authorQian Yingjin <qian@ddn.com>
Thu, 1 Nov 2018 08:49:53 +0000 (16:49 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 21 Nov 2019 07:35:08 +0000 (07:35 +0000)
commitd55982d8422abada4e9f23856e18d20771f70897
tree2a85e3020cbccfaf16d872ae2e408d9997275be0
parent5ddc9b21b975518d548474d82fae72be6832b0c2
LU-11367 som: integrate LSOM with lfs find

The patch integrates LSOM functionality with lfs find so that it
is possible to use LSOM functionality directly on the client. The
MDS fills in the mbo_size and mbo_blocks fields from the LSOM
xattr, if the actual size/blocks are not available, and then set
new OBD_MD_FLLSIZE and OBD_MD_FLLBLOCKS flags in the reply so that
the client knows these fields are valid.

The lfs find command adds "-l|--lazy" option to allow the use of
LSOM data from the MDS.

Add a new version of ioctl(LL_IOC_MDC_GETINFO) call that also returns
valid flags from the MDS RPC to userspace in struct lov_user_mds_data
so that it is possible to determine whether the size and blocks are
returned by the call.  The old LL_IOC_MDC_GETINFO ioctl number is
renamed to LL_IOC_MDC_GETINFO_OLD and is binary compatible, but
newly-compiled applications will use the new struct lov_user_mds_data.

New llapi interfaces llapi_get_lum_file(), llapi_get_lum_dir(),
llapi_get_lum_file_fd(), llapi_get_lum_dir_fd() are added to fetch
valid stat() attributes and LOV info to the user.

Lustre-change: https://review.whamcloud.com/35167
Lustre-commit: 11aa7f8704c490b011f60f234c3ac9929ce76948

Signed-off-by: Qian Yingjin <qian@ddn.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I21dfae7c2633dead5d83b438ec340fea4d3ebbe5
Reviewed-by: Li Xi <lixi@ddn.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/36553
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
17 files changed:
lustre/doc/lfs-find.1
lustre/doc/llapi_get_lum_dir.3 [new file with mode: 0644]
lustre/doc/llapi_get_lum_dir_fd.3 [new file with mode: 0644]
lustre/doc/llapi_get_lum_file.3 [new file with mode: 0644]
lustre/doc/llapi_get_lum_file_fd.3 [new file with mode: 0644]
lustre/include/lustre/lustreapi.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/llite/dir.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_som.c
lustre/tests/sanity.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi_hsm.c
lustre/utils/liblustreapi_layout.c
lustre/utils/lustreapi_internal.h