Whamcloud - gitweb
LU-10030 utils: add lfs tool to change/list project of file 90/29190/22
authorWang Shilong <wshilong@ddn.com>
Mon, 16 Oct 2017 06:58:04 +0000 (14:58 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 4 Jan 2018 02:49:05 +0000 (02:49 +0000)
commit022c5a9a77d4612dce28b76a7691b7af1cefd058
tree4a16484dd0baa213894b1475d5e1982dcad473fa
parent83ed9453f0cd89057edae1aa4fa0de6007cf011c
LU-10030 utils: add lfs tool to change/list project of file

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 this patch add native lfs tools for project quota.
usage: project [-p id] [-s] [-r] <file|directory..>
          set project ID and/or inherit flag for specified
          file(s) or directory.
       project [-d|-r [-0]] <file|directory...>
          list project ID and flags on file(s) or directory,
          print outliers
       project -c [-d|-r [-p id] [-0]] <file|directory..>
          check project ID and flags on file(s) or directory,
          print outliers
       project -C [-r] [-k] <file|directory..>
          clear the project inherit flag and ID on the file
          or directory

Test-Parameters: testlist=sanity-quota,sanity-quota,sanity-quota,\
    sanity-quota clientdistro=el7 serverdistro=el7 \
    ostfilesystemtype=ldiskfs mdtfilesystemtype=ldiskfs
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I45960fb8fbd12e22a654792fba517896c0447447
Reviewed-on: https://review.whamcloud.com/29190
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/doc/Makefile.am
lustre/doc/lfs-project.1 [new file with mode: 0644]
lustre/doc/lfs.1
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/tests/sanity-quota.sh
lustre/utils/Makefile.am
lustre/utils/lfs.c
lustre/utils/lfs_project.c [new file with mode: 0644]
lustre/utils/lfs_project.h [new file with mode: 0644]