[LU-16895] ll_iocontrol() should use 'll_i2sbi(inode)' in place of 'sbi' Created: 14/Jun/23  Updated: 14/Jun/23  Resolved: 14/Jun/23

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

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

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

ll_iocontrol() handler does not define sbi.

if OBD_IOC_GETNAME_OLD is defined a compiler error can occur:

In file included from /home/shaun/lustre-release/lustre/llite/llite_lib.c:62:
/home/shaun/lustre-release/lustre/llite/llite_lib.c: In function ‘ll_iocontrol’:
/home/shaun/lustre-release/lustre/llite/llite_lib.c:3334:36: error: ‘sbi’ undeclared (first use in this function)
 3334 |                                    sbi->ll_md_exp->exp_obd->obd_name, 2, 16);
      |                                    ^~~
/home/shaun/lustre-release/lustre/include/lustre_ioctl_old.h:40:62: note: in definition of macro ‘case_OBD_IOC_DEPRECATED’
   40 |                               printed ? D_IOCTL : D_WARNING, dev, cmd,  \
      |                                                              ^~~
/home/shaun/lustre-release/lustre/llite/llite_lib.c:3333:9: note: in expansion of macro ‘case_OBD_IOC_DEPRECATED_FT’
 3333 |         case_OBD_IOC_DEPRECATED_FT(OBD_IOC_GETNAME_OLD,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/shaun/lustre-release/lustre/llite/llite_lib.c:3334:36: note: each undeclared identifier is reported only once for each function it appears in
 3334 |                                    sbi->ll_md_exp->exp_obd->obd_name, 2, 16);
      |                                    ^~~
/home/shaun/lustre-release/lustre/include/lustre_ioctl_old.h:40:62: note: in definition of macro ‘case_OBD_IOC_DEPRECATED’
   40 |                               printed ? D_IOCTL : D_WARNING, dev, cmd,  \
      |                                                              ^~~
/home/shaun/lustre-release/lustre/llite/llite_lib.c:3333:9: note: in expansion of macro ‘case_OBD_IOC_DEPRECATED_FT’
 3333 |         case_OBD_IOC_DEPRECATED_FT(OBD_IOC_GETNAME_OLD,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~

Here 'sbi' should be 'll_i2sbi(inode)'.



 Comments   
Comment by Shaun Tancheff [ 14/Jun/23 ]

Issue does not exist it master

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