]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: fix statfs for subdir mounts
authorLuís Henriques <lhenriques@suse.de>
Wed, 27 Apr 2022 15:57:04 +0000 (16:57 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 18 May 2022 12:07:10 +0000 (14:07 +0200)
commitdd72fa6bd8cdd49b02e832dc58ab65ae09df1fa4
tree7a38199be3c6fa90846bab3535fd7fe2709d58fd
parentfbfeffb09f267f9ba69361c13028350f211c6c0c
ceph: fix statfs for subdir mounts

When doing a mount using as base a directory that has 'max_bytes' quotas
statfs uses that value as the total; if a subdirectory is used instead,
the same 'max_bytes' too in statfs, unless there is another quota set.

Unfortunately, if this subdirectory only has the 'max_files' quota set,
then statfs uses the filesystem total.  Fix this by making sure we only
lookup realms that contain the 'max_bytes' quota.

Link: https://tracker.ceph.com/issues/55090
Cc: Ryan Taylor <rptaylor@uvic.ca>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Luís Henriques <lhenriques@suse.de>
Signed-off-by: Xiubo Li <xiubli@redhat.com>
fs/ceph/inode.c
fs/ceph/quota.c
fs/ceph/super.h