X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, J_CHICKENPOX_33,J_CHICKENPOX_62,J_CHICKENPOX_65,J_CHICKENPOX_66, T_DKIM_INVALID autolearn=no version=3.4.0-r929098 Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id p513E2GC090437 for ; Tue, 31 May 2011 22:14:02 -0500 X-ASG-Debug-ID: 1306898040-6fce01cc0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail-wy0-f181.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 666E215D9C1C for ; Tue, 31 May 2011 20:14:00 -0700 (PDT) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) by cuda.sgi.com with ESMTP id NMUkB2W2ICsHz1qM for ; Tue, 31 May 2011 20:14:00 -0700 (PDT) Received: by wyi11 with SMTP id 11so4398232wyi.26 for ; Tue, 31 May 2011 20:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to:cc :content-type; bh=n/dzG0+4AVhmj8sP3OH7zHU8GCW/910EKtcQW15KAl8=; b=K6kr10jGBIniIur6vOfuFo7S34D648kKe7sUacEiBp6NmRInijWA05t/+C81k/utjQ NBCuXrqZ42HBFSjeBqNg5rkDRzrlFkRv3kO/Vyr9FgBsT/5sixy8RYwqZJHAJXVfQ9Ef o8qkIrYtFT26Nds58zuQ/RRD6tLs47stblLo0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=RyBRfHvSFVmTPbtmgAgpm7JC8GbStdEU18l2TUHm/pIq1/fhdINR22h2eWTKLn1t9O oNBgPUeYuX09GeTJpYOSG/EzaFJTKkT4PFVH2IVAWMx18ScuuzaaPK2oqBxYLP6wybIk x3MbVxZuQSviBIYBwG52KYMOCdKQi8JEcyc6c= MIME-Version: 1.0 Received: by 10.216.235.129 with SMTP id u1mr4169009weq.108.1306898039769; Tue, 31 May 2011 20:13:59 -0700 (PDT) Received: by 10.216.221.135 with HTTP; Tue, 31 May 2011 20:13:59 -0700 (PDT) Date: Wed, 1 Jun 2011 06:13:59 +0300 Message-ID: X-ASG-Orig-Subj: [PATCH] xfstests: add support for ext4dev FSTYP Subject: [PATCH] xfstests: add support for ext4dev FSTYP From: Amir Goldstein To: XFS Cc: Sergey Ivanov , Eric Sandeen , Ext4 Developers List , linux-fsdevel Content-Type: text/plain; charset=ISO-8859-1 X-Barracuda-Connect: mail-wy0-f181.google.com[74.125.82.181] X-Barracuda-Start-Time: 1306898041 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=DKIM_SIGNED, DKIM_VERIFIED, MAILTO_TO_SPAM_ADDR X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.65256 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- -0.00 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.00 MAILTO_TO_SPAM_ADDR URI: Includes a link to a likely spammer email X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean 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. While testing on Fedora 15, we encoutered a buggy fsck utility, which invokes fsck.ext4, even though it was called with -t ext4dev argument. In our setup fsck.ext4dev knows about new fs features that fsck.ext4 doesn't know, so the generic_fs_check fails. Since we have no real use of the extra capabilities provided by fsck util, we decided to invoke fsck.$FSTYP directly to avoid this issue. 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). common.defrag | 2 +- common.quota | 4 ++-- common.rc | 12 ++++++------ 3 files changed, 9 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..9eac19d 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,7 +237,7 @@ _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 + if [ $FSTYP = "ext2" -o $FSTYP = "ext3" -o $FSTYP = "ext4" -o $FSTYP = "ext4dev" -o $FSTYP = "reiserfs" ]; then VFS_QUOTA=1 quotaon -f -u -g $SCRATCH_MNT 2>/dev/null fi diff --git a/common.rc b/common.rc index e634fbb..e71fe9c 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" ;; *) @@ -1026,7 +1026,7 @@ _check_generic_filesystem() mountpoint=`_umount_or_remount_ro $device` fi - fsck -t $FSTYP $FSCK_OPTIONS $device >$tmp.fsck 2>&1 + fsck.$FSTYP $FSCK_OPTIONS $device >$tmp.fsck 2>&1 if [ $? -ne 0 ] then echo "_check_generic_filesystem: filesystem on $device is inconsistent (see $seq.full)" -- 1.7.4.1