From patchwork Thu Jun 2 04:17:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Amir G." X-Patchwork-Id: 98343 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id DA686B6F8D for ; Thu, 2 Jun 2011 14:17:23 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751388Ab1FBERW (ORCPT ); Thu, 2 Jun 2011 00:17:22 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:61619 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751340Ab1FBERV (ORCPT ); Thu, 2 Jun 2011 00:17:21 -0400 Received: by wwa36 with SMTP id 36so483274wwa.1 for ; Wed, 01 Jun 2011 21:17:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:date:message-id :x-mailer; bh=DGi29fUZf0Fa93Dph6k24e7QBMVvlFLJcVEg2AGOMC4=; b=KyF7xMbIQnLxPUMqMpUdUY5FZapE5pHdkiGzkYdI0+pz2o0ptmUqD8Du7BR7MeEPI+ xaJwo9/kMH+okFZpZbqbtbO3da6UenJWergVhuqVSqYXw+FpWvRvui9qX/BW1zdIVlbT ioXEzPsjGE3un2ZSPuzRVly8u3MrpSEes0Es4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=rfJU31kqD/I8bzAbCSg7obyIdDKwx3VA71IoPS/JH2SGKQj6oq3GqROVIFVVdkq1mr E6zOOV7T+OTp/ZtLrMW1lfxVlck2YnihXwqJ9RgLuLmZTpmzlVA3OB2VNvjCYqH3rrQ+ YjdVC3BjDhqr3X6LZwu4dNmR0nBV2Nb6RoRXk= Received: by 10.216.64.209 with SMTP id c59mr3709149wed.41.1306988239228; Wed, 01 Jun 2011 21:17:19 -0700 (PDT) Received: from localhost.localdomain (bzq-218-153-66.cablep.bezeqint.net [81.218.153.66]) by mx.google.com with ESMTPS id w58sm92641weq.1.2011.06.01.21.17.17 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2011 21:17:18 -0700 (PDT) From: amir73il@users.sourceforge.net To: xfs@oss.sgi.com Cc: sandeen@redhat.com, sergey57@gmail.com, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, Amir Goldstein Subject: [PATCH v3] xfstests: add support for ext4dev FSTYP Date: Thu, 2 Jun 2011 07:17:01 +0300 Message-Id: <1306988221-3543-1-git-send-email-amir73il@users.sourceforge.net> X-Mailer: git-send-email 1.7.4.1 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Amir Goldstein blkid knows to identify the ext4dev FSTYP of a partition that was formatted with mkfs.ext4dev. quota tools and various util-linux utils are also aware of ext4dev, so ext4dev shares the same capabilities as ext4. Signed-off-by: Amir Goldstein Tested-by: Sergey Ivanov --- ext4dev is used to test experimental ext4 code in mutual existance with production ext4 code on the same system. Specifically, ext4 snapshots code is available for testing as a stand-alone ext4dev module for Fedora 15 and Ubuntu 11.4 (see http://next3.sf.net). v2 -> v3: - change if to case statement v1 -> v2: - undo change of fsck -t $FSTYP to fsck.$FSTYP common.defrag | 2 +- common.quota | 10 +++++++--- common.rc | 10 +++++----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/common.defrag b/common.defrag index 1bcf01d..4850803 100644 --- a/common.defrag +++ b/common.defrag @@ -26,7 +26,7 @@ _require_defrag() xfs) DEFRAG_PROG=/usr/sbin/xfs_fsr ;; - ext4) + ext4|ext4dev) DEFRAG_PROG=/usr/bin/e4defrag ;; *) diff --git a/common.quota b/common.quota index 3c87ce1..9736306 100644 --- a/common.quota +++ b/common.quota @@ -29,7 +29,7 @@ _require_quota() [ -n $QUOTA_PROG ] || _notrun "Quota user tools not installed" case $FSTYP in - ext2|ext3|ext4|reiserfs) + ext2|ext3|ext4|ext4dev|reiserfs) if [ ! -d /proc/sys/fs/quota ]; then _notrun "Installed kernel does not support quotas" fi @@ -237,10 +237,14 @@ _check_quota_usage() # Sync to get delalloc to disk sync VFS_QUOTA=0 - if [ $FSTYP = "ext2" -o $FSTYP = "ext3" -o $FSTYP = "ext4" -o $FSTYP = "reiserfs" ]; then + case $FSTYP in + ext2|ext3|ext4|ext4dev|reiserfs) VFS_QUOTA=1 quotaon -f -u -g $SCRATCH_MNT 2>/dev/null - fi + ;; + *) + ;; + esac repquota -u -n $SCRATCH_MNT | grep -v "^#0" | _filter_scratch | sort >$tmp.user.orig repquota -g -n $SCRATCH_MNT | grep -v "^#0" | _filter_scratch | diff --git a/common.rc b/common.rc index e634fbb..c510c66 100644 --- a/common.rc +++ b/common.rc @@ -65,7 +65,7 @@ _mount_opts() nfs) export MOUNT_OPTIONS=$NFS_MOUNT_OPTIONS ;; - ext2|ext3|ext4) + ext2|ext3|ext4|ext4dev) # acls & xattrs aren't turned on by default on ext$FOO export MOUNT_OPTIONS="-o acl,user_xattr $EXT_MOUNT_OPTIONS" ;; @@ -110,7 +110,7 @@ _mkfs_opts() _fsck_opts() { case $FSTYP in - ext2|ext3|ext4) + ext2|ext3|ext4|ext4dev) export FSCK_OPTIONS="-nf" ;; reiserfs) @@ -326,10 +326,10 @@ _scratch_mkfs_sized() xfs) _scratch_mkfs_xfs -d size=$fssize -b size=$blocksize ;; - ext2|ext3|ext4) + ext2|ext3|ext4|ext4dev) /sbin/mkfs.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks ;; - btrfs) + btrfs) /sbin/mkfs.$FSTYP $MKFS_OPTIONS $SCRATCH_DEV -b $fssize ;; *) @@ -354,7 +354,7 @@ _scratch_mkfs_geom() xfs) MKFS_OPTIONS+=" -b size=$blocksize, -d su=$sunit_bytes,sw=$swidth_mult" ;; - ext4) + ext4|ext4dev) MKFS_OPTIONS+=" -b $blocksize -E stride=$sunit_blocks,stripe_width=$swidth_blocks" ;; *)