Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reef: client: correct quota check in Client::_rename() #52578

Merged
merged 1 commit into from Aug 4, 2023

Conversation

rishabh-d-dave
Copy link
Contributor

backport tracker: https://tracker.ceph.com/issues/59410


backport of #50127
parent tracker: https://tracker.ceph.com/issues/58220

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh

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: dde1a19
Fixes: https://tracker.ceph.com/issues/58220
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit a8d9a25)
@rishabh-d-dave rishabh-d-dave added this to the reef milestone Jul 21, 2023
@rishabh-d-dave rishabh-d-dave added the cephfs Ceph File System label Jul 21, 2023
@vshankar vshankar requested a review from a team July 25, 2023 07:36
Copy link
Contributor

@vshankar vshankar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yuriw yuriw merged commit 507b3b6 into ceph:reef Aug 4, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants