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

incorrect stat from kthread with X86_X32 architecture

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.10.0
    • Lustre 2.7.0, Lustre 2.9.0
    • None
    • 3
    • 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.

      Attachments

        Activity

          People

            fzago Frank Zago (Inactive)
            fzago Frank Zago (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: