f2fs: choose hardlimit when softlimit is larger than hardlimit in f2fs_statfs_project()
authorChengguang Xu <cgxu519@mykernel.net>
Mon, 25 Nov 2019 03:20:36 +0000 (11:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:35:24 +0000 (04:35 -0800)
commitae2cb41583a94cb9ca2cf209e03ad6d790a29c3c
tree5d4807611e667bd79854cba17bdb0ae643593768
parent08846286bf2854c0d4326315af260735759d6933
f2fs: choose hardlimit when softlimit is larger than hardlimit in f2fs_statfs_project()

commit 909110c060f22e65756659ec6fa957ae75777e00 upstream.

Setting softlimit larger than hardlimit seems meaningless
for disk quota but currently it is allowed. In this case,
there may be a bit of comfusion for users when they run
df comamnd to directory which has project quota.

For example, we set 20M softlimit and 10M hardlimit of
block usage limit for project quota of test_dir(project id 123).

[root@hades f2fs]# repquota -P -a
fs/f2fs/super.c