Luís Henriques 55ab552080 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.

Cc: Ryan Taylor <rptaylor@uvic.ca>
URL: https://tracker.ceph.com/issues/55090
Signed-off-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-05-25 20:45:14 +02:00
..
2022-03-18 09:29:05 +00:00
2022-03-31 15:49:36 -07:00
2022-05-25 20:45:14 +02:00
2022-05-25 20:45:14 +02:00
2022-01-11 22:13:01 +00:00
2020-06-01 13:22:51 +02:00
2022-03-01 18:26:37 +01:00
2022-05-25 20:45:14 +02:00
2022-03-01 18:26:37 +01:00
2022-03-01 18:26:37 +01:00
2022-05-25 20:45:14 +02:00