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

add native lfs tools support for project quota

Details

    • 9223372036854775807

    Description

      Currently, we are using chattr/lsattr for project quota
      interface, this have some problems:

      1)Client side need patched e2fsprogs or latest upstream
      e2fsprogs.
      2)Project quota will be no longer osd-ldiskfs based, ZFS
      too, zfs guys might dislike ldiskfs tool dependency for them.
      3)customers argue chattr might be a little dangerous.

      So we'd better add native lfs tools for project quota.

      Attachments

        Issue Links

          Activity

            [LU-10030] add native lfs tools support for project quota

            Hi Alexander Mitin,

            I pushed a proposed patch for this problem:
            https://review.whamcloud.com/#/c/32828/

            Thanks,
            Shilong

            wshilong Wang Shilong (Inactive) added a comment - Hi Alexander Mitin, I pushed a proposed patch for this problem: https://review.whamcloud.com/#/c/32828/ Thanks, Shilong

            Hi Alexander Mitin,

            thanks for pointing this out, we should fix this.

            Thanks,
            Shilong

            wshilong Wang Shilong (Inactive) added a comment - Hi Alexander Mitin, thanks for pointing this out, we should fix this. Thanks, Shilong

            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

             

             

            amitin Alexander Mitin (Inactive) added a comment - 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    

            James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/32825
            Subject: LU-10030 clio: don't use spare bits in iattr.ia_valid
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: c588aa7cf5d4b02b06993a3a285441cc2765fc3c

            gerrit Gerrit Updater added a comment - James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/32825 Subject: LU-10030 clio: don't use spare bits in iattr.ia_valid Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: c588aa7cf5d4b02b06993a3a285441cc2765fc3c

            John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/32098/
            Subject: LU-10030 utils: add lfs tool to change/list project of file
            Project: fs/lustre-release
            Branch: b2_10
            Current Patch Set:
            Commit: d856eedc96e057698a11f063bd7cb3236d191121

            gerrit Gerrit Updater added a comment - John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/32098/ Subject: LU-10030 utils: add lfs tool to change/list project of file Project: fs/lustre-release Branch: b2_10 Current Patch Set: Commit: d856eedc96e057698a11f063bd7cb3236d191121

            John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/32099/
            Subject: LU-10030 llite: extend inode flags into GET/SETXATTR ioctl
            Project: fs/lustre-release
            Branch: b2_10
            Current Patch Set:
            Commit: 9c79f3b17605e090e8d0c31d3f34021959aa05d7

            gerrit Gerrit Updater added a comment - John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/32099/ Subject: LU-10030 llite: extend inode flags into GET/SETXATTR ioctl Project: fs/lustre-release Branch: b2_10 Current Patch Set: Commit: 9c79f3b17605e090e8d0c31d3f34021959aa05d7

            Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: https://review.whamcloud.com/32112
            Subject: LU-10030 hsm: make changelog flag argument __u32
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 920d58535e5dc467a753c8cc1a83fd988337d29b

            gerrit Gerrit Updater added a comment - Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: https://review.whamcloud.com/32112 Subject: LU-10030 hsm: make changelog flag argument __u32 Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 920d58535e5dc467a753c8cc1a83fd988337d29b

            Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: https://review.whamcloud.com/32107
            Subject: LU-10030 idl: use proper ATTR/MDS_ATTR/MDS_OPEN flags
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: a7e53750fb1fc117353c859785cd7cf379604968

            gerrit Gerrit Updater added a comment - Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: https://review.whamcloud.com/32107 Subject: LU-10030 idl: use proper ATTR/MDS_ATTR/MDS_OPEN flags Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: a7e53750fb1fc117353c859785cd7cf379604968

            Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: https://review.whamcloud.com/32106
            Subject: LU-10030 llite: use MDS_ATTR_ATTR_FLAG for ia_valid
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 7a076f2688c6fd30dd420b8829d359d1826835e4

            gerrit Gerrit Updater added a comment - Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: https://review.whamcloud.com/32106 Subject: LU-10030 llite: use MDS_ATTR_ATTR_FLAG for ia_valid Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 7a076f2688c6fd30dd420b8829d359d1826835e4

            Minh Diep (minh.diep@intel.com) uploaded a new patch: https://review.whamcloud.com/32099
            Subject: LU-10030 llite: extend inode flags into GET/SETXATTR ioctl
            Project: fs/lustre-release
            Branch: b2_10
            Current Patch Set: 1
            Commit: ae23eab7537a11e499d6e3747dfa8e03d2f01c60

            gerrit Gerrit Updater added a comment - Minh Diep (minh.diep@intel.com) uploaded a new patch: https://review.whamcloud.com/32099 Subject: LU-10030 llite: extend inode flags into GET/SETXATTR ioctl Project: fs/lustre-release Branch: b2_10 Current Patch Set: 1 Commit: ae23eab7537a11e499d6e3747dfa8e03d2f01c60

            Minh Diep (minh.diep@intel.com) uploaded a new patch: https://review.whamcloud.com/32098
            Subject: LU-10030 utils: add lfs tool to change/list project of file
            Project: fs/lustre-release
            Branch: b2_10
            Current Patch Set: 1
            Commit: 4c4c6097eeeb9785c6be9892cad823b2c0e077f8

            gerrit Gerrit Updater added a comment - Minh Diep (minh.diep@intel.com) uploaded a new patch: https://review.whamcloud.com/32098 Subject: LU-10030 utils: add lfs tool to change/list project of file Project: fs/lustre-release Branch: b2_10 Current Patch Set: 1 Commit: 4c4c6097eeeb9785c6be9892cad823b2c0e077f8

            People

              wangshilong Wang Shilong (Inactive)
              wangshilong Wang Shilong (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: