[LU-9468] incorrect stat from kthread with X86_X32 architecture Created: 08/May/17  Updated: 13/Jun/17  Resolved: 13/Jun/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.7.0, Lustre 2.9.0
Fix Version/s: Lustre 2.10.0

Type: Bug Priority: Minor
Reporter: Frank Zago (Inactive) Assignee: Frank Zago (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Under the following conditions, ll_getattr will flatten the inode number when it shouldn't:

  • the X86_X32 architecture is defined CONFIG_X86_X32, and not even used,
  • ll_getattr is called from a kernel thread (though vfs_stat for instance).

This has the result that inode numbers are different whether the same file is stat'ed from a kernel thread, or from a syscall. For instance, 4198401 vs. 144115205272502273.

ll_getattr calls ll_need_32bit_api to determine whether the task is 32 bits. When the combination is kthread+X86_X32, that function returns that the task is 32 bits, which is incorrect, as the kernel is 64 bits.

The solution is to check whether the call is from a kernel thread (which is 64 bits) and act consequently.



 Comments   
Comment by Gerrit Updater [ 08/May/17 ]

Frank Zago (fzago@cray.com) uploaded a new patch: https://review.whamcloud.com/26992
Subject: LU-9468 llite: qwertyuio
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7e62b3be7cafef486d200fff83bd34a56cadff74

Comment by Gerrit Updater [ 13/Jun/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/26992/
Subject: LU-9468 llite: fix for stat under kthread and X86_X32
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 86d26552f91e4b8cfe79a55cae8746aa1c18001e

Comment by Peter Jones [ 13/Jun/17 ]

Landed for 2.10

Generated at Sat Feb 10 02:26:27 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.