All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zach Brown <zab@redhat.com>
To: Josef Bacik <jbacik@fusionio.com>
Cc: Filipe David Borba Manana <fdmanana@gmail.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v3] Btrfs: optimize key searches in btrfs_search_slot
Date: Thu, 29 Aug 2013 12:00:45 -0700	[thread overview]
Message-ID: <20130829190045.GP26818@lenny.home.zabbo.net> (raw)
In-Reply-To: <20130829183532.GC10591@localhost.localdomain>

> > We can replace all that stuff with two easy memcmp_extent_buffers()
> > which vanish if ASSERT is a nop. 
> 
> Actually we can't since we have a cpu key and the keys in the eb are disk keys.
> So maybe keep what we have here and wrap it completely in CONFIG_BTRFS_ASSERT?

I could have sworn that I checked that the input was a disk key.

In that case, then, I'd put all this off in a helper function that's
called in the asserts that swabs to a disk key and then does the memcmp.
All this fiddly assert junk (which just compares keys!) doesn't belong
implemented by hand in this trivial helper.

- z

  reply	other threads:[~2013-08-29 19:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 12:44 [PATCH] Btrfs: optimize key searches in btrfs_search_slot Filipe David Borba Manana
2013-08-29 13:42 ` [PATCH v2] " Filipe David Borba Manana
2013-08-29 13:49 ` [PATCH] " Josef Bacik
2013-08-29 13:53   ` Filipe David Manana
2013-08-29 13:59 ` [PATCH v3] " Filipe David Borba Manana
2013-08-29 18:08   ` Zach Brown
2013-08-29 18:35     ` Josef Bacik
2013-08-29 19:00       ` Zach Brown [this message]
2013-08-29 18:41     ` Filipe David Manana
2013-08-29 19:02       ` Zach Brown
2013-08-29 19:21 ` [PATCH v4] " Filipe David Borba Manana
2013-08-30 14:14   ` David Sterba
2013-08-30 14:47     ` Filipe David Manana
2013-08-30 14:59       ` David Sterba
2013-08-30 15:10         ` Filipe David Manana
2013-08-30 14:46 ` [PATCH v5] " Filipe David Borba Manana
2013-08-31 11:08   ` Miao Xie
2013-08-31 12:54 ` [PATCH v6] " Filipe David Borba Manana
2013-09-01  7:21   ` Miao Xie
2013-09-01 10:32     ` Filipe David Manana
2013-09-01 10:39 ` [PATCH v7] " Filipe David Borba Manana
2013-09-02 13:39   ` David Sterba
2013-09-02 14:40     ` Filipe David Manana
2013-09-02 14:52       ` 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=20130829190045.GP26818@lenny.home.zabbo.net \
    --to=zab@redhat.com \
    --cc=fdmanana@gmail.com \
    --cc=jbacik@fusionio.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 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.