Whamcloud - gitweb
LU-10030 utils: add lfs tool to change/list project of file 98/32098/3
authorWang Shilong <wshilong@ddn.com>
Mon, 16 Oct 2017 06:58:04 +0000 (14:58 +0800)
committerJohn L. Hammond <john.hammond@intel.com>
Thu, 3 May 2018 21:00:51 +0000 (21:00 +0000)
commitd856eedc96e057698a11f063bd7cb3236d191121
tree6922c296090b4ccd0f9eda0ba0db8ec8285c68b4
parent68f7952da4af79a5da4e172b372c56176c251c15
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

Lustre-change: https://review.whamcloud.com/29190
Lustre-commit: 022c5a9a77d4612dce28b76a7691b7af1cefd058

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I45960fb8fbd12e22a654792fba517896c0447447
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/32098
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/doc/Makefile.am
lustre/doc/lfs-project.1 [new file with mode: 0644]
lustre/doc/lfs.1
lustre/include/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]