btrfs quotas testing
Signed-off-by Hemanth Kumar <[email protected]>
--- quota.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 quota.sh
quota.sh new file +23 -0
@@ -0,0 +1,23 @@ +#! /bin/bash +# btrfs quotas test case +#tmp=/sample +status=1 + +cleanup() +{ + btrfs subvolume delete $TEST_DIR/vol1 +} + +#trap "_cleanup ; exit \$status" 0 1 2 3 15 + +btrfs quota enable $TEST_DIR +echo "quota enabled on $TEST_DEV" +btrfs subvolume create $TEST_DIR/vol1 +echo "vol1 created" +btrfs qgroup show $TEST_DIR +btrfs qgroup limit 2m $TEST_DIR/vol1 +echo "qgroup limited to 2mb" +dd if=$TEST_DEV of=$TEST_DIR/vol1/file1 bs=3M count=1 +echo "tried to write 3m worth data" +cleanup +exit
Signature · 1 line
1.8.1.2