[LU-16116] Linux 5.17+ Configure tests for rhltable, bitmap_alloc, rdma_wr, nla_strdup Created: 28/Aug/22  Updated: 20/May/23  Resolved: 20/May/23

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.16.0, Lustre 2.15.3

Type: Bug Priority: Minor
Reporter: Shaun Tancheff Assignee: Shaun Tancheff
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

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]

bitmap_alloc() test fails with:
... error: unused variable ‘map’ [-Werror=unused-variable]

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'


Linux commit v5.15-12273-gab2f9d2d3626
mm: unexport

{,un}

lock_page_memcg

Fails when lock_page_memcg exists but is not exported.

In file included from /home/shaun/lustre-release/lustre/include/lvfs.h:44,
                 from /home/shaun/lustre-release/lustre/include/obd.h:55,
                 from /home/shaun/lustre-release/lustre/llite/vvp_io.c:39:
/home/shaun/lustre-release/lustre/include/lustre_compat.h:468:31: error: expected identifier or ‘(’ before ‘do’
 #define lock_page_memcg(page) do {} while (0)
                               ^~
include/linux/memcontrol.h:946:6: note: in expansion of macro ‘lock_page_memcg’
 void lock_page_memcg(struct page *page);
      ^~~~~~~~~~~~~~~
/home/shaun/lustre-release/lustre/include/lustre_compat.h:468:37: error: expected identifier or ‘(’ before ‘while’
 #define lock_page_memcg(page) do {} while (0)
                                     ^~~~~
include/linux/memcontrol.h:946:6: note: in expansion of macro ‘lock_page_memcg’
 void lock_page_memcg(struct page *page);
      ^~~~~~~~~~~~~~~
/home/shaun/lustre-release/lustre/include/lustre_compat.h:469:33: error: expected identifier or ‘(’ before ‘do’
 #define unlock_page_memcg(page) do {} while (0)
                                 ^~
include/linux/memcontrol.h:947:6: note: in expansion of macro ‘unlock_page_memcg’
 void unlock_page_memcg(struct page *page);
      ^~~~~~~~~~~~~~~~~
/home/shaun/lustre-release/lustre/include/lustre_compat.h:469:39: error: expected identifier or ‘(’ before ‘while’
 #define unlock_page_memcg(page) do {} while (0)
                                       ^~~~~
include/linux/memcontrol.h:947:6: note: in expansion of macro ‘unlock_page_memcg’
 void unlock_page_memcg(struct page *page);
      ^~~~~~~~~~~~~~~~~

Adjust usage of [un]lock_page_memcg() to vvp_[un]lock_page_memcg() and
define the mapping accordingly to avoid the compile error.



 Comments   
Comment by Gerrit Updater [ 28/Aug/22 ]

"Shaun Tancheff <shaun.tancheff@hpe.com>" uploaded a new patch: https://review.whamcloud.com/48361
Subject: LU-16116 build: Configure tests for rhltable, bitmap_alloc...
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2608d12851134d408da27e817696c1e9224f39eb

Comment by Gerrit Updater [ 10/Nov/22 ]

"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49116
Subject: LU-16116 build: Configure tests for rhltable, bitmap_alloc...
Project: fs/lustre-release
Branch: b2_15
Current Patch Set: 1
Commit: 626fdd731d09a3f6357054454237acf39fc3d120

Comment by Gerrit Updater [ 13/Nov/22 ]

"Shaun Tancheff <shaun.tancheff@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49144
Subject: LU-16116 build: Fix configure tests for lock_page_memcg
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 5f11d74ff58a3a89498e40bf66499d9e6bdae967

Comment by Gerrit Updater [ 07/Jan/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/48361/
Subject: LU-16116 build: Configure tests for rhltable, bitmap_alloc...
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 009faf132dc47dcfb604b95c93211da7d2c644e2

Comment by Gerrit Updater [ 08/Mar/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49116/
Subject: LU-16116 build: Configure tests for rhltable, bitmap_alloc...
Project: fs/lustre-release
Branch: b2_15
Current Patch Set:
Commit: 130d7a0e246ab1776efff55fe11c096da1c69ec8

Generated at Sat Feb 10 03:24:09 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.