Project

General

Profile

Actions

Bug #56180

closed

kclient: we always could write more data to the file than the quota limit

Added by Xiubo Li almost 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):

Description

Create a directory and set the quota and then write data to it, in some special case the write could succeed without any error:

$ mkdir testdir
$ setfattr -n ceph.quota.max_bytes -v 123 testdir

If the bs is larger than the quota value 123 it will fail:

$ dd if=/dev/zero of=testdir/myfile bs=125 count=1
dd: error writing 'testdir/myfile': Disk quota exceeded
1+0 records in
0+0 records out
0 bytes copied, 0.00203766 s, 0.0 kB/s

$ ll testdir/
total 0
-rw-r--r--. 1 root root 0 Jun 23 13:24 myfile

But if the bs is less than the quota value 123 it will succeed:

$ dd if=/dev/zero of=testdir2/myfile bs=120 count=10000
10000+0 records in
10000+0 records out
1200000 bytes (1.2 MB, 1.1 MiB) copied, 2.25494 s, 532 kB/s

$ ll testdir/
total 1172
-rw-r--r--. 1 root root 1200000 Jun 23 13:43 myfile
Actions

Also available in: Atom PDF