Whamcloud - gitweb
LU-11367 som: integrate LSOM with lfs find 67/35167/22
authorQian Yingjin <qian@ddn.com>
Thu, 1 Nov 2018 08:49:53 +0000 (16:49 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 20 Sep 2019 07:55:32 +0000 (07:55 +0000)
commit11aa7f8704c490b011f60f234c3ac9929ce76948
treef9fe6e64c97bb319f423ee08ee91b0afd12f7a86
parent7ee319ed7f9dfa365a66b20b03f2141c54fb0293
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.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I21dfae7c2633dead5d83b438ec340fea4d3ebbe5
Reviewed-on: https://review.whamcloud.com/35167
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.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 [changed mode: 0644->0755]
lustre/utils/lfs.c
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi_hsm.c
lustre/utils/liblustreapi_layout.c
lustre/utils/lustreapi_internal.h