xfs
[Top] [All Lists]

[Tests] xfs test[299]:Btrfs hierarchical Quotas

To: linux-btrfs@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
Subject: [Tests] xfs test[299]:Btrfs hierarchical Quotas
From: Hemanth Kumar <hemanthkumar51@xxxxxxxxx>
Date: Fri, 22 Feb 2013 11:42:19 +0530
Cc: skjmca51@xxxxxxxxx, ganeshkumar14@xxxxxxxxx, kirantpatil@xxxxxxxxx, praneethu.u@xxxxxxxxx, chethan.casey@xxxxxxxxx, sensille@xxxxxxx, bo.li.liu@xxxxxxxxxx, hugo@xxxxxxxxxxxxx, sandeen@xxxxxxxxxx, Hemanth Kumar <hemanthkumar51@xxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=TnwnQx9fT0eUUotMLPgl0YKtjrG9Or/oHZlsRYNLRj8=; b=cFNyGdMRz4HuAqLTydIQMoYELUcE8GdaJ3r+QJXnWTeXcWtszWzXJfy4PGd8fesu4H Yr3C3NV8A6Awhvg4xuUjPcRVGZlQ0yuHM+fxK8vmpwd8bpUWdCe/dx2BHNSq8cu6KG/i 6VMyhqGPdn7qy+PiAqNJJCTN6gIB3w9i85isKUL0OrCwcqBVJ7obCy6UcyioeUXzxfyX hm2Trphm1HvBAa4+bGoxY5WtiM9jJWmON6EANBEAGbaq1+UZNFq70uUmLWyy4MUF227C JVROA0oZKJHIL70gBacj3zso/kfhsNii/2NvwpjvaeYzT0YrYdYu3K5mPRsklb6uZl1g 5V+Q==
Signed-off-by: Hemanth Kumar <hemanthkumar51@xxxxxxxxx>
---
 299     | 38 ++++++++++++++++++++++++++++++++++++++
 299.out | 20 ++++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 299
 create mode 100644 299.out

diff --git a/299 b/299
new file mode 100644
index 0000000..6b03438
--- /dev/null
+++ b/299
@@ -0,0 +1,38 @@
+#! /bin/bash
+# FS QA Test No. 299
+#
+# Test btrfs's hierarchical quotas
+#
+#------------------------------------------------------------------
+#
+# creator
+owner=hemanthkumar51@xxxxxxxxx
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1        # failure is the default!
+
+_cleanup()
+{
+    rm -rf $tmp.*
+}
+
+trap "_cleanup ; exit \$status" 0 1 2 3 15
+
+#Enabeling btrfs qutas
+btrfs quota enable $TEST_DIR
+echo "quota enabled on $TEST_DEV"
+btrfs subvolume create $TEST_DIR/vol1
+btrfs subvolume create $TEST_DIR/vol1/vol2
+btrfs subvolume create $TEST_DIR/vol1/vol2/vol3
+btrfs qgroup limit 5m $TEST_DIR/vol1
+btrfs qgroup limit 3m $TEST_DIR/vol1/vol2
+btrfs qgroup limit 2m $TEST_DIR/vol1/vol2/vol3
+dd if=$TEST_DEV of=$TEST_DIR/vol1/vol2/vol3/file1 bs=3M count=1
+dd if=$TEST_DEV of=$TEST_DIR/vol1/vol2/file1 bs=2M count=1
+dd if=$TEST_DEV of=$TEST_DIR/vol1/file1 bs=5M count=1
+btrfs qgroup show $TEST_DIR
+exit
diff --git a/299.out b/299.out
new file mode 100644
index 0000000..f9a6b96
--- /dev/null
+++ b/299.out
@@ -0,0 +1,20 @@
+QA output created by 299
+quota enabled on /dev/sdc5
+Create subvolume '/test/vol1'
+Create subvolume '/test/vol1/vol2'
+Create subvolume '/test/vol1/vol2/vol3'
+dd: writing â/test/vol1/vol2/vol3/file1â: Disk quota exceeded
+1+0 records in
+0+0 records out
+2031616 bytes (2.0 MB) copied, 0.128843 s, 15.8 MB/s
+1+0 records in
+1+0 records out
+2097152 bytes (2.1 MB) copied, 0.00884457 s, 237 MB/s
+dd: writing â/test/vol1/file1â: Disk quota exceeded
+1+0 records in
+0+0 records out
+5177344 bytes (5.2 MB) copied, 0.0732531 s, 70.7 MB/s
+0/257 4096 4096
+0/258 4096 4096
+0/259 4096 4096
+
-- 
1.8.1.2

<Prev in Thread] Current Thread [Next in Thread>