kernel BUG at fs/btrfs/inode.c:2642!
Hi Chris,
The latest mmotm on a virtual machine boots, but when I log in I get:
[ 82.276418] ------------[ cut here ]------------ [ 82.277565] kernel BUG at fs/btrfs/inode.c:2643! [ 82.278692] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC [ 82.280332] last sysfs file: /sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/devnum [ 82.282323] CPU 1 [ 82.282790] Modules linked in: nfs lockd fscache nfs_acl auth_rpcgss sunrpc ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 uinput snd_ens1371 gameport snd_rawmidi snd_ac97_codec ac97_bus snd_seq snd_seq_device snd_pcm ppdev snd_timer microcode pcspkr snd soundcore parport_pc snd_page_alloc i2c_piix4 floppy parport e1000 shpchp i2c_core mptspi mptscsih mptbase scsi_transport_spi [last unloaded: speedstep_lib] [ 82.293369] [ 82.293818] Pid: 5572, comm: gconfd-2 Not tainted 2.6.35-rc6-mm1+ #12 440BX Desktop Reference Platform/VMware Virtual Platform [ 82.296661] RIP: 0010:[<ffffffff811b0e65>] [<ffffffff811b0e65>] btrfs_unlink_inode+0x1bb/0x25e [ 82.298629] RSP: 0018:ffff880069f9fc18 EFLAGS: 00010282 [ 82.299810] RAX: 00000000fffffffe RBX: ffff88005985b250 RCX: ffff880002840006 [ 82.301394] RDX: 0000000000000006 RSI: 0000000000000003 RDI: ffff880079b0b0d8 [ 82.302973] RBP: ffff880069f9fc98 R08: 0000000000000046 R09: ffff880069f9fac8 [ 82.303244] old_dentry database~ new_dentry database [ 82.303283] seq number to delete is 14 [ 82.303331] seq number to delete is 13 [ 82.304260] old_dentry database~ new_dentry database [ 82.304298] seq number to delete is 16 [ 82.304344] seq number to delete is 15 [ 82.310183] R10: ffff880069f9fae8 R11: ffff880069f9fae8 R12: 00000000fffffffe [ 82.311726] R13: ffff88005985b910 R14: ffff88007a232288 R15: ffff880079b0b0d8 [ 82.313286] FS: 00007f27f4ea87c0(0000) GS:ffff880002840000(0000) knlGS:0000000000000000 [ 82.315048] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 82.316305] CR2: 00007ff36b92fac0 CR3: 000000006a363000 CR4: 00000000000006e0 [ 82.317912] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 82.319510] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 82.321171] Process gconfd-2 (pid: 5572, threadinfo ffff880069f9e000, task ffff88006a3e8000) [ 82.323026] Stack: [ 82.323485] ffff88000000000b 00000000ffffffff 0000000000000e03 ffff880068a260d0 [ 82.325245] <0> 0000000b69f9fc68 ffff880078f13088 000000000042ba39 0000000000000001 [ 82.327290] <0> [ 82.327701] old_dentry .xsession-errors new_dentry .xsession-errors.old [ 82.329271] ffff880079b0b300 000000000000042b ffff880069f9fc78 ffff88005986f4b8 [ 82.331896] Call Trace: [ 82.332454] [<ffffffff811b16cd>] btrfs_rename+0x33b/0x473 [ 82.333662] [<ffffffff8112cb1f>] vfs_rename+0x225/0x369 [ 82.334835] [<ffffffff81043bde>] ? get_parent_ip+0x11/0x41 [ 82.336066] [<ffffffff8112e3cf>] sys_renameat+0x193/0x20c [ 82.337274] [<ffffffff810adbcf>] ? check_for_new_grace_period+0xde/0xfa [ 82.338738] [<ffffffff810ae37e>] ? __call_rcu+0x138/0x14b [ 82.340262] [<ffffffff810ae37e>] ? __call_rcu+0x138/0x14b [ 82.341541] [<ffffffff810c6014>] ? time_hardirqs_off+0x1e/0x20 [ 82.342907] [<ffffffff8148acf9>] ? retint_swapgs+0x13/0x1b [ 82.344264] [<ffffffff8148acf9>] ? retint_swapgs+0x13/0x1b [ 82.345554] [<ffffffff8107ed21>] ? trace_hardirqs_on_caller+0x11d/0x141 [ 82.347181] [<ffffffff8112e463>] sys_rename+0x1b/0x1d [ 82.348391] [<ffffffff81009d32>] system_call_fastpath+0x16/0x1b [ 82.349818] Code: 74 08 85 c0 74 04 0f 0b eb fe 4c 8b 4d c8 8b 4d a4 49 89 d8 48 8b 55 98 48 8b 7d a8 4c 89 fe e8 35 23 02 00 85 c0 41 89 c4 74 12 <0f> 0b eb fe 41 bc f4 ff ff ff eb 06 41 bc fe ff ff ff 4c 89 f7 [ 82.356109] RIP [<ffffffff811b0e65>] btrfs_unlink_inode+0x1bb/0x25e [ 82.357522] RSP <ffff880069f9fc18> [ 82.358414] ---[ end trace fe6f359e73694983 ]---
When looking into the log tree, btrfs_lookup_dir_item finds the dir item, but btrfs_lookup_dir_index_item fails.
If I revert the following patch, I don't encounter the above problem. But I am not certain if I really should revert it as it looks mostly fine.
commit 018db35864fd8d307066485a2753866240c3dace
Author: Andi Kleen <[email protected]> Date: Wed Jul 21 00:29:24 2010 +0200
These are all the cases where a variable is set, but not read which are really bugs.
- Couple of incorrect error handling fixed.
- One incorrect use of a allocation policy
- Some other things
Still needs more review.
Found by gcc 4.6's new warnings.
fs/btrfs/dir-item.c +1 -1
@@ -427,5 +427,5 @@ int btrfs_delete_one_dir_name(struct btrfs_trans_handle *trans, ret =btrfs_truncate_item (trans, root, path, item_len - sub_item_len,1 ); } -return 0 ; +return ret; }
fs/btrfs/extent-tree.c +1 -2
@@ -3337,8 +3337,7 @@ struct btrfs_block_rsv *btrfs_alloc_block_rsv(struct btrfs_root *root)btrfs_init_block_rsv (block_rsv); alloc_target =btrfs_get_alloc_profile (root,0 ); - block_rsv->space_info =__find_space_info (fs_info, -BTRFS_BLOCK_GROUP_METADATA ); + block_rsv->space_info =__find_space_info (fs_info, alloc_target);return block_rsv; }
fs/btrfs/extent_io.c +2 -0
@@ -2823,6 +2823,8 @@ int extent_prepare_write(struct extent_io_tree *tree,NULL ,1 , end_bio_extent_preparewrite,0 , 0, 0); +if (ret && !err) + err = ret; iocount++; block_start = block_start + iosize; }else {
fs/btrfs/inode.c +3 -3
@@ -1372,7 +1372,7 @@ int btrfs_merge_bio_hook(struct page *page, unsigned long offset,if (map_length < length + size)return 1 ; -return 0 ; +return ret; }/*
@@ -2672,8 +2672,8 @@ static int check_path_shared(struct btrfs_root *root, {struct extent_buffer *eb;int level; -int ret;u64 refs =1 ; +int uninitialized_var (ret );for (level =0 ; level <BTRFS_MAX_LEVEL ; level++) {if (!path->nodes[level])
@@ -2686,7 +2686,7 @@ static int check_path_shared(struct btrfs_root *root,if (refs >1 )return 1 ; } -return 0 ; +return ret;/* XXX callers? */ }/*
fs/btrfs/relocation.c +3 -1
@@ -3099,6 +3099,8 @@ static int add_tree_block(struct reloc_control *rc,BUG_ON (item_size !=sizeof (struct btrfs_extent_item_v0 )); ret =get_ref_objectid_v0 (rc, path, extent_key, &ref_owner,NULL ); +if (ret <0 ) +return ret;BUG_ON (ref_owner >=BTRFS_MAX_LEVEL ); level = (int )ref_owner;/* FIXME: get real generation */
@@ -4143,7 +4145,7 @@ int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len)btrfs_add_ordered_sum (inode, ordered, sums); }btrfs_put_ordered_extent (ordered); -return 0 ; +return ret; } void btrfs_reloc_cow_block(struct btrfs_trans_handle *trans,
fs/btrfs/tree-log.c +1 -1
@@ -2273,7 +2273,7 @@ fail: }btrfs_end_log_trans (root); -return 0 ; +return err; }/* see comments for btrfs_del_dir_entries_in_log */
Signature · 1 line
Itaru Kitayama <[email protected]>
Hi,
That's because btrfs_del_dir_entries_in_log() will return the real errno after Andi's
commit, so btrfs_unlink_inode() has to check the return value more seri= ously.
A patch for this has been sent out.
Regards,
Zhu Yanhai
2010/9/9 Itaru Kitayama <[email protected]>:
Quoted 6 lines
Hi Chris,
The latest mmotm on a virtual machine boots, but when I log in I get:[ =C2=A0 82.276418] ------------[ cut here ]------------
[ =C2=A0 82.277565] kernel BUG atfs/btrfs/inode.c:2643!
[ =C2=A0 82.278692] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEA=
LLOC
Quoted 1 line
[ =C2=A0 82.280332] last sysfs file: /sys/devices/pci0000:00/0000:00:=
11.0/0000:02:00.0/usb2/devnum
Quoted 2 lines
[ =C2=A0 82.282323] CPU 1
[ =C2=A0 82.282790] Modules linked in: nfs lockd fscachenfs_aclauth=
_rpcgss sunrpc ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables=
ipv6 uinput snd_ens1371 gameport snd_rawmidi snd_ac97_codec ac97_bus s=nd_seq snd_seq_device snd_pcm ppdev snd_timer microcode pcspkr snd soun= dcore parport_pc snd_page_alloc i2c_piix4 floppy parport e1000 shpchp i= 2c_core mptspi mptscsih mptbase scsi_transport_spi [last unloaded: spee= dstep_lib]
Quoted 2 lines
[ =C2=A0 82.293369]
[ =C2=A0 82.293818] Pid: 5572, comm: gconfd-2 Not tainted 2.6.35-rc6-=
mm1+ #12 440BX Desktop Reference Platform/VMware Virtual Platform
Quoted 1 line
[ =C2=A0 82.296661] RIP: 0010:[<ffffffff811b0e65>] =C2=A0[<ffffffff81=
1b0e65>] btrfs_unlink_inode+0x1bb/0x25e
Quoted 2 lines
[ =C2=A0 82.298629] RSP: 0018:ffff880069f9fc18 =C2=A0EFLAGS: 00010282 [ =C2=A0 82.299810] RAX:
00000000fffffffeRBX:ffff88005985b250RCX: =
ffff880002840006
Quoted 1 line
[ =C2=A0 82.301394] RDX: 0000000000000006 RSI: 0000000000000003 RDI: =
ffff880079b0b0d8
Quoted 1 line
[ =C2=A0 82.302973] RBP:
ffff880069f9fc98R08: 0000000000000046 R09: =
ffff880069f9fac8
Quoted 7 lines
[ =C2=A0 82.303244]
old_dentrydatabase~new_dentrydatabase [ =C2=A0 82.303283] seq number to delete is 14
[ =C2=A0 82.303331] seq number to delete is 13
[ =C2=A0 82.304260]old_dentrydatabase~new_dentrydatabase [ =C2=A0 82.304298] seq number to delete is 16
[ =C2=A0 82.304344] seq number to delete is 15
[ =C2=A0 82.310183] R10:ffff880069f9fae8R11:ffff880069f9fae8R12: =
00000000fffffffe
Quoted 1 line
[ =C2=A0 82.311726] R13:
ffff88005985b910R14:ffff88007a232288R15: =
ffff880079b0b0d8
Quoted 1 line
[ =C2=A0 82.313286] FS: =C2=A000007f27f4ea87c0(0000) GS:ffff880002840=
000(0000) knlGS:0000000000000000
Quoted 1 line
[ =C2=A0 82.315048] CS: =C2=A00010 DS: 0000 ES: 0000 CR0: 00000000800=
5003b
Quoted 1 line
[ =C2=A0 82.316305] CR2:
00007ff36b92fac0CR3:000000006a363000CR4: =
00000000000006e0
Quoted 1 line
[ =C2=A0 82.317912] DR0: 0000000000000000 DR1: 0000000000000000 DR2: =
0000000000000000
Quoted 1 line
[ =C2=A0 82.319510] DR3: 0000000000000000 DR6:
00000000ffff0ff0DR7: =
0000000000000400
Quoted 1 line
[ =C2=A0 82.321171] Process gconfd-2 (pid: 5572, threadinfo ffff88006=
9f9e000, task ffff88006a3e8000)
Quoted 2 lines
[ =C2=A0 82.323026] Stack:
[ =C2=A0 82.323485] =C2=A0ffff88000000000b00000000ffffffff000000000=
0000e03 ffff880068a260d0
Quoted 1 line
[ =C2=A0 82.325245] <0>
0000000b69f9fc68ffff880078f1308800000000004=
2ba39 0000000000000001
Quoted 2 lines
[ =C2=A0 82.327290] <0>
[ =C2=A0 82.327701]old_dentry.xsession-errorsnew_dentry.xsession-=
errors.old
Quoted 1 line
[ =C2=A0 82.329271] =C2=A0ffff880079b0b300
000000000000042bffff88006=
9f9fc78 ffff88005986f4b8
Quoted 2 lines
[ =C2=A0 82.331896] Call Trace:
[ =C2=A0 82.332454] =C2=A0[<ffffffff811b16cd>] btrfs_rename+0x33b/0x4=
73
Quoted 2 lines
[ =C2=A0 82.333662] =C2=A0[<ffffffff8112cb1f>]
vfs_rename+0x225/0x369[ =C2=A0 82.334835] =C2=A0[<ffffffff81043bde>] ? get_parent_ip+0x11/0=
x41
Quoted 1 line
[ =C2=A0 82.336066] =C2=A0[<ffffffff8112e3cf>] sys_renameat+0x193/0x2=
0c
Quoted 1 line
[ =C2=A0 82.337274] =C2=A0[<ffffffff810adbcf>] ? check_for_new_grace_=
period+0xde/0xfa > [ =C2=A0 82.338738] =C2=A0[<ffffffff810ae37e>] ? __call_rcu+0x138/0x1=
4b
Quoted 1 line
[ =C2=A0 82.340262] =C2=A0[<ffffffff810ae37e>] ? __call_rcu+0x138/0x1=
4b
Quoted 1 line
[ =C2=A0 82.341541] =C2=A0[<ffffffff810c6014>] ? time_hardirqs_off+0x=
1e/0x20
Quoted 1 line
[ =C2=A0 82.342907] =C2=A0[<ffffffff8148acf9>] ? retint_swapgs+0x13/0=
x1b
Quoted 1 line
[ =C2=A0 82.344264] =C2=A0[<ffffffff8148acf9>] ? retint_swapgs+0x13/0=
x1b
Quoted 1 line
[ =C2=A0 82.345554] =C2=A0[<ffffffff8107ed21>] ? trace_hardirqs_on_ca=
ller+0x11d/0x141 > [ =C2=A0 82.347181] =C2=A0[<ffffffff8112e463>] sys_rename+0x1b/0x1d
Quoted 1 line
[ =C2=A0 82.348391] =C2=A0[<ffffffff81009d32>] system_call_fastpath+0=
x16/0x1b
Quoted 1 line
[ =C2=A0 82.349818] Code: 74 08 85 c0 74 04 0f 0b eb fe 4c 8b 4d c8 8=
b 4d a4 49 89 d8 48 8b 55 98 48 8b 7d a8 4c 89 fe e8 35 23 02 00 85 c0 = 41 89 c4 74 12 <0f> 0b eb fe 41 bc f4 ff ff ff eb 06 41 bc fe ff ff ff = 4c 89 f7
Quoted 1 line
[ =C2=A0 82.356109] RIP =C2=A0[<ffffffff811b0e65>] btrfs_unlink_inode=
+0x1bb/0x25e
Quoted 4 lines
[ =C2=A0 82.357522] =C2=A0RSP <
ffff880069f9fc18> [ =C2=A0 82.358414] ---[ end tracefe6f359e73694983]---When looking into the log tree,
btrfs_lookup_dir_itemfinds the dir i=
tem, but
Quoted 4 lines
btrfs_lookup_dir_index_itemfails.If I revert the following patch, I don't encounter the above problem. But I am not certain if I really should revert it as it looks mostly =
fine.
Quoted 12 lines
commit
018db35864fd8d307066485a2753866240c3dace
Author: Andi Kleen <[email protected]>
Date: =C2=A0 Wed Jul 21 00:29:24 2010 +0200=C2=A0 =C2=A0These are all the cases where a variable is set, but not =C2=A0 =C2=A0read which are really bugs.
=C2=A0 =C2=A0- Couple of incorrect error handling fixed. =C2=A0 =C2=A0- One incorrect use of a allocation policy =C2=A0 =C2=A0- Some other things
Quoted 5 lines
=C2=A0 =C2=A0Still needs more review.
=C2=A0 =C2=A0Found by gcc 4.6's new warnings.
=C2=A0 =C2=A0[[email protected]: fix build. =C2=A0Might have =
been bitrot]
fs/btrfs/dir-item.c int btrfs_delete_one_dir_name(struct btrfs_trans_=
Quoted 9 lines
=C2=A0 =C2=A0Signed-off-by: Andi Kleen <[email protected]> =C2=A0 =C2=A0Cc: Chris Mason <[email protected]> =C2=A0 =C2=A0Signed-off-by: Andrew Morton <[email protected]>
fs/btrfs/dir-item.c +0
-0@@ -427,5 +427,5 @@ int btrfs_delete_one_dir_name(struct btrfs_trans_=
handle *trans,
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ret =3D btrfs_=
truncate_item(trans, root, path,
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0item_len - sub_item_len, 1);
fs/btrfs/extent-tree.c struct btrfs_block_rsv *btrfs_alloc_block_rsv(s=
Quoted 9 lines
=C2=A0 =C2=A0 =C2=A0 =C2=A0}
- =C2=A0 =C2=A0 =C2=A0 return 0;
+ =C2=A0 =C2=A0 =C2=A0 return ret;
=C2=A0}fs/btrfs/extent-tree.c +0
-0@@ -3337,8 +3337,7 @@ struct btrfs_block_rsv *btrfs_alloc_block_rsv(s=
truct btrfs_root *root)
Quoted 3 lines
fs/btrfs/extent-tree.c +0
-0=C2=A0 =C2=A0 =C2=A0 =C2=A0btrfs_init_block_rsv(block_rsv);=C2=A0 =C2=A0 =C2=A0 =C2=A0alloc_target =3D btrfs_get_alloc_profile(r=
oot, 0);
Quoted 1 line
- =C2=A0 =C2=A0 =C2=A0
block_rsv->space_info=3D __find_space_info(fs=
_info,
Quoted 1 line
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 BTRFS_BLOCK_GROUP_METADATA);
Quoted 1 line
+ =C2=A0 =C2=A0 =C2=A0
block_rsv->space_info=3D __find_space_info(fs=
_info, alloc_target);
fs/btrfs/extent_io.c int extent_prepare_write(struct extent_io_tree =
Quoted 8 lines
=C2=A0 =C2=A0 =C2=A0 =C2=A0return
block_rsv;
=C2=A0}fs/btrfs/extent_io.c +0
-0@@ -2823,6 +2823,8 @@ int extent_prepare_write(struct extent_io_tree =
*tree,
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
NULL, 1,
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =end_bio_extent_preparewrite, 0,
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
0, 0);
Quoted 1 line
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 if (ret && !err)
Quoted 1 line
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 err =3D ret;
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0iocount++;
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0block_start =3D block_start + iosize;
fs/btrfs/inode.c int btrfs_merge_bio_hook(struct page *page, uns=
Quoted 6 lines
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} else {
fs/btrfs/inode.c +0
-0@@ -1372,7 +1372,7 @@ int btrfs_merge_bio_hook(struct page *page, uns=
igned long offset,
fs/btrfs/inode.c static int check_path_shared(struct btrfs_root =
Quoted 9 lines
fs/btrfs/inode.c +1
-1=C2 =A0 =C2 =A0 =C2 =A0 =C2 =A0if (map_length < length + size) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 1; - =C2=A0 =C2=A0 =C2=A0 return 0; + =C2=A0 =C2=A0 =C2=A0 return ret; =C2=A0}=C2=A0/*
fs/btrfs/inode.c +0
-0@@ -2672,8 +2672,8 @@ static int check_path_shared(struct btrfs_root =
*root,
Quoted 8 lines
fs/btrfs/inode.c +1
-1=C2=A0{ =C2=A0 =C2=A0 =C2=A0 =C2=A0struct extent_buffer *eb; =C2=A0 =C2=A0 =C2=A0 =C2=A0int level; - =C2=A0 =C2=A0 =C2=A0 int ret; =C2=A0 =C2=A0 =C2=A0 =C2=A0u64 refs =3D 1; + =C2=A0 =C2=A0 =C2=A0 int uninitialized_var(ret);=C2=A0 =C2=A0 =C2=A0 =C2=A0for (level =3D 0; level < BTRFS_MAX_LEVEL;=
level++) {
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!path->nod=
es[level])
fs/btrfs/inode.c static int check_path_shared(struct btrfs_root =
Quoted 1 line
fs/btrfs/inode.c +0
-0@@ -2686,7 +2686,7 @@ static int check_path_shared(struct btrfs_root =
*root,
Quoted 2 lines
fs/btrfs/inode.c +0
-0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (refs > 1)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0return 1;
fs/btrfs/relocation.c static int add_tree_block(struct reloc_control =
Quoted 11 lines
=C2=A0 =C2=A0 =C2=A0 =C2=A0}
- =C2=A0 =C2=A0 =C2=A0 return 0;
+ =C2=A0 =C2=A0 =C2=A0 return ret; /* XXX callers? */ =C2=A0}=C2=A0/*
fs/btrfs/relocation.c +0
-0@@ -3099,6 +3099,8 @@ static int add_tree_block(struct reloc_control =
*rc,
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0BUG_ON(item_si=
ze !=3D sizeof(struct btrfs_extent_item_v0));
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ret =3D get_re=
f_objectid_v0(rc, path, extent_key,
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0&ref_owner, NULL);
Quoted 2 lines
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (ret < 0)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 return ret;
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0BUG_ON(ref_own=
er >=3D BTRFS_MAX_LEVEL);
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0level =3D (int=
)ref_owner;
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* FIXME: get =
real generation */
fs/btrfs/relocation.c int btrfs_reloc_clone_csums(struct inode *inode=
Quoted 1 line
fs/btrfs/relocation.c +0
-0@@ -4143,7 +4145,7 @@ int btrfs_reloc_clone_csums(struct inode *inode=
, u64 file_pos, u64 len)
Quoted 1 line
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0btrfs_add_orde=
red_sum(inode, ordered, sums);
Quoted 23 lines
=C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0btrfs_put_ordered_extent(ordered);
- =C2=A0 =C2=A0 =C2=A0 return 0;
+ =C2=A0 =C2=A0 =C2=A0 return ret;
=C2=A0}=C2=A0void btrfs_reloc_cow_block(struct
btrfs_trans_handle*trans,fs/btrfs/tree-log.c +1
-1@@ -2273,7 +2273,7 @@ fail: =C2=A0 =C2=A0 =C2=A0 =C2=A0} =C2=A0 =C2=A0 =C2=A0 =C2=A0btrfs_end_log_trans(root); - =C2=A0 =C2=A0 =C2=A0 return 0; + =C2=A0 =C2=A0 =C2=A0 return err; =C2=A0}=C2=A0/* see comments for
btrfs_del_dir_entries_in_log*/
Quoted 4 lines
--
Itaru Kitayama <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs=
" in
Quoted 2 lines
the body of a message to [email protected]
More majordomo info at =C2=A0http://vger.kernel.org/majordomo-info.ht=
ml
Quoted 1 line
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Thank you, Zhu. Would you send the patch to Andrew or should I pass it on to him?
Itaru
Quoted 8 lines · On Thu, 9 Sep 2010 23:30:52 +0800 Zhu Yanhai <[email protected]> wrote:
Hi,
That's becausebtrfs_del_dir_entries_in_log()will return the real errno after Andi's
commit, sobtrfs_unlink_inode()has to check the return value more seriously. A patch for this has been sent out.Regards,
Zhu Yanhai
Please feel free to forward it, as I don't know the addr for -mm tree.
-zyh
2010/9/10 Itaru Kitayama <[email protected]>:
Quoted 17 lines
Thank you, Zhu. Would you send the patch to Andrew or should I pass it on to him?
Itaru
Quoted 8 lines · On Thu, 9 Sep 2010 23:30:52 +0800 Zhu Yanhai <[email protected]> wrote:
Hi,
That's becausebtrfs_del_dir_entries_in_log()will return the real errno after Andi's
commit, sobtrfs_unlink_inode()has to check the return value more seriously. A patch for this has been sent out.Regards,
Zhu Yanhai