]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: correct quota check in Client::_rename() 52578/head
authorRishabh Dave <ridave@redhat.com>
Wed, 15 Feb 2023 13:19:10 +0000 (18:49 +0530)
committerRishabh Dave <ridave@redhat.com>
Fri, 21 Jul 2023 18:04:40 +0000 (23:34 +0530)
commitdbd677d117c19d014f783cbee2e7cd04454d9083
treeac27c68cfe3f22c19bfeca479bf2cb04489d1b5c
parent9e19f15e9e5ec3c3cecf5bfdb4d74a80ca72e7d3
client: correct quota check in Client::_rename()

Client::_rename() only checks for max files quota. As a result, max
bytes quota is not enforced. Thus the following code (copied from
qa/workunits/fs/quota/quota.sh), runs successfully instead of exiting
with error "Disk quota exceeded" -

mkdir files limit
setfattr limit -n ceph.quota.max_bytes -v 1000
truncate filles/file1 -s 1M
mv files limit

This patch makes Client::_rename() enforce both kinds of quota which
leads command "mv files limit" from above script to fail with "Disk
quota exceeded" error. This is the expected behaviour in this case.

Introduced-by: dde1a19d4105f1db41477752a71d8fe40c45cd7f
Fixes: https://tracker.ceph.com/issues/58220
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit a8d9a256dc1c7f4186f293eb25c4edc54f69eda3)
src/client/Client.cc