Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [btrfs-progs] Btrfs quotas testing
@ 2013-02-15 12:45 Hemanth Kumar
  2013-02-15 13:50 ` shilong wang
  2013-02-15 18:18 ` Ben Myers
  0 siblings, 2 replies; 3+ messages in thread
From: Hemanth Kumar @ 2013-02-15 12:45 UTC (permalink / raw)
  To: linux-btrfs, xfs
  Cc: skjmca51, ganeshkumar14, kirantpatil, praneethu.u, chethan.casey,
	sensille, bo.li.liu, hugo, sandeen, Hemanth Kumar


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

diff --git a/quotas.sh b/quotas.sh
new file mode 100644
index 0000000..7e64578
--- /dev/null
+++ b/quotas.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+# Btrfs quotas test case
+# Hi all,
+# This is shell script to test the quotas feature of Btrfs
+# I created Btrfs filesystem on a new
+# partition, then activated quota management ('btrfs quota enable'), and
+# created a few subvolumes.
+# I have lmited the quota to 2mb and tried filling it
+# its working as expected
+
+
+cleanup()
+{
+    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
+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
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [btrfs-progs] Btrfs quotas testing
  2013-02-15 12:45 [btrfs-progs] Btrfs quotas testing Hemanth Kumar
@ 2013-02-15 13:50 ` shilong wang
  2013-02-15 18:18 ` Ben Myers
  1 sibling, 0 replies; 3+ messages in thread
From: shilong wang @ 2013-02-15 13:50 UTC (permalink / raw)
  To: Hemanth Kumar
  Cc: skjmca51, ganeshkumar14, kirantpatil, praneethu.u, chethan.casey,
	sensille, bo.li.liu, hugo, sandeen, linux-btrfs

hello

2013/2/15 Hemanth Kumar <hemanthkumar51@gmail.com>:
>
> Signed-off-by: Hemanth Kumar <hemanthkumar51@gmail.com>
> ---
>  quotas.sh | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>  create mode 100644 quotas.sh
>
> diff --git a/quotas.sh b/quotas.sh
> new file mode 100644
> index 0000000..7e64578
> --- /dev/null
> +++ b/quotas.sh
> @@ -0,0 +1,30 @@
> +#! /bin/bash
> +# Btrfs quotas test case
> +# Hi all,
> +# This is shell script to test the quotas feature of Btrfs
> +# I created Btrfs filesystem on a new
> +# partition, then activated quota management ('btrfs quota enable'), and
> +# created a few subvolumes.
> +# I have lmited the quota to 2mb and tried filling it
> +# its working as expected
> +
> +
> +cleanup()
> +{
> +    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
> +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

the same comments as before..

Thanks,
Wang
> +echo "tried to write 3m worth data"
> +cleanup
> +exit
> --
> 1.8.1.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [btrfs-progs] Btrfs quotas testing
  2013-02-15 12:45 [btrfs-progs] Btrfs quotas testing Hemanth Kumar
  2013-02-15 13:50 ` shilong wang
@ 2013-02-15 18:18 ` Ben Myers
  1 sibling, 0 replies; 3+ messages in thread
From: Ben Myers @ 2013-02-15 18:18 UTC (permalink / raw)
  To: Hemanth Kumar
  Cc: linux-btrfs, xfs, chethan.casey, sandeen, sensille, ganeshkumar14,
	praneethu.u, hugo, bo.li.liu, skjmca51, kirantpatil

Hey Hemanth,

On Fri, Feb 15, 2013 at 06:15:24PM +0530, Hemanth Kumar wrote:
> 
> Signed-off-by: Hemanth Kumar <hemanthkumar51@gmail.com>

Looks like this is btrfs specific.  You probably don't need to cross post to
xfs@oss.sgi.com, unless you're interested in adding a test to xfstests.  If so,
you might want to check out the existing quota group of tests to see if one
could be modified to your purpose.

~/xfstests$ grep quota group
...

Regards,
Ben

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-15 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-15 12:45 [btrfs-progs] Btrfs quotas testing Hemanth Kumar
2013-02-15 13:50 ` shilong wang
2013-02-15 18:18 ` Ben Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox