Whamcloud - gitweb
LU-9555 quota: df should return projid-specific values 85/36685/17
authorWang Shilong <wshilong@ddn.com>
Wed, 6 Nov 2019 13:01:18 +0000 (21:01 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 3 Dec 2020 17:58:15 +0000 (17:58 +0000)
commite5c8f6670fbeea9ec8c6092dfa4369508da54485
tree092173c6969a0f80228904df258bae3f872c09e5
parentd5d0ff24a84f64e5196341f5ce946952d7fff8b7
LU-9555 quota: df should return projid-specific values

With local ext4 and XFS filesystems, it is possible to use
"df /path/to/directory" (statfs()) to return the current
project quota usage for that directory as "used", and
min(projid quota limit, free space) as "total".

statfs() is a natural interface for users/applications, since
it represents the used/maximum space for that subdirectory.
Otherwise, the user will get EDQUOT back when the project
quota runs out for that directory and applications will not
be able to figure out how much data they could write into
that directory.

Change-Id: I7f357e6e4de6a1465a48c2c08c4aa86c4c848dbb
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/36685
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/llite/dir.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/tests/sanity-quota.sh