linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <bdd87df835200aa080d7567c7780d65de8fd0392.1631787796.git.fdmanana@suse.com> (raw)
In-Reply-To: <cover.1631787796.git.fdmanana@suse.com>

From: Filipe Manana <fdmanana@suse.com>

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 <fdmanana@suse.com>
---
 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


  parent reply	other threads:[~2021-09-16 10:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 10:32 [PATCH 0/5] btrfs: rework directory logging to make it more efficient fdmanana
2021-09-16 10:32 ` [PATCH 1/5] btrfs: remove root argument from btrfs_log_inode() and its callees fdmanana
2021-09-17 10:51   ` David Sterba
2021-09-17 11:09     ` Filipe Manana
2021-09-17 11:34       ` David Sterba
2021-09-16 10:32 ` fdmanana [this message]
2021-09-16 10:32 ` [PATCH 3/5] btrfs: factor out the copying loop of dir items from log_dir_items() fdmanana
2021-09-16 10:32 ` [PATCH 4/5] btrfs: insert items in batches when logging a directory when possible fdmanana
2021-09-16 10:32 ` [PATCH 5/5] btrfs: keep track of the last logged keys when logging a directory fdmanana
2021-09-17 10:46 ` [PATCH 0/5] btrfs: rework directory logging to make it more efficient David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bdd87df835200aa080d7567c7780d65de8fd0392.1631787796.git.fdmanana@suse.com \
    --to=fdmanana@kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).