[LU-13731] RHEL 8.2: VM_FAULT_RETRY is defined in mm_types.h instead of mm.h Created: 01/Jul/20  Updated: 30/Oct/20  Resolved: 20/Jul/20

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.14.0, Lustre 2.12.5
Fix Version/s: Lustre 2.14.0

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

RHEL 8.2


Issue Links:
Duplicate
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In RHEL 8.2 kernel 4.18.0-193.6.3.el8_2, VM_FAULT_RETRY is defined in mm_types.h instead of mm.h. While in Lustre codes, mm_types.h is not included, which causes VM_FAULT_RETRY redefined to 0 in llite_internal.h and vvp_io_kernel_fault() output the following error message:

LustreError: 4176:0:(vvp_io.c:1222:vvp_io_kernel_fault()) unknown error in page fault 1024


 Comments   
Comment by Gerrit Updater [ 01/Jul/20 ]

Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39222
Subject: LU-13731 llite: include linux/mm_types.h for VM_FAULT_RETRY
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 354e2e90263bf1a0cf85e7489e7ccea5620d1d6a

Comment by Gerrit Updater [ 01/Jul/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39222/
Subject: LU-13731 llite: include linux/mm_types.h for VM_FAULT_RETRY
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 2e813f3e2dc0a9a76a47dc7b74b6f7ed21f842e5

Comment by Ben Menadue [ 04/Jul/20 ]

mm_types.h already gets #include-ed through linux/mm.h, so I don't think this patch will fix it. What the problem seems to be is that those VM_FAULT_* identifiers aren't macros anymore. They've been replaced with an enumeration, and so the #ifndef VM_FAULT_RETRY will still be true and so still result in VM_FAULT_RETRY being erroneously replaced with 0. I think the easiest solution is to just remove this block:

#ifndef VM_FAULT_RETRY
#define VM_FAULT_RETRY 0
#endif

but that will break support for pre-2.6.32 kernels. Otherwise, the test needs be done at configure time so that you can detect both macros and enumerations.

Comment by Gerrit Updater [ 05/Jul/20 ]

Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39281
Subject: LU-13731 autoconf: check if VM_FAULT_RETRY is defined
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 0c5df4448172c12c5c7e47985ac327accf132536

Comment by Jian Yu [ 05/Jul/20 ]

Thank you Ben. The above patch is fixing the issue.

Comment by Gerrit Updater [ 20/Jul/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39281/
Subject: LU-13731 autoconf: check if VM_FAULT_RETRY is defined
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: d8bc3df60f21c40885be465f3a636374ffab95df

Comment by Jian Yu [ 20/Jul/20 ]

Patch landed to master branch for 2.14.0.

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