public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Sun YangKai <sunk67188@gmail.com>
To: dsterba@suse.cz
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/3] btrfs: replace key_in_sk() with a simple btrfs_key compare
Date: Thu, 19 Jun 2025 22:31:48 +0800	[thread overview]
Message-ID: <22744172.EfDdHjke4D@saltykitkat> (raw)
In-Reply-To: <20250619134329.GM4037@twin.jikos.cz>

> I'd rather use a DEBUG_WARN or ASSERT here. If it's a runtime error that
> can otherwise happen then it should be handled as and error.
> 
> One way or another it's good to have it here as we want to verify the
> assumptions of btrfs_search_forward().

I've just done some tests on my laptop and the result shows we don't need to 
worry about performance here.

And I totally agree that ASSERT is better than WARN_ON.

So I think we can use ASSERT instead of WARN_ON here.

Thanks.

-----

Sorry. Resend with CC.




  reply	other threads:[~2025-06-19 14:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12  4:31 [PATCH 0/3] btrfs: search_tree ioctl performance improvements and cleanups Sun YangKai
2025-06-12  4:31 ` [PATCH 1/3] btrfs: narrow loop variable scope in copy_to_sk() Sun YangKai
2025-06-12  4:31 ` [PATCH 2/3] btrfs: early exit the searching process in search_tree ioctl Sun YangKai
2025-06-12  4:31 ` [PATCH 3/3] btrfs: replace key_in_sk() with a simple btrfs_key compare Sun YangKai
2025-06-19 13:43   ` David Sterba
2025-06-19 14:31     ` Sun YangKai [this message]
2025-06-19 13:51 ` [PATCH 0/3] btrfs: search_tree ioctl performance improvements and cleanups David Sterba
2025-07-26 13:51 ` [PATCH v2 " Sun YangKai
2025-07-26 13:51   ` [PATCH v2 1/3] btrfs: narrow loop variable scope in copy_to_sk() Sun YangKai
2025-07-26 13:51   ` [PATCH v2 2/3] btrfs: early exit the searching process in search_tree ioctl Sun YangKai
2025-07-26 13:51   ` [PATCH v2 3/3] btrfs: replace key_in_sk() with a simple btrfs_key compare Sun YangKai
2025-08-12 12:05   ` [PATCH v2 0/3] btrfs: search_tree ioctl performance improvements and cleanups Sun YangKai
2025-09-09 10:54   ` Sun YangKai

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=22744172.EfDdHjke4D@saltykitkat \
    --to=sunk67188@gmail.com \
    --cc=dsterba@suse.cz \
    --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