From patchwork Fri Feb 15 06:39:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemanth Kumar X-Patchwork-Id: 2144641 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 26CE9DF24C for ; Fri, 15 Feb 2013 06:39:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932892Ab3BOGjq (ORCPT ); Fri, 15 Feb 2013 01:39:46 -0500 Received: from mail-da0-f43.google.com ([209.85.210.43]:47992 "EHLO mail-da0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751357Ab3BOGjp (ORCPT ); Fri, 15 Feb 2013 01:39:45 -0500 Received: by mail-da0-f43.google.com with SMTP id u36so1336144dak.2 for ; Thu, 14 Feb 2013 22:39:45 -0800 (PST) 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; bh=GVyF07PrxVZzBllINLIeNuT8vjjd/yhqr36/rHotypA=; b=gaZEa4lu841EBWmq+uD9G4ls99EJaWVJjJTC1x/+kLgJZ1euZwsaeeFwAGfBqhoUTb Gknw2roq5Haa2T9ugzdC2DNdrzWbBDGEcLqgDMW2M5WZQVLtC/JtjiAKBs11lZKJMWeP XZe+NhG4EmmaesY6aRiIrWphXFfJE1THOR7vekdH4eh8aSy3jkScswm0XOXPysHCFsXI 7h5Vt6kZ0B1D1NZx5EPfs+JSFnNnFed4ITN1Qs5+kjKBFg0bwdARHjim6C01TpThOBCO zJpsh+yaSJXhpeQpJLZmMZfVl4kZImEMz9apmz7XMSWdj3pZzSACYjplevz+RIb+dMG3 gQTA== X-Received: by 10.68.204.234 with SMTP id lb10mr3574999pbc.64.1360910385090; Thu, 14 Feb 2013 22:39:45 -0800 (PST) Received: from hemanth.lappy ([59.92.201.205]) by mx.google.com with ESMTPS id az3sm3766775pbd.23.2013.02.14.22.39.39 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 14 Feb 2013 22:39:44 -0800 (PST) From: Hemanth Kumar To: linux-btrfs@vger.kernel.org, xfs@oss.sgi.com Cc: skjmca51@gmail.com, ganeshkumar14@gmail.com, kirantpatil@gmail.com, praneethu.u@gmail.com, chethan.casey@gmail.com, sensille@gmx.net, bo.li.liu@oracle.com, sandeen@redhat.com, Hemanth Kumar Subject: [test] btrfs quotas testing Date: Fri, 15 Feb 2013 12:09:31 +0530 Message-Id: <1360910371-3258-1-git-send-email-hemanthkumar51@gmail.com> X-Mailer: git-send-email 1.8.1.2 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Signed-off-by: Hemanth Kumar --- quota.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 quota.sh diff --git a/quota.sh b/quota.sh new file mode 100644 index 0000000..8b82bf9 --- /dev/null +++ b/quota.sh @@ -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