]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: fix statfs for subdir mounts wip-55258
authorLuís Henriques <lhenriques@suse.de>
Wed, 27 Apr 2022 15:57:04 +0000 (16:57 +0100)
committerJeff Layton <jlayton@kernel.org>
Fri, 29 Apr 2022 20:06:36 +0000 (16:06 -0400)
commitbb7e0d0f66dbca68cb348f72119f8fed51870ad5
tree0b60ce97a23da4a17a0dd98bf6e5e66f7d1b8c9e
parentb7caf551d2fa0ee70df510d70b0adf524f9a16f6
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