From: Josef Bacik <josef@toxicpanda.com>
To: kernel-team@fb.com, linux-btrfs@vger.kernel.org
Subject: [PATCH 4/8] btrfs: switch args for comp_*_refs
Date: Thu, 19 Oct 2017 14:15:58 -0400 [thread overview]
Message-ID: <1508436962-6851-5-git-send-email-josef@toxicpanda.com> (raw)
In-Reply-To: <1508436962-6851-1-git-send-email-josef@toxicpanda.com>
Make it more consistent, we want the inserted ref to be compared against
what's already in there. This will make the order go from lowest seq ->
highest seq, which will make us more likely to make forward progress if
there's a seqlock currently held.
Signed-off-by: Josef Bacik <jbacik@fb.com>
---
fs/btrfs/delayed-ref.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index a2973340a94f..bc940bb374cf 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -40,8 +40,8 @@ struct kmem_cache *btrfs_delayed_extent_op_cachep;
/*
* compare two delayed tree backrefs with same bytenr and type
*/
-static int comp_tree_refs(struct btrfs_delayed_tree_ref *ref2,
- struct btrfs_delayed_tree_ref *ref1)
+static int comp_tree_refs(struct btrfs_delayed_tree_ref *ref1,
+ struct btrfs_delayed_tree_ref *ref2)
{
if (ref1->node.type == BTRFS_TREE_BLOCK_REF_KEY) {
if (ref1->root < ref2->root)
@@ -60,8 +60,8 @@ static int comp_tree_refs(struct btrfs_delayed_tree_ref *ref2,
/*
* compare two delayed data backrefs with same bytenr and type
*/
-static int comp_data_refs(struct btrfs_delayed_data_ref *ref2,
- struct btrfs_delayed_data_ref *ref1)
+static int comp_data_refs(struct btrfs_delayed_data_ref *ref1,
+ struct btrfs_delayed_data_ref *ref2)
{
if (ref1->node.type == BTRFS_EXTENT_DATA_REF_KEY) {
if (ref1->root < ref2->root)
--
2.7.5
next prev parent reply other threads:[~2017-10-19 18:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-19 18:15 [PATCH 0/8] Remaining queue Josef Bacik
2017-10-19 18:15 ` [PATCH 1/8] Btrfs: rework outstanding_extents Josef Bacik
2017-10-19 18:15 ` [PATCH 2/8] btrfs: add tracepoints for outstanding extents mods Josef Bacik
2017-10-19 18:15 ` [PATCH 3/8] btrfs: make the delalloc block rsv per inode Josef Bacik
2017-10-19 18:15 ` Josef Bacik [this message]
2017-10-19 18:15 ` [PATCH 5/8] btrfs: add a comp_refs() helper Josef Bacik
2017-10-19 18:16 ` [PATCH 6/8] btrfs: track refs in a rb_tree instead of a list Josef Bacik
2017-10-19 18:16 ` [PATCH 7/8] btrfs: don't call btrfs_start_delalloc_roots in flushoncommit Josef Bacik
2017-10-19 18:16 ` [PATCH 8/8] btrfs: move btrfs_truncate_block out of trans handle Josef Bacik
2017-10-20 15:35 ` [PATCH 0/8] Remaining queue 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=1508436962-6851-5-git-send-email-josef@toxicpanda.com \
--to=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--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).