cd quota-test
# bytes
-setfattr . -n ceph.quota.max_bytes -v 100M # 100MiB
+setfattr . -n ceph.quota.max_bytes -v 100M
expect_false write_file big 1000 # 1g
expect_false write_file second 10
setfattr . -n ceph.quota.max_bytes -v 0
# mix
mkdir bytes bytes/files
-setfattr bytes -n ceph.quota.max_bytes -v 10M #10MiB
+setfattr bytes -n ceph.quota.max_bytes -v 10M
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
#mv
mkdir files limit
truncate files/file -s 10G
-setfattr limit -n ceph.quota.max_bytes -v 1M #1MiB
+setfattr limit -n ceph.quota.max_bytes -v 1M
expect_false mv files limit/
#limit by ancestor
mkdir -p ancestor/p1/p2/parent/p3
-setfattr ancestor -n ceph.quota.max_bytes -v 1M #1MiB
-setfattr ancestor/p1/p2/parent -n ceph.quota.max_bytes -v 1G #1GiB
+setfattr ancestor -n ceph.quota.max_bytes -v 1M
+setfattr ancestor/p1/p2/parent -n ceph.quota.max_bytes -v 1G
expect_false write_file ancestor/p1/p2/parent/p3/file1 900 #900m
stat --printf="%n %s\n" ancestor/p1/p2/parent/p3/file1