[LU-15220] Linux kernel 5.14 support Created: 12/Nov/21  Updated: 14/Jul/22  Resolved: 26/Jan/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.15.0

Type: Improvement Priority: Minor
Reporter: Jian Yu Assignee: Jian Yu
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-12511 Prepare lustre for adoption into the ... Open
is related to LU-14651 Linux kernel 5.12 support Resolved
is related to LU-16013 SLES15 SP4 client BUG: kernel NULL po... Resolved
is related to LU-15420 Linux kernel 5.15 support Open
Rank (Obsolete): 9223372036854775807

 Description   

Main changes needed to support Linux kernel 5.14 include:

  • __set_page_dirty() is no longer exported
  • idmapped mounts support, which adds 'struct user_namespace *' to all VFS operations (since kernel 5.12)
  • '/* fallthrough */' hits implicit-fallthrough error with gcc version 11. Using the pseudo keyword 'fallthrough' to resolve the issue
  • needs to import namespace CRYPTO_INTERNAL (since kernel 5.12)


 Comments   
Comment by Gerrit Updater [ 14/Nov/21 ]

"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45566
Subject: LU-15220 lustre: use 'fallthrough' pseudo keyword for switch/case use
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 280cdac4eaa8ba2c8edc2241f3fc7ed55dbcc695

Comment by Gerrit Updater [ 07/Dec/21 ]

"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45777
Subject: LU-15220 tests: avoid gcc-11 -Werror=stringop-overread warning
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 47c1be42e8844c60f634969a689a1201a8763d9b

Comment by Gerrit Updater [ 09/Dec/21 ]

"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45812
Subject: LU-15220 libcfs: fix ‘panic_notifier_list’ undeclared error
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 0cff0f403c33460a11ace8daad947108f08eb3ac

Comment by Gerrit Updater [ 09/Dec/21 ]

"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45814
Subject: LU-15220 utils: fix gcc-11 -Werror=mismatched-dealloc error
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 5c28834df928ecfa60386a227dab707fe193ba82

Comment by Gerrit Updater [ 09/Dec/21 ]

"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45815
Subject: LU-15220 utils: fix gcc-11 -Werror=format-truncation= error
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 782a2f3e26b38b31d47c73db8ea4c7984d333eae

Comment by Jian Yu [ 09/Dec/21 ]

Two more patches left.

Comment by Jian Yu [ 22/Dec/21 ]

Hi Patrick,
In kernel 5.14.0, __set_page_dirty() is no longer exported, which affects ll_account_page_dirtied()/vvp_account_page_dirtied() in lustre/llite/vvp_dev.c.
Copying the codes from __set_page_dirty() doesn't work because the account_page_dirtied() in it is also not exported.
Could you please advise how to resolve this issue? Can we use _set_page_dirty_nobuffers() instead of _set_page_dirty()?

Comment by Gerrit Updater [ 23/Dec/21 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45815/
Subject: LU-15220 utils: fix gcc-11 -Werror=format-truncation= error
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 9b0b7264a8d7a6a2abe681d15fefc88c27d20c1e

Comment by Patrick Farrell [ 23/Dec/21 ]

Jian,

Oof, this is actually pretty complicated.

I see Neil changed the code here with https://review.whamcloud.com/#/c/40827/ .  That basically makes this function pointless in these kernels - the entire point is to avoid taking the xarray lock for each page...  Hmm.

OK, here is my suggested solution for compatibility, since we have already lost the desired xarray lock behavior.  I will look at restoring that, but in the meantime:

For kernels which do not have account_page_dirtied, which should also include kernels which do not have __set_page_dirty, the right thing to do is replace all of the code in vvp_set_pagevec_dirty with a loop calling __set_page_dirty_nobuffers on the pages in the pagevec.

Comment by Gerrit Updater [ 23/Dec/21 ]

"Patrick Farrell <pfarrell@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45927
Subject: LU-15220 llite: Compat for set_pagevec_dirty
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 3757b2168e7670d513270427634324695e5ec6d4

Comment by Patrick Farrell [ 23/Dec/21 ]

Jian,

Can you take that patch and test it on the newer kernels?  I don't have the right environments available.  Thanks!

Comment by Jian Yu [ 23/Dec/21 ]

Sure, Patrick. Thank you.

Comment by Gerrit Updater [ 11/Jan/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45814/
Subject: LU-15220 utils: fix gcc-11 -Werror=mismatched-dealloc error
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 64ba2b18349b56c5d7ade944ea713bade84bc02e

Comment by Shuichi Ihara [ 17/Jan/22 ]

yujian does head of https://review.whamcloud.com/#/c/45566/ contain all considerations of linux-5.14?
I'm trying to build patch 45566 against 5.14.0-1018-oem (Ubuntu20.04), but still getting bunch of errors.

Comment by Jian Yu [ 17/Jan/22 ]

Hi Ihara,
Please apply all of the un-merged patches in this ticket and those in LU-14651.

Comment by Gerrit Updater [ 20/Jan/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45927/
Subject: LU-15220 llite: Compat for set_pagevec_dirty
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8fdef1381ea07657d6689818b2897d69cb7e9c83

Comment by Gerrit Updater [ 20/Jan/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45812/
Subject: LU-15220 libcfs: fix panic_notifier_list undeclared error
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: fb545fa83837c1478ad41f752cf5d3e313b67c73

Comment by Gerrit Updater [ 21/Jan/22 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/46269
Subject: LU-15220 lustre: use 'fallthrough' pseudo keyword for switch
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 0f36810ae522f8e7da6c5635f181cc8002204337

Comment by Gerrit Updater [ 21/Jan/22 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/46270
Subject: LU-15220 utils: use 'fallthrough' pseudo keyword for switch
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 22cf730b60f554d9cfd7ab74859284a8b5aaec6e

Comment by Gerrit Updater [ 26/Jan/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45777/
Subject: LU-15220 tests: avoid gcc-11 -Werror=stringop-overread warning
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: c5fb44f5ecf8494cd5a497947981bd6905ddc084

Comment by Gerrit Updater [ 26/Jan/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45566/
Subject: LU-15220 lnet: use 'fallthrough' pseudo keyword for switch
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8fed107588b74c2a822421e7c0b136210d3dcf65

Comment by Gerrit Updater [ 26/Jan/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/46269/
Subject: LU-15220 lustre: use 'fallthrough' pseudo keyword for switch
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5549b1b9e032c6eae63c9bde7104769697b93a0f

Comment by Gerrit Updater [ 26/Jan/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/46270/
Subject: LU-15220 utils: use 'fallthrough' pseudo keyword for switch
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: e631cd2395564833e9b6b27c64863d624ad0b7df

Comment by Peter Jones [ 26/Jan/22 ]

Landed for 2.15

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