All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: linux-bcachefs@vger.kernel.org
Subject: [PATCH 2/5] bcachefs: remove unnecessary btree_insert_key_leaf() wrapper
Date: Wed, 19 Jul 2023 08:53:03 -0400	[thread overview]
Message-ID: <20230719125306.109342-3-bfoster@redhat.com> (raw)
In-Reply-To: <20230719125306.109342-1-bfoster@redhat.com>

This is in preparation to support prejournaled keys. We want the
ability to optionally pass a seq stored in the btree update rather
than the seq of the committing transaction.

Signed-off-by: Brian Foster <bfoster@redhat.com>
---
 fs/bcachefs/btree_update_leaf.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/fs/bcachefs/btree_update_leaf.c b/fs/bcachefs/btree_update_leaf.c
index 3638cef211b2..11b992282032 100644
--- a/fs/bcachefs/btree_update_leaf.c
+++ b/fs/bcachefs/btree_update_leaf.c
@@ -290,12 +290,6 @@ inline void bch2_btree_insert_key_leaf(struct btree_trans *trans,
 		bch2_trans_node_reinit_iter(trans, b);
 }
 
-static void btree_insert_key_leaf(struct btree_trans *trans,
-				  struct btree_insert_entry *insert)
-{
-	bch2_btree_insert_key_leaf(trans, insert->path, insert->k, trans->journal_res.seq);
-}
-
 /* Cached btree updates: */
 
 /* Normal update interface: */
@@ -753,7 +747,7 @@ bch2_trans_commit_write_locked(struct btree_trans *trans, unsigned flags,
 		i->k->k.needs_whiteout = false;
 
 		if (!i->cached)
-			btree_insert_key_leaf(trans, i);
+			bch2_btree_insert_key_leaf(trans, i->path, i->k, trans->journal_res.seq);
 		else if (!i->key_cache_already_flushed)
 			bch2_btree_insert_key_cached(trans, flags, i);
 		else {
-- 
2.40.1


  parent reply	other threads:[~2023-07-19 12:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19 12:53 [PATCH 0/5] bcachefs: write buffer journaling fixes Brian Foster
2023-07-19 12:53 ` [PATCH 1/5] bcachefs: remove duplicate code between backpointer update paths Brian Foster
2023-07-19 12:53 ` Brian Foster [this message]
2023-07-19 12:53 ` [PATCH 3/5] bcachefs: fold bch2_trans_update_by_path_trace() into callers Brian Foster
2023-07-19 12:53 ` [PATCH 4/5] bcachefs: support btree updates of prejournaled keys Brian Foster
2023-07-19 12:53 ` [PATCH 5/5] bcachefs: use prejournaled key updates for write buffer flushes Brian Foster
2023-07-20 21:26   ` Kent Overstreet
2023-07-21 13:09     ` Brian Foster

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=20230719125306.109342-3-bfoster@redhat.com \
    --to=bfoster@redhat.com \
    --cc=linux-bcachefs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.