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

use proper flags for FS_IOC_{FSSET,FSGET}XATTR

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.12.0
    • Lustre 2.11.0
    • 3
    • 9223372036854775807

    Description

      Alexander Mitin commented on LU-10030:
      --------------------------------------

      The wrong constant is used in the implementation of this feature.

      File: lustre/utils/lfs_project.c

      When process fsx.fsx_xflags bits the following functions use the wrong constant value to check the project inherit flag.

      • project_check_one()
      • project_set_one()
      • project_clear_one()

      These functions are using FS_IOC_FSGETXATTR and FS_IOC_FSGETXATTR ioctl calls to get or set fsxattr structure.

      Currently, to process fsx_xflags field from the fsxattr structure these functions use the constant LL_PROJINHERIT_FL, which is defined as the following:

      #define LL_PROJINHERIT_FL 0x20000000

      However, when processing fsx_xflags from the fsxattr structure , the different constant should be used: FS_XFLAG_PROJINHERIT, which is defined in linux/fs.h file as following:

      #define FS_XFLAG_PROJINHERIT 0x00000200 /* create with parents projid */

      See the following

      https://github.com/torvalds/linux/blob/master/include/uapi/linux/fs.h#L155

      https://github.com/torvalds/linux/blob/master/include/uapi/linux/fs.h#L178

      https://unix.stackexchange.com/questions/448637/file-system-inode-flags-difference-between-fs-ioc-getflags-and-fs-ioc-fsgetxatt/448639

      Attachments

        Issue Links

          Activity

            [LU-11154] use proper flags for FS_IOC_{FSSET,FSGET}XATTR
            pjones Peter Jones added a comment -

            Landed for 2.12

            pjones Peter Jones added a comment - Landed for 2.12

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32828/
            Subject: LU-11154 llite: use proper flags for FS_IOC_

            {FSSET,FSGET}

            XATTR
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 39fad9dc60ddd30bdfe165b40927e19f38b76428

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32828/ Subject: LU-11154 llite: use proper flags for FS_IOC_ {FSSET,FSGET} XATTR Project: fs/lustre-release Branch: master Current Patch Set: Commit: 39fad9dc60ddd30bdfe165b40927e19f38b76428

            Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/32828
            Subject: LU-11154 llite: use proper flags for FS_IOC_

            {FSSET,FSGET}

            XATTR
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 49e14a61816aa4fb77205ae6855b2b5af90cf47a

            gerrit Gerrit Updater added a comment - Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/32828 Subject: LU-11154 llite: use proper flags for FS_IOC_ {FSSET,FSGET} XATTR Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 49e14a61816aa4fb77205ae6855b2b5af90cf47a

            People

              wshilong Wang Shilong (Inactive)
              wshilong Wang Shilong (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: