All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Balaji Rao <balajirrao@gmail.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] NFS support for btrfs - v2
Date: Mon, 18 Aug 2008 15:23:32 -0400	[thread overview]
Message-ID: <1219087412.14063.22.camel@think.oraclecorp.com> (raw)
In-Reply-To: <1218980439.3184.304.camel@pmac.infradead.org>

On Sun, 2008-08-17 at 14:40 +0100, David Woodhouse wrote:
> On Sun, 2008-08-17 at 18:54 +0530, Balaji Rao wrote:
> > 
> > OK. I had copied over this code snippet from
> > inode.c:btrfs_inode_by_name, 
> > which has the condition 'if (slot >= nritems)' removed now by this.
> > 
> > changeset:   631:87490dc3bb59
> > user:        "Yan Zheng" <yanzheng@21cn.com>
> > date:        Thu Jul 24 12:19:32 2008 -0400
> > summary:     Fix .. lookup corner case
> 
> Er, isn't that just moving the error case around?
> 
> That's commit 3dcd1334c286fa4467219302ff2f9a4a190fbb9c in the git tree:
> http://git.kernel.org/?p=linux/kernel/git/dwmw2/btrfs-kernel-unstable.git;a=commitdiff;h=3dcd1334
> 
> Your version fails if the item we want is in slot 0, because we don't
> jump forward to the next leaf.
> 
> The new version fails if it's in the _last_ slot -- the return from
> btrfs_search_slot() now points to the first slot in the next leaf, and
> we treat that as an error instead of rewinding to the one we want. It's
> just the same error, but in reverse.
> 
> Or am I missing something?
> 

The search key in Yan's patch changes to (u64)-1.  We know that if we're
in slot 0, there's nothing after us in the tree.

-chris



  reply	other threads:[~2008-08-18 19:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-20 20:31 [PATCH] NFS support for btrfs - v2 Balaji Rao
2008-08-17 11:53 ` David Woodhouse
2008-08-17 12:51   ` Balaji Rao
2008-08-17 12:56     ` David Woodhouse
2008-08-17 13:24       ` Balaji Rao
2008-08-17 13:30         ` David Woodhouse
2008-08-17 14:17           ` David Woodhouse
2008-08-17 16:10             ` [PATCH] rewrite btrfs_readdir() David Woodhouse
2008-08-18 18:46               ` Chris Mason
2008-08-18 19:08                 ` David Woodhouse
2008-08-18 19:24                   ` Chris Mason
2008-08-18 19:32                     ` David Woodhouse
2008-08-17 13:40         ` [PATCH] NFS support for btrfs - v2 David Woodhouse
2008-08-18 19:23           ` Chris Mason [this message]
2008-08-18 19:33             ` David Woodhouse
2008-08-18 19:47               ` Chris Mason
2008-08-18 20:20                 ` David Woodhouse
2008-08-18 20:32                   ` Chris Mason
2008-08-18 21:52                     ` David Woodhouse
2008-08-19 11:54                       ` Chris Mason
2008-08-19 14:49                         ` David Woodhouse
2008-08-19 21:34                           ` David Woodhouse
2008-08-19  0:16                   ` Christoph Hellwig
2008-08-19  0:21                     ` David Woodhouse
2008-08-18 11:51     ` David Woodhouse
2008-08-18 12:10       ` David Woodhouse
2008-08-18 19:15         ` Chris Mason

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=1219087412.14063.22.camel@think.oraclecorp.com \
    --to=chris.mason@oracle.com \
    --cc=balajirrao@gmail.com \
    --cc=dwmw2@infradead.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 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.