ceph: quota: report root dir quota usage in statfs
authorLuis Henriques <lhenriques@suse.com>
Wed, 31 Jan 2018 10:53:13 +0000 (10:53 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 2 Apr 2018 09:17:53 +0000 (11:17 +0200)
commit9122eed5281e89bdb02162a8ecb3cc13ffc8985e
tree76c813dd8c16b85bce3d26cbb9d763d67fbc1d8f
parentd557c48db730eaab6b75d4af332c135309b7a6a4
ceph: quota: report root dir quota usage in statfs

This commit changes statfs default behaviour when reporting usage
statistics.  Instead of using the overall filesystem usage, statfs now
reports the quota for the filesystem root, if ceph.quota.max_bytes has
been set for this inode.  If quota hasn't been set, it falls back to the
old statfs behaviour.

A new mount option is also added ('noquotadf') to disable this behaviour.

Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Documentation/filesystems/ceph.txt
fs/ceph/quota.c
fs/ceph/super.c
fs/ceph/super.h