From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5353C433EF for ; Thu, 16 Sep 2021 10:32:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9970561214 for ; Thu, 16 Sep 2021 10:32:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236525AbhIPKdj (ORCPT ); Thu, 16 Sep 2021 06:33:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:58508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235590AbhIPKdj (ORCPT ); Thu, 16 Sep 2021 06:33:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9B3986120E for ; Thu, 16 Sep 2021 10:32:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631788339; bh=CqpYUxXgW5n14goXh8VH4P6d2Wi6wLi4ri7i/GJiEv0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nV1dbC3u4hz+iuhVCpTHOWioagy4G5czYr6aqsu08gWBy9RZOb+H2AEzYvt2m8kr6 LYCoXOrIJvu/UfLL5l7y5xCIxwaMXyo4uMu1RT1n5/OcXX4Ya38CvS5z/cmcGkt/UF xFyj3923738CTLKyCXWoI6NJSC7+mahxasI14u+xFm46tcsjsN53O4Mg9LmfFS64MI t7VqsTMsgXHv4jHa/bQO4F/SyMpEfxopF3pk+WkVZukRwxFQ60ZJ/9HY0LG1t6CBOP YTJD3fWi1BwbepJGj66SqR2UMJEeYuYDAD9e8QuyKVwPdoIEYP1cEMNRbXpHqQMjfN yCpKOdusA5G9A== From: fdmanana@kernel.org To: linux-btrfs@vger.kernel.org Subject: [PATCH 2/5] btrfs: remove redundant log root assignment from log_dir_items() Date: Thu, 16 Sep 2021 11:32:11 +0100 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Filipe Manana At log_dir_items() we are assigning the exact same value to the local variable 'log', once when it's declared and once again shortly after. Remove the later assignment as it's pointless. This patch is part of a patchset comprised of the following 5 patches: btrfs: remove root argument from btrfs_log_inode() and its callees btrfs: remove redundant log root assignment from log_dir_items() btrfs: factor out the copying loop of dir items from log_dir_items() btrfs: insert items in batches when logging a directory when possible btrfs: keep track of the last logged keys when logging a directory This is patch 2/5. The change log of the last patch (5/5) has performance results. Signed-off-by: Filipe Manana --- fs/btrfs/tree-log.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index be9fb98465f5..64db4bd8e965 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -3639,8 +3639,6 @@ static noinline int log_dir_items(struct btrfs_trans_handle *trans, u64 last_offset = (u64)-1; u64 ino = btrfs_ino(inode); - log = root->log_root; - min_key.objectid = ino; min_key.type = key_type; min_key.offset = min_offset; -- 2.33.0