public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Hemanth Kumar <hemanthkumar51@gmail.com>
To: linux-btrfs@vger.kernel.org, xfs@oss.sgi.com
Cc: chethan.casey@gmail.com, sandeen@redhat.com, sensille@gmx.net,
	ganeshkumar14@gmail.com, praneethu.u@gmail.com,
	hugo@carfax.org.uk, bo.li.liu@oracle.com, skjmca51@gmail.com,
	Hemanth Kumar <hemanthkumar51@gmail.com>,
	kirantpatil@gmail.com
Subject: [btrfs-progs] testing btrfs hierarchical quotas
Date: Fri, 15 Feb 2013 18:35:41 +0530	[thread overview]
Message-ID: <1360933541-2894-1-git-send-email-hemanthkumar51@gmail.com> (raw)


Signed-off-by: Hemanth Kumar <hemanthkumar51@gmail.com>
---
 hq.sh | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 hq.sh

diff --git a/hq.sh b/hq.sh
new file mode 100644
index 0000000..6a0a820
--- /dev/null
+++ b/hq.sh
@@ -0,0 +1,33 @@
+#! /bin/bash
+# Btrfs quotas test case
+# Hi all,
+# This is shell script to test the hierarchical quotas feature of Btrfs
+# I created Btrfs filesystem on a new
+# partition, then activated quota management ('btrfs quota enable'), and
+# created a few subvolumes of multiple levels.
+
+
+cleanup()
+{
+    btrfs subvolume delete $TEST_DIR/vol1/vol2/vol3
+    btrfs subvolume delete $TEST_DIR/vol1/vol2
+    btrfs subvolume delete $TEST_DIR/vol1
+    btrfs subvolume disable $TEST_DIR
+}
+
+#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
+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
+
+cleanup
+exit
-- 
1.8.1.2

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

                 reply	other threads:[~2013-02-15 13:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360933541-2894-1-git-send-email-hemanthkumar51@gmail.com \
    --to=hemanthkumar51@gmail.com \
    --cc=bo.li.liu@oracle.com \
    --cc=chethan.casey@gmail.com \
    --cc=ganeshkumar14@gmail.com \
    --cc=hugo@carfax.org.uk \
    --cc=kirantpatil@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=praneethu.u@gmail.com \
    --cc=sandeen@redhat.com \
    --cc=sensille@gmx.net \
    --cc=skjmca51@gmail.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox