Whamcloud - gitweb
LU-11376 lov: new foreign LOV format 55/33755/37
authorBruno Faccini <bruno.faccini@intel.com>
Wed, 27 Feb 2019 21:59:52 +0000 (16:59 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 8 May 2019 05:50:34 +0000 (05:50 +0000)
commit6a20bdcc608bc2b933774b9f34ec25395e920a54
tree259cd95f2a348d5fa856bd38173844ca7e9d7a90
parent4191e0cdd0d96b848c1235471179d25d37a889dc
LU-11376 lov: new foreign LOV format

This patch introduces a new layout/LOV format in order to
allow to specify an arbitrary external reference for a file
in Lustre namespace.
The new LOV format is made of {newmagic, length, type, flags,
string[length]} to be as flexible as possible.
Foreign file can be created by using the open(O_LOV_DELAY_CREATE) +
ioctl(LL_IOC_LOV_SETSTRIPE) operations and it can only be and remain
an empty file until removed.
A new API method llapi_file_create_foreign() has been introduced
and "lfs [[get,set]stripe,find" modified to understand new layout.
The idea behind this is to provide Lustre namespace support and
layout prefetch/caching under layout protection, for user/external
usage.

Code has been added for lfsck to handle foreign files, and
a new sub-test has been added in sanity-lfsck in order to verify
if does not break foreign file and that reverse is also true.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I5d9c0642fe8e7009c30918bfa946cac7c00c9af8
Reviewed-on: https://review.whamcloud.com/33755
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
30 files changed:
lustre/doc/Makefile.am
lustre/doc/lfs-find.1
lustre/doc/lfs-setstripe.1
lustre/doc/llapi_file_create_foreign.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/lfsck/lfsck_layout.c
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/xattr.c
lustre/llite/xattr26.c
lustre/lod/lod_internal.h
lustre/lod/lod_lov.c
lustre/lod/lod_object.c
lustre/lod/lod_qos.c
lustre/lov/lov_cl_internal.h
lustre/lov/lov_ea.c
lustre/lov/lov_internal.h
lustre/lov/lov_object.c
lustre/lov/lov_pack.c
lustre/lov/lov_page.c
lustre/tests/Makefile.am
lustre/tests/create_foreign_file.c [new file with mode: 0644]
lustre/tests/parse_foreign_file.c [new file with mode: 0644]
lustre/tests/sanity-lfsck.sh
lustre/tests/sanity.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi.map