LU-17495 build: cleanup configure messages Convert some remaining configure checks to use LB2_MSG_LINUX_TEST_RESULT Also drop the undefined macro LC_CONFIG_HEALTH_CHECK_WRITE Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: If0ae4f7549d5e1a46d6a5ce99d40ebcbd76c5e85 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53874 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Timothy Day <timday@amazon.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-17173 gss: user keys go to user keyring Keys for root, that are used for Lustre internal processing, are stored in the session keyring. That way they can be found by all Lustre processes in userspace and in the kernel. For end user keys, it is better to store them in the user keyring. This simplifies key management, makes them shared accross all user sessions, and avoids unfortunate key leak if lfs flushctx is not called at user logout. Test-Parameters: kerberos=true testlist=sanity-krb5 Signed-off-by: Sebastien Buisson <sbuisson@ddn.com> Change-Id: Ibb3d326e89dcacc89e77eca76cdb773861d3a8a7 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52771 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Aurelien Degremont <adegremont@nvidia.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-17186 utils: replace gethostby*() with get*info() This patch replaces the deprecated gethostbyname() and gethostbyaddr() functions with getaddrinfo() and getnameinfo() functions respectively. The getaddrinfo() function combines the functionality provided by the gethostbyname() and getservbyname() functions into a single interface, but unlike the latter functions, getaddrinfo() is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies. The getnameinfo() function is the inverse of getaddrinfo(): it converts a socket address to a corresponding host and service, in a protocol-independent manner. It combines the functionality of gethostbyaddr() and getservbyport(), but unlike those functions, getnameinfo() is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies. Test-Parameters: kerberos=true testlist=sanity-krb5 Test-Parameters: testgroup=review-dne-selinux-ssk-part-2 Signed-off-by: Jian Yu <yujian@whamcloud.com> Signed-off-by: Sebastien Buisson <sbuisson@ddn.com> Change-Id: Iacb5583826cd2f7329455bc6cbb4477f9087f15a Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52632 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-16962 build: cleanup configure messages Take advantage of LB2_MSG_LINUX_TEST_RESULT to cleanup the remaining configure checks. Re-order checking of OpenSSL support so checking message and result are not split. Test-Parameters: trivial HPE-bug-id: LUS-11709 Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: I2880e2b50f4cc79106201c241fe7c078e5d8c37e Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51857 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Chris Horn <chris.horn@hpe.com> Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com> Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com> Reviewed-by: xinliang <xinliang.liu@linaro.org> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-16699 osc: Prefer NR_ZONE_WRITE_PENDING Linux commit v4.7-5966-g5a1c84b404a7 mm: remove reclaim and compaction retry approximations Introduced NR_ZONE_WRITE_PENDING which should be used in mod_zone_page_state. Older kernels should fallback to NR_UNSTABLE_NFS or NR_WRITEBACK. Test-Parameters: trivial HPE-bug-id: LUS-11559 Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: I90f22d4bd56f5986eaa5d4a042a2c8ed31fbf752 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50499 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com> Reviewed-by: Neil Brown <neilb@suse.de> Reviewed-by: Qian Yingjin <qian@ddn.com> Reviewed-by: James Simmons <jsimmons@infradead.org>
LU-16962 build: parallel header checks Add LB2_CHECK_LINUX_HEADER_SRC and LB2_CHECK_LINUX_HEADER_RESULT macros to use for running header checks in parallel. Migrate (most) header checks to parallel and run a subset early as the results of those tests are required by other configure tests. Test-Parameters: trivial HPE-bug-id: LUS-11710 Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: Ia765261179d25e96912e65e31c81824b4507e604 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51673 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
LU-16957 build: Improve parallel --config-cache The parallel build should consider the configure cache before adding tests to the parallel build pass. Track the number of compile tests needed, skip the make when no build tests are needed. Also unify libcfs, core, and ldiskfs build passes to a single step. Configure timings vs master master master w/cache | patch patch w/cache -------------- --------------- | --------------- ---------------- real 1m3.493s real 0m34.024s | real 1m3.903s real 0m8.404s user 1m34.587s user 1m16.547s | user 1m37.191s user 0m4.292s sys 0m35.119s sys 0m22.687s | sys 0m35.297s sys 0m5.514s Test-Parameters: trivial HPE-bug-id: LUS-11706 Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: I6696b350e8315190a67c1463435b18a87d45813e Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51637 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: Chris Horn <chris.horn@hpe.com>
LU-16893 libcfs: Remove force_sig usage from lfsck The lfsck pool of kernel threads uses force_sig() to signal the worker threads to stop. A signal is used here as the lfsck workers may be waiting in various, and possibly nested, states. As force_sig() has been removed let us simply enable SIGINT to be passed to the worker threads using send_sig(). Test-parameters: testlist=sanity-lfsck,lfsck-performance HPE-bug-id: LUS-11670 Fixes: db9f9543ec ("LU-12634 libcfs: force_sig() removed task parameter") Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: Ibf6a67f43687960b3eff9cb9a7c7dc8b1be1da63 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51470 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: Neil Brown <neilb@suse.de>
LU-16517 build: pass extra configure options to "make debs" While running "make debs", the configure command in debian/rules ignores some user defined configure options. This patch fixes the issue by adding the detection of the extra options into debian/rules. Test-Parameters: trivial clientdistro=ubuntu2204 Change-Id: Ia9db4e05abf33834cb3c853f4f0829dadc8d7400 Signed-off-by: Jian Yu <yujian@whamcloud.com> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50464 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Tested-by: Shuichi Ihara <sihara@ddn.com> Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com> Reviewed-by: Shuichi Ihara <sihara@ddn.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-6142 obd: change lmd flags to bitmap Change lmd flags to an enum that is accessible with the Linux bitmap API. This lays the foundation for creating a match table for the server options for mounting. Change-Id: If7906a9a3ba177b67d0cfbaa276a00a6ba9b7b6d Signed-off-by: James Simmons <jsimmons@infradead.org> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49912 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Neil Brown <neilb@suse.de> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-16734 gss: fix lookup_user_key() bug With more recent kernels, like on Ubuntu 22.04, trying to delete some keyring resources trigger a kernel warning message and cleaning is not successful, leading to stuck resources and warning messages being regularly printed. This is because Linux 5.8, in commit 8c0637e, introduced an API change for lookup_user_key() that was not taken in account. Update the lookup_user_key() call from _user_key() to fix it. Change-Id: I34ef4dac3f56cbb4aac6bc5a3bad36feb66b8675 Signed-off-by: Aurelien Degremont <adegremont@nvidia.com> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50623 Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com> Reviewed-by: Sebastien Buisson <sbuisson@ddn.com> Reviewed-by: Jonathan Calmels <jcalmels@nvidia.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com>
LU-10391 libcfs: add large-nid string conversion functions. The user-space libcfs now has functions to convert between strings and large nids. Signed-off-by: Mr NeilBrown <neilb@suse.de> Change-Id: I554e2da0c3d56397ebe60fc84fad28fec6704a18 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50092 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-16655 scrub: change sf_uuid to guid_t Change the type of sf_uuid from uuid_t to guid_t. The sizes are identical, but the benefit is that guid_t is usable in userspace with the <linux/uuid.h> header, unlike uuid_t. Change the accessors to use the corresponding guid_*() functions, but no functional changes are needed. Test-Parameters: trivial Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Change-Id: I3048cfee20a5e4ea2c0c2203d22eb76c1437577b Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50496 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-13485 libcfs: Remove unused iter_type check The iter_type member check is not used, remove it. Test-Parameters: trivial Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: I48d536a27738e73314feb88317d41d8479c72528 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48091 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Jian Yu <yujian@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-16534 build: Prefer timer_delete[_sync] Linux commit v6.1-rc1-7-g9a5a30568697 timers: Get rid of del_singleshot_timer_sync() Linux commit v6.1-rc1-11-g9b13df3fb64e timers: Rename del_timer_sync() to timer_delete_sync() Linux commit v6.1-rc1-12-gbb663f0f3c39 timers: Rename del_timer() to timer_delete() Prefer timer_delete_sync() to del_singleshot_timer_sync() Prefer timer_delete_sync() to del_timer_sync() Prefer del_timer() to timer_delete() Provide del_timer and del_timer_sync when timer_delete[_sync] is not available Test-Parameters: trivial HPE-bug-id: LUS-11470 Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: I4c946c315a83482dd0bd69e5e89f0302a67bf81c Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49922 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: jsimmons <jsimmons@infradead.org> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-16520 build: Move strscpy to libcfs common header Ensure strscpy is available to lustre Test-Parameters: trivial Fixes: 0b406c91d17 ("LU-13642 lnet: modify lnet_inetdev to work with large NIDS") Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: I0c3673c2aa7e6b61671521a8cabde8a364f7f6f8 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49863 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: jsimmons <jsimmons@infradead.org> Reviewed-by: Jian Yu <yujian@whamcloud.com> Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-16510 build: fortified memcpy from linux 6.1 The fortified memcpy() from Linux v5.11-11104-ga28a6e860c6c through v5.18-rc5-1405-g43213daed6d6 incorrectly reports a false positive out of bounds check. In function 'memcpy' ... '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter Test-Parameters: trivial HPE-bug-id: LUS-11459 Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: I3a59d8b647833c05ff4b51e327ed8bce894141fe Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49811 Reviewed-by: Jian Yu <yujian@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: Yang Sheng <ys@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Tested-by: jenkins <devops@whamcloud.com>
LU-13485 libcfs: Parallel configure tests for libcfs Transform the compile tests in libcfs to run in parallel Test-Parameters: trivial Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: I76ab65558dd456dc08d6ef4a1985455ce1f17913 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/38349 Reviewed-by: Jian Yu <yujian@whamcloud.com> Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com>
LU-16202 build: bio_alloc takes struct block_device Linux commit v5.17-rc2-21-g07888c665b40 block: pass a block_device and opf to bio_alloc Create a compatible bio_alloc wrapper to handle the change in arguments and behavior. HPE-bug-id: LUS-11267 Test-Parameters: trivial Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Signed-off-by: Jian Yu <yujian@whamcloud.com> Change-Id: I060229b25785f46a9749fcdb18727af292a940ac Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48820 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-16116 build: Configure tests for rhltable, bitmap_alloc... rhel8.6 with kernel 5.18 breaks a couple of compile tests struct rhltable test fails with: ... error: ‘hlt’ is used uninitialized in this function [-Werror=uninitialized] rdma_wr() test failes with: ... error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] wr = rdma_wr(NULL); nla_strdup() test fails due to unused variable 'tmp' Test-Parameters: trivial HPE-bug-id: LUS-11191 Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: Ib2b1d223ac809cea157158fe35fd2535b04367df Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48361 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Jian Yu <yujian@whamcloud.com> Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>