Whamcloud - gitweb
LU-14732 utils: ensure hsm_user_request extent fields are zero 93/43893/3
authorJames Simmons <jsimmons@infradead.org>
Tue, 1 Jun 2021 23:00:58 +0000 (19:00 -0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 14 Jun 2021 16:43:26 +0000 (16:43 +0000)
commit0cdd427e2f043cf667c9a921b48ce3b99a5f81fc
treebfbda3207b07fe9e29c32c519403f12d2cc250e6
parentf430ec079bf882744729d7aabc2021dfd26aba0c
LU-14732 utils: ensure hsm_user_request extent fields are zero

Another patch changed the linking flags for liblustreapi which
caused sanit-hsm 29c to fail. Debugging revealed the reason was
the extent fields in hsm_user_request sent to the kernel was
not zeroed out. For some reason the compiler flags hide this
bug. I found this is easily reproduced by removing
lhsmtool_posix_DEPENDENCIES which is not needed anyways since
the build system can calculate those dependencies for us.
Update the function llapi_hsm_user_request_alloc to zero out
the struct hsm_user_request allocated.

Change-Id: I02c1d6b5cec1ed3e89086a6a00e30ca81768409c
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/43893
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Ben Evans <beevans@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/Makefile.am
lustre/utils/liblustreapi_hsm.c