Re: [PATCH] NFS support for btrfs - v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
> > 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


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux