]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: Fix incorrect statfs report for small quota
authorKotresh HR <khiremat@redhat.com>
Wed, 10 Nov 2021 18:00:21 +0000 (23:30 +0530)
committerJeff Layton <jlayton@kernel.org>
Mon, 15 Nov 2021 11:45:55 +0000 (06:45 -0500)
commit8a6ea527345d54db456a54da551aa381fd1bbed9
tree8fd5c2d4b447132c04421e01b11fdebd119487b2
parent85bba8b9e092be5abed5a3c36075d460787c6298
ceph: Fix incorrect statfs report for small quota

Problem:
The statfs reports incorrect free/available space
for quota less then CEPH_BLOCK size (4M).

Solution:
For quota less than CEPH_BLOCK size, smaller block
size of 4K is used. But if quota is less than 4K,
it is decided to go with binary use/free of 4K
block. For quota size less than 4K size, report the
total=used=4K,free=0 when quota is full and
total=free=4K,used=0 otherwise.

Signed-off-by: Kotresh HR <khiremat@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/ceph/quota.c
fs/ceph/super.h