From patchwork Mon Jan 13 13:16:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 3475271 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C003E9F169 for ; Mon, 13 Jan 2014 13:07:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9A3B200F2 for ; Mon, 13 Jan 2014 13:07:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8A7D7200DF for ; Mon, 13 Jan 2014 13:07:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751525AbaAMNHW (ORCPT ); Mon, 13 Jan 2014 08:07:22 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:26130 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142AbaAMNHU (ORCPT ); Mon, 13 Jan 2014 08:07:20 -0500 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s0DD7He4016970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 13 Jan 2014 13:07:18 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s0DD7HlJ015228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 13 Jan 2014 13:07:17 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s0DD7Hbx015215; Mon, 13 Jan 2014 13:07:17 GMT Received: from wish.sg.oracle.com (/10.186.101.18) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 13 Jan 2014 05:07:16 -0800 From: Anand Jain To: xfs@oss.sgi.com Cc: linux-btrfs@vger.kernel.org Subject: [PATCH 2/2] xfstest: tests btrfs/006 fails with mixed-mode/small disks Date: Mon, 13 Jan 2014 21:16:30 +0800 Message-Id: <1389618990-24544-2-git-send-email-anand.jain@oracle.com> X-Mailer: git-send-email 1.8.1.164.g2d0029e In-Reply-To: <1389618990-24544-1-git-send-email-anand.jain@oracle.com> References: <1389618990-24544-1-git-send-email-anand.jain@oracle.com> X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Anand Jain as of now the script does not filter 0.00 size in the filesystem show output, which is the case in multi-disk mixed-mode (that is default group type for small disks) Signed-off-by: Anand Jain --- common/filter | 6 ++++++ common/filter.btrfs | 1 + 2 files changed, 7 insertions(+) diff --git a/common/filter b/common/filter index c872a27..04d12c4 100644 --- a/common/filter +++ b/common/filter @@ -277,6 +277,12 @@ _filter_uuid() fi } +# In mixed group the added disks may have zero used size +_filter_zero_size() +{ + sed -e "s/0\.00//g" +} + # Filter out sizes like 6.14MB etc _filter_size() { diff --git a/common/filter.btrfs b/common/filter.btrfs index 29512cd..75853f2 100644 --- a/common/filter.btrfs +++ b/common/filter.btrfs @@ -33,6 +33,7 @@ _filter_btrfs_filesystem_show() # the uniq collapses all device lines into 1 _filter_uuid $UUID | _filter_scratch | _filter_scratch_pool | \ _filter_size | _filter_btrfs_version | _filter_devid | \ + _filter_zero_size | \ sed -e "s/\(Total devices\) $NUMDEVS/\1 $NUM_SUBST/g" | \ uniq }