From patchwork Mon Nov 30 10:17:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 7723001 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4C8979F39B for ; Mon, 30 Nov 2015 10:18:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80A552053A for ; Mon, 30 Nov 2015 10:18:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 63B1F2054C for ; Mon, 30 Nov 2015 10:18:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753225AbbK3KRv (ORCPT ); Mon, 30 Nov 2015 05:17:51 -0500 Received: from e28smtp07.in.ibm.com ([122.248.162.7]:43527 "EHLO e28smtp07.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752862AbbK3KRs (ORCPT ); Mon, 30 Nov 2015 05:17:48 -0500 Received: from localhost by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Nov 2015 15:47:47 +0530 Received: from d28dlp01.in.ibm.com (9.184.220.126) by e28smtp07.in.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 30 Nov 2015 15:47:42 +0530 X-IBM-Helo: d28dlp01.in.ibm.com X-IBM-MailFrom: chandan@linux.vnet.ibm.com X-IBM-RcptTo: fstests@vger.kernel.org;linux-btrfs@vger.kernel.org Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id BCA5CE0061; Mon, 30 Nov 2015 15:48:21 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay01.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tAUAHSk854526026; Mon, 30 Nov 2015 15:47:29 +0530 Received: from d28av03.in.ibm.com (localhost [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tAUAHRKv016240; Mon, 30 Nov 2015 15:47:28 +0530 Received: from localhost.in.ibm.com ([9.124.158.154]) by d28av03.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id tAUAHPBI016187; Mon, 30 Nov 2015 15:47:26 +0530 From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , linux-btrfs@vger.kernel.org, fdmanana@gmail.com, chandan@mykolab.com Subject: [PATCH 1/8] Filter xfs_io's output in units of page size Date: Mon, 30 Nov 2015 15:47:17 +0530 Message-Id: <1448878644-16503-2-git-send-email-chandan@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1448878644-16503-1-git-send-email-chandan@linux.vnet.ibm.com> References: <1448878644-16503-1-git-send-email-chandan@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15113010-0025-0000-0000-000008602AF5 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 The helpers introduced in this commit will be used to make btrfs tests that assume 4k as the page size to work on non-4k page-sized systems as well. Signed-off-by: Chandan Rajendra Reviewed-by: Filipe Manana --- common/filter | 8 ++++++++ common/rc | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/common/filter b/common/filter index 05f2fab..1be377c 100644 --- a/common/filter +++ b/common/filter @@ -261,6 +261,14 @@ _filter_xfs_io_blocks_modified() _filter_xfs_io_units_modified "Block" $BLOCK_SIZE } +_filter_xfs_io_pages_modified() +{ + PAGE_SIZE=$(get_page_size) + + _filter_xfs_io_units_modified "Page" $PAGE_SIZE +} + + _filter_test_dir() { sed -e "s,$TEST_DEV,TEST_DEV,g" -e "s,$TEST_DIR,TEST_DIR,g" diff --git a/common/rc b/common/rc index 4c2f42c..82c1bbb 100644 --- a/common/rc +++ b/common/rc @@ -3151,6 +3151,12 @@ get_block_size() echo `stat -f -c %S $1` } +get_page_size() +{ + echo $(getconf PAGE_SIZE) +} + + init_rc ################################################################################