Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3509497pxb; Mon, 4 Apr 2022 19:17:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNUzIYWxUI5lMNMntkpBWIfk1eI5iWGWn59QcwvpzI/RWo5iWjotaT7+cQbVsG1AnTZafK X-Received: by 2002:a17:902:e193:b0:156:a04a:40d0 with SMTP id y19-20020a170902e19300b00156a04a40d0mr1083923pla.125.1649125039164; Mon, 04 Apr 2022 19:17:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649125039; cv=none; d=google.com; s=arc-20160816; b=ZelgbI/FTMkOZoVpUS5q0aGXA6snMQ7IAHuIg1YjRFtP17LBVo3wSI7sTkuUxx/eJN cvGZGlgJBiTLhgfYzO9zeK+Ed1nGxeugRa4doiKheTo+i17REu/1rejt9E2KS3aot+Tr ZDxvaM8eILxz6I3l5E1B4tePZnGw01xRkr0j4al1zfc8u6nzbAKa8Bf+hYHYgqmGG2cq GkkBYGmWC0XEZDZBf10vo5YP85xel5uRJrYuzlBIU6xYWicp6U8/rH9v3FeVDd9cPDHk L9jAr3bpoBcptm4/Y3zJZkazTmjRSrCrVYOTdM7ZoQPPwRPRqtqTtPY1kiQnBi6g9955 RJZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Wfpr7Xh+FqyWgrHb9mRhd4rKnQSyLplPFkeGhzZb9g0=; b=CXozu2FU30JKD956qY/YdDyzCU4MnTKDtjA2l8FESxQEDuD09WEkD1gpJQMEwboUNN w26NHrYviW6/0ZP2h9JNkzregYw4bbwEiKhKrQtk02iqbEK4SBxVIo/KR1hVcmPt8P/W cp68v/1USFRkPHEx/QF1bIjC4VrVN51p9PCVJg1yRvwZaTKXztcbWQGNUN3njznna2Xx hsUDxPyPgEfkTEPTHJl7MDubMwwlCAs2suwa9Q59ltyH4OCmqHv8h92bTw0IUovbZhg6 mH2XhvmzbVeSjBuqSJEZJUfk3BYzdozQ4jhbRzh0GKhcZF3+bcV8pQ1dx66qs2mezBn6 4nng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="i/ngoARk"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s4-20020a056a00194400b004fa3b635a94si12172897pfk.111.2022.04.04.19.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 19:17:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="i/ngoARk"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9A6E428EA3E; Mon, 4 Apr 2022 17:39:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236363AbiCaM4l (ORCPT + 99 others); Thu, 31 Mar 2022 08:56:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236373AbiCaM4d (ORCPT ); Thu, 31 Mar 2022 08:56:33 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C35C717179C; Thu, 31 Mar 2022 05:54:46 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id c23so23348611plo.0; Thu, 31 Mar 2022 05:54:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Wfpr7Xh+FqyWgrHb9mRhd4rKnQSyLplPFkeGhzZb9g0=; b=i/ngoARk9G29TRu+hD3k0dQHOk1wObrkCJsOm3kiIZUGiULzE0Fn4otgnZIf5EjPRt hzXWNN2BDpNYZA9c89KtvdIF1eV16n+J8SfuGEj/0JOpJxWt2uT2EhQusimH5cOgD/3K NHJuzEPtFOejFbPldk9Tl4hugh8qcUsHh6z1fIv3CFg6fVGHo+3lxH1EpV26BTkw+ztk k7+/9O/u9XkNZ0quJrRNSd9/lYr3xisC2CDcYDYxTLkjjH6T5Hr+lXIk55XCLZowm4Eb +VPEgm8dZOZ3aH5yp6P7qfUijB8uRiOfNVCuNvShz3Tes0P5tVrHTXQFD2yvBpSq3o6v rMaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Wfpr7Xh+FqyWgrHb9mRhd4rKnQSyLplPFkeGhzZb9g0=; b=l8ISQ4GHsg5bnrXphkTxSa1MyQag3HV8WERZqwHpmTmEmpMDyKL675Xp8wEHgD1sZH RCxZtAF85D0Enz5f9iMZYx8fRP859nHEtyHldqqMsRiQmuQ010kcIcb5u0PW3o2n+OAM CPSL/65mFbdPq+gATcW8QkON4d6DL90W9Rlv3fsxbWjm1nJCCeM5zqp7qD0hJygVkGLQ yIj5yQK3KB2NR9qp0FsF58gIwQLfJlDZZaX/BVSTLv6r3166iohbsGxh1uOmT26vBvu/ Q62MR8qws9WOipF0iKWJm2vA3x325J/omqzwVAW7nGApX4Z9pllQAbG1pvY38dehh1VD SMkA== X-Gm-Message-State: AOAM533rO+Kh+Yjj0SfwpH8Ss59VvTuzxoWti0GzS3qv8NyiBHbyCmQ/ 2CUEhQl9qEBwIa+D9pOLVlwgCL3w4NY= X-Received: by 2002:a17:902:b705:b0:154:a806:5325 with SMTP id d5-20020a170902b70500b00154a8065325mr40873453pls.30.1648731286249; Thu, 31 Mar 2022 05:54:46 -0700 (PDT) Received: from localhost ([2406:7400:63:7e03:b065:1995:217b:6619]) by smtp.gmail.com with ESMTPSA id y15-20020a17090a1f4f00b001c7ecaf9e13sm9977493pjy.35.2022.03.31.05.54.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 05:54:46 -0700 (PDT) From: Ritesh Harjani To: fstests Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, "Darrick J . Wong" , Ritesh Harjani Subject: [PATCHv3 2/4] common/punch: Add block_size argument to _filter_fiemap_** Date: Thu, 31 Mar 2022 18:24:21 +0530 Message-Id: <38648a1fb58b0ab554a21d11eef92f932a3bd7a9.1648730443.git.ritesh.list@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Ritesh Harjani Add block_size paramter to _filter_fiemap_flags() and _filter_hole_fiemap(). This is used in next patches Also this fixes some of the end of line whitespace issues while we are at it. Signed-off-by: Ritesh Harjani --- common/punch | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/punch b/common/punch index b6b8a0b9..706e7c11 100644 --- a/common/punch +++ b/common/punch @@ -109,6 +109,7 @@ _filter_fiemap() _filter_fiemap_flags() { + block_size=$1 $AWK_PROG ' $3 ~ /hole/ { print $1, $2, $3; @@ -135,19 +136,19 @@ _filter_fiemap_flags() } print $1, $2, flag_str }' | - _coalesce_extents + _coalesce_extents $block_size } -# Filters fiemap output to only print the +# Filters fiemap output to only print the # file offset column and whether or not # it is an extent or a hole _filter_hole_fiemap() { $AWK_PROG ' $3 ~ /hole/ { - print $1, $2, $3; + print $1, $2, $3; next; - } + } $5 ~ /0x[[:xdigit:]]+/ { print $1, $2, "extent"; }' | -- 2.31.1