Whamcloud - gitweb
LU-16518 misc: fix clang build errors 32/50332/4
authorTimothy Day <timday@amazon.com>
Wed, 14 Jun 2023 02:19:41 +0000 (02:19 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 28 Jun 2023 21:47:22 +0000 (21:47 +0000)
commit03ddd706d99b09790cb6251c338d4d246292cd06
treee715d0e09a58a686b33e65eb9781e051218ccfcf
parentaae3289adb2bbc192870f195b78044484f717e16
LU-16518 misc: fix clang build errors

Fix several format security errors by explicitly giving
the format to the affected functions.

A write test in badareaio attempts to write more than
2,147,479,552 bytes. The write will never write that
much, so reduce the size of the write to make the test
useful.

Explicitly cast ll_nfs_get_name_filldir as a filldir_t
and NR_WRITEBACK as a zone_stat_item. This silences
some implicit cast errors. These casts can likely be
removed when older kernel support is dropped.

Refactor some code to avoid strncat, which was being
used incorrectly anyway.

Adjust some variables to use more appropriate types.

Inline some functions which are only sometimes used.

Remove a LASSERTF that will never trigger, since u32
is always smaller than IDIF_MAX_OID.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I3962611de7d012e544636248353c072c9f9c9830
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50332
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 files changed:
lustre/include/lustre_log.h
lustre/lfsck/lfsck_lib.c
lustre/llite/llite_nfs.c
lustre/lod/lod_object.c
lustre/mdd/mdd_device.c
lustre/mgc/mgc_request.c
lustre/obdclass/genops.c
lustre/obdclass/llog_ioctl.c
lustre/osc/osc_lock.c
lustre/osc/osc_page.c
lustre/osp/lwp_dev.c
lustre/osp/osp_precreate.c
lustre/quota/qsd_lib.c
lustre/target/update_records.c
lustre/tests/badarea_io.c