mirror of https://github.com/ceph/ceph
qa/workunits/fs/quota.sh: use human readable format for ceph.quota.max_bytes
Fixes: https://tracker.ceph.com/issues/55940 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
This commit is contained in:
parent
9a462f78fd
commit
7330651482
|
@ -29,7 +29,7 @@ mkdir quota-test
|
|||
cd quota-test
|
||||
|
||||
# bytes
|
||||
setfattr . -n ceph.quota.max_bytes -v 100000000 # 100m
|
||||
setfattr . -n ceph.quota.max_bytes -v 100M # 100MiB
|
||||
expect_false write_file big 1000 # 1g
|
||||
expect_false write_file second 10
|
||||
setfattr . -n ceph.quota.max_bytes -v 0
|
||||
|
@ -57,7 +57,7 @@ rm -rf *
|
|||
# mix
|
||||
mkdir bytes bytes/files
|
||||
|
||||
setfattr bytes -n ceph.quota.max_bytes -v 10000000 #10m
|
||||
setfattr bytes -n ceph.quota.max_bytes -v 10M #10MiB
|
||||
setfattr bytes/files -n ceph.quota.max_files -v 5
|
||||
dd if=/dev/zero of=bytes/files/1 bs=1M count=4
|
||||
dd if=/dev/zero of=bytes/files/2 bs=1M count=4
|
||||
|
@ -78,7 +78,7 @@ rm -rf *
|
|||
#mv
|
||||
mkdir files limit
|
||||
truncate files/file -s 10G
|
||||
setfattr limit -n ceph.quota.max_bytes -v 1000000 #1m
|
||||
setfattr limit -n ceph.quota.max_bytes -v 1M #1MiB
|
||||
expect_false mv files limit/
|
||||
|
||||
|
||||
|
@ -88,8 +88,8 @@ rm -rf *
|
|||
#limit by ancestor
|
||||
|
||||
mkdir -p ancestor/p1/p2/parent/p3
|
||||
setfattr ancestor -n ceph.quota.max_bytes -v 1000000
|
||||
setfattr ancestor/p1/p2/parent -n ceph.quota.max_bytes -v 1000000000 #1g
|
||||
setfattr ancestor -n ceph.quota.max_bytes -v 1M #1MiB
|
||||
setfattr ancestor/p1/p2/parent -n ceph.quota.max_bytes -v 1G #1GiB
|
||||
expect_false write_file ancestor/p1/p2/parent/p3/file1 900 #900m
|
||||
stat --printf="%n %s\n" ancestor/p1/p2/parent/p3/file1
|
||||
|
||||
|
@ -104,6 +104,14 @@ expect_false setfattr -n ceph.quota.max_bytes -v -1 .
|
|||
expect_false setfattr -n ceph.quota.max_bytes -v -9223372036854775808 .
|
||||
expect_false setfattr -n ceph.quota.max_bytes -v -9223372036854775809 .
|
||||
|
||||
setfattr -n ceph.quota.max_bytes -v 0 .
|
||||
setfattr -n ceph.quota.max_bytes -v 1Ti .
|
||||
setfattr -n ceph.quota.max_bytes -v 8388608Ti .
|
||||
expect_false setfattr -n ceph.quota.max_bytes -v 8388609Ti .
|
||||
expect_false setfattr -n ceph.quota.max_bytes -v -1Ti .
|
||||
expect_false setfattr -n ceph.quota.max_bytes -v -8388609Ti .
|
||||
expect_false setfattr -n ceph.quota.max_bytes -v -8388610Ti .
|
||||
|
||||
setfattr -n ceph.quota.max_files -v 0 .
|
||||
setfattr -n ceph.quota.max_files -v 1 .
|
||||
setfattr -n ceph.quota.max_files -v 9223372036854775807 .
|
||||
|
|
Loading…
Reference in New Issue