Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-16895

ll_iocontrol() should use 'll_i2sbi(inode)' in place of 'sbi'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Minor
    • None
    • None
    • None
    • 3
    • 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)'.

      Attachments

        Activity

          People

            stancheff Shaun Tancheff
            stancheff Shaun Tancheff
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: