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

            Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36469
            Subject: LU-10030 mds: add enums for MDS_OPEN flags
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 7622048ecbd5ceab7fa72951a587769cac941da7

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36469 Subject: LU-10030 mds: add enums for MDS_OPEN flags Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 7622048ecbd5ceab7fa72951a587769cac941da7

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32112/
            Subject: LU-10030 hsm: make changelog flag argument an enum
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 2496089a0017f5b0ff94a7a7994f4c62c8f30d94

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32112/ Subject: LU-10030 hsm: make changelog flag argument an enum Project: fs/lustre-release Branch: master Current Patch Set: Commit: 2496089a0017f5b0ff94a7a7994f4c62c8f30d94

            Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33512
            Subject: LU-10030 mds: add enums for MDS_OPEN and MDS_ATTR flags
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: a1ccd134fa30acf8c4e86ef8e600fa018c368890

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33512 Subject: LU-10030 mds: add enums for MDS_OPEN and MDS_ATTR flags Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: a1ccd134fa30acf8c4e86ef8e600fa018c368890

            Oleg Drokin (green@whamcloud.com) merged in 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:
            Commit: 9c2ffe39bd32f85dab4fbb13855112e57b1dbc5a

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in 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: Commit: 9c2ffe39bd32f85dab4fbb13855112e57b1dbc5a

            Oleg Drokin (green@whamcloud.com) merged in 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:
            Commit: 3a6bbda28826ec1eda59ecb9f442a31f87bb409c

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in 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: Commit: 3a6bbda28826ec1eda59ecb9f442a31f87bb409c

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

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

            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

            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: