Whamcloud - gitweb
LU-13903 uapi: fixup UAPI headers for native Linux client.
This covers all the UAPI problems outside of the user land
wiretest utility. One set of problems is build and the second is
that UAPI header definitions are either user land only or never
used to valid data going to or from user land.
1) Use UAPI header definitions to validate data send to or from
kernel space. We check lum_hash_type using LMV_HASH_TYPE_MASK.
This avoids a round trip to the server which will report back
an error. The other case is we check the values returned for
LL_IOC_HSM_ACTION. We keep the original behavior of passing
unknown data to the user land application but add debug
logging if the data looks corrupt to help track down bug
issues.
2) We can use QIF_DQBLKSIZE* instead of Lustre specific values
for our quota handling. QIF_DQBLKSIZE* is a Linux UAPI quota
value.
3) The NOTIFY_GRACE_* macros are used only by user land. Move
to lustreapi.h
4) A few of the UAPI definitions are used by utility code
present on the client and the Lustre kernel server code; which
are not sent over the wire. Handle these special cases. This
covers the missing LCM_USER_MIRROR_FLAGS, LCME_TEMPLATE_FLAGS,
and LQUOTA_* values. Once server code merges upstream we can
clean this up.
5) lcfg_cmd2data() is server specific so in case of a client build
we can have get_llog_event_name() just always return NULL.
6) Don't package OpenSFS UAPI headers when building for native
Linux client.
Change-Id: I258ee917b005e438eb7c15fa6e0c4b72e9ea9d56
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/44664
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 files changed: