[LU-13060] error: ‘ldiskfs_iget’ undeclared here (not in a function) Created: 10/Dec/19  Updated: 17/Feb/21  Resolved: 12/Dec/19

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

Type: Bug Priority: Minor
Reporter: Jian Yu Assignee: Yang Sheng
Resolution: Duplicate Votes: 0
Labels: None
Environment:

Distro/Arch: RHEL8.1/x86_64


Issue Links:
Blocker
is blocking LU-12637 Support RHEL 8.1 Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

While building Lustre server on RHEL 8.1 with kernel 4.18.0-147.0.3.el8_1, the build failed as follows:

make[3]: Entering directory '/root/kernel/rpmbuild/BUILD/kernel-4.18.0-147.0.3.el8_1/linux-4.18.0-147.0.3.el8_lustre.x86_64'
  CC [M]  /root/lustre-release/ldiskfs/inode.o
In file included from include/linux/linkage.h:7,
                 from include/linux/fs.h:6,
                 from /root/lustre-release/ldiskfs/inode.c:22:
/root/lustre-release/ldiskfs/inode.c:6294:15: error: ‘ldiskfs_iget’ undeclared here (not in a function); did you mean ‘ldiskfs_ioctl’?
 EXPORT_SYMBOL(ldiskfs_iget);
               ^~~~~~~~~~~~
include/linux/export.h:59:16: note: in definition of macro ‘___EXPORT_SYMBOL’
  extern typeof(sym) sym;      \
                ^~~
/root/lustre-release/ldiskfs/inode.c:6294:1: note: in expansion of macro ‘EXPORT_SYMBOL’
 EXPORT_SYMBOL(ldiskfs_iget);
 ^~~~~~~~~~~~~
make[5]: *** [scripts/Makefile.build:313: /root/lustre-release/ldiskfs/inode.o] Error 1

In kernel 4.18.0-147.0.3.el8_1:

struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
                          ext4_iget_flags flags, const char *function,
                          unsigned int line);

In previous kernel versions:

struct inode *ext4_iget(struct super_block *sb, unsigned long ino);


 Comments   
Comment by Peter Jones [ 10/Dec/19 ]

Yang Sheng

What do you advise here?

Peter

Comment by Yang Sheng [ 11/Dec/19 ]

Hi, Yujian,

Could you please remove the EXPORT_SYMBOL(ext4_iget) line from ext4_misc.patch? Also please change ext4-large-eas.patch for ext4_iget to adopt 3 args as:

ea_inode = ext4_iget(parent->i_sb, ea_ino, EXT4_IGET_NORMAL);

Thanks,
YangSheng

Comment by Jian Yu [ 11/Dec/19 ]

Sure, Yang Sheng. I'll try that.

Comment by Yang Sheng [ 11/Dec/19 ]

Hi, Yujian,

To fix my previous comment, I think we still need export the __ext4_iget for osd.

Thanks,
Yangsheng

Comment by Jian Yu [ 12/Dec/19 ]

It works. Thank you, Yang Sheng.
RHEL 8.1 server build passed on my local build node. I updated patch https://review.whamcloud.com/36968.

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