Yan Zheng
2007-Nov-26 00:46 UTC
[Btrfs-devel][PATCH]Properly update right_nritems in push_leaf_left
Hello, The codes that fixup the right leaf and the codes that dirty the extnet buffer use the variable 'right_nritems' , both of them expect 'right_nritems' is the number of items in right leaf after the push. Regards YZ --- diff -r 66ea50b1a761 ctree.c --- a/ctree.c Tue Nov 20 13:44:45 2007 -0500 +++ b/ctree.c Mon Nov 26 16:35:28 2007 +0800 @@ -1719,7 +1719,8 @@ static int push_leaf_left(struct btrfs_t sizeof(struct btrfs_item)); } - btrfs_set_header_nritems(right, right_nritems - push_items); + right_nritems -= push_items; + btrfs_set_header_nritems(right, right_nritems); push_space = BTRFS_LEAF_DATA_SIZE(root); for (i = 0; i < right_nritems; i++) {
Chris Mason
2007-Nov-26 07:58 UTC
[Btrfs-devel][PATCH]Properly update right_nritems in push_leaf_left
On Mon, 26 Nov 2007 16:45:50 +0800 "Yan Zheng" <yanzheng@21cn.com> wrote:> Hello, > > The codes that fixup the right leaf and the codes that dirty the > extnet buffer use the variable 'right_nritems' , both of them expect > 'right_nritems' is the number of items in right leaf after the push.Thanks, I've queued this up. -chris