From patchwork Tue Sep 26 18:44:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 13399566 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0B2FE7E65A for ; Tue, 26 Sep 2023 18:50:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235493AbjIZSvE (ORCPT ); Tue, 26 Sep 2023 14:51:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235601AbjIZSvC (ORCPT ); Tue, 26 Sep 2023 14:51:02 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01C10EB for ; Tue, 26 Sep 2023 11:50:54 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id A8A102185F; Tue, 26 Sep 2023 18:50:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1695754253; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=mKva6kf762UygOCJigAsGFuZqTx/siMN1jpWK4seLgc=; b=qyUNvgw0dOJ2pc1TICXRhn/TuwODPJswWQybOI/AzNamQfnnmdyt3874D72Geq2J6FBn7h kqZuEBsRc+ScyvwzzL2bDd2TW3kYphvjYKgRPzgsiJATGHn5RusRdNk/b/JJWygaKzgltS QeZCuDFWmNsEkkCw5Q7TiPrPv2hwfqc= Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id 80FB72C143; Tue, 26 Sep 2023 18:50:53 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 189A4DA832; Tue, 26 Sep 2023 20:44:15 +0200 (CEST) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: David Sterba Subject: [PATCH 0/2] Speed up test_range_bit() Date: Tue, 26 Sep 2023 20:44:15 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Split test_range_bit() to two helpers according to what callers need, slightly improving the loops by avoiding conditionals. David Sterba (2): btrfs: add specific helper for range bit test exists btrfs: change test_range_bit to scan the whole range fs/btrfs/defrag.c | 4 +-- fs/btrfs/extent-io-tree.c | 65 +++++++++++++++++++++++++++++---------- fs/btrfs/extent-io-tree.h | 5 +-- fs/btrfs/extent_io.c | 10 +++--- fs/btrfs/inode.c | 8 ++--- fs/btrfs/relocation.c | 2 +- 6 files changed, 62 insertions(+), 32 deletions(-)