Skip to contentSkip to conversation

ceph/004: fix the ceph.quota.max_bytes values

PATCH In review [email protected] 2 participants 2 messages Aug 29, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ceph/004: fix the ceph.quota.max_bytes values

From: Xiubo Li <[email protected]>

Cephfs has required that the quota.max_bytes must be aligned to 4MB if greater than or equal to 4MB, otherwise must align to 4KB.

URL: https://tracker.ceph.com/issues/57321

---
 tests/ceph/004 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/ceph/004 +3 -3
index dbca713e..124ed1bc 100755
@@ -9,7 +9,7 @@
 #
 #    mkdir files limit
 #    truncate files/file -s 10G
-#    setfattr limit -n ceph.quota.max_bytes -v 1000000
+#    setfattr limit -n ceph.quota.max_bytes -v 1048576
 #    mv files limit/
 #
 # Because we're creating a new file and truncating it, we have Fx caps and thus
@@ -76,9 +76,9 @@ check_Fs_caps()
 }
 
 # set quota to 1m
-$SETFATTR_PROG -n ceph.quota.max_bytes -v 1000000 $dest
+$SETFATTR_PROG -n ceph.quota.max_bytes -v 1048576 $dest
 # set quota to 20g
-$SETFATTR_PROG -n ceph.quota.max_bytes -v 20000000000 $orig2
+$SETFATTR_PROG -n ceph.quota.max_bytes -v 21474836480 $orig2
 
 #
 # The following 2 testcases shall fail with either -EXDEV or -EDQUOT
Signature · 1 line
2.36.0.rc1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · On Mon, Aug 29, 2022 at 03:09:21PM +0800, [email protected] wrote:

From: Xiubo Li <[email protected]>

Cephfs has required that the quota.max_bytes must be aligned to 4MB if greater than or equal to 4MB, otherwise must align to 4KB.

Although the MDS change that will force this hasn't yet been merged, this test change looks reasonable anyway. Feel free to add my:

Cheers,
--
Luís

Quoted 35 lines

URL: https://tracker.ceph.com/issues/57321

---
 tests/ceph/004 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/ceph/004 +3 -3
index dbca713e..124ed1bc 100755
@@ -9,7 +9,7 @@
 #
 #    mkdir files limit
 #    truncate files/file -s 10G
-#    setfattr limit -n ceph.quota.max_bytes -v 1000000
+#    setfattr limit -n ceph.quota.max_bytes -v 1048576
 #    mv files limit/
 #
 # Because we're creating a new file and truncating it, we have Fx caps and thus
@@ -76,9 +76,9 @@ check_Fs_caps()
 }
 
 # set quota to 1m
-$SETFATTR_PROG -n ceph.quota.max_bytes -v 1000000 $dest
+$SETFATTR_PROG -n ceph.quota.max_bytes -v 1048576 $dest
 # set quota to 20g
-$SETFATTR_PROG -n ceph.quota.max_bytes -v 20000000000 $orig2
+$SETFATTR_PROG -n ceph.quota.max_bytes -v 21474836480 $orig2
 
 #
 # The following 2 testcases shall fail with either -EXDEV or -EDQUOT
Signature · 1 line
2.36.0.rc1