* Kernel WARNINGs on btrfs-next
@ 2013-02-21 5:35 Mitch Harder
2013-02-21 9:48 ` [PATCH] Btrfs: fix wrong outstanding_extents when doing DIO write Miao Xie
2013-02-21 9:53 ` Kernel WARNINGs on btrfs-next Miao Xie
0 siblings, 2 replies; 5+ messages in thread
From: Mitch Harder @ 2013-02-21 5:35 UTC (permalink / raw)
To: linux-btrfs
I'm getting a series of kernel WARNING messages when testing Josef's
btrfs-next and Chris' next branch running xfstests 083 when mounted
with compress-force=lzo.
I'm not seeing any other indications of problems other than the
WARNINGs on xfstests 083, so this may be some sort of false positive.
Here are the messages against Chris' -next branch (the same warnings
are being generated against josef's branch, except against a 3.7.x
kernel):
[ 553.194991] ------------[ cut here ]------------
[ 553.195002] WARNING: at fs/btrfs/inode.c:7908
btrfs_destroy_inode+0x67/0x25b [btrfs]()
[ 553.195043] Hardware name: OptiPlex 745
[ 553.195046] Modules linked in: ipv6 snd_hda_codec_analog
snd_hda_intel snd_hda_codec snd_hwdep ppdev parport_pc snd_pcm
snd_page_alloc snd_timer snd floppy sr_mod i2c_i801 tg3 ptp iTCO_wdt
pps_core iTCO_vendor_support ehci_pci parport lpc_ich microcode
serio_raw pcspkr ablk_helper cryptd lrw xts gf128mul aes_x86_64
sha256_generic fuse xfs nfs lockd sunrpc reiserfs btrfs zlib_deflate
ext4 jbd2 ext3 jbd ext2 mbcache sl811_hcd hid_generic xhci_hcd
ohci_hcd uhci_hcd ehci_hcd
[ 553.195099] Pid: 4674, comm: rm Not tainted 3.8.0-mason-next+ #1
[ 553.195102] Call Trace:
[ 553.195112] [<ffffffff81030522>] warn_slowpath_common+0x83/0x9b
[ 553.195118] [<ffffffff81030554>] warn_slowpath_null+0x1a/0x1c
[ 553.195135] [<ffffffffa018d69e>] btrfs_destroy_inode+0x67/0x25b [btrfs]
[ 553.195141] [<ffffffff8111759a>] destroy_inode+0x3b/0x54
[ 553.195145] [<ffffffff811176fc>] evict+0x149/0x151
[ 553.195149] [<ffffffff81117f82>] iput+0x12c/0x135
[ 553.195166] [<ffffffffa0187f42>] ? btrfs_unlink_inode+0x38/0x40 [btrfs]
[ 553.195171] [<ffffffff8110de10>] do_unlinkat+0x145/0x1df
[ 553.195177] [<ffffffff81106e9f>] ? sys_newfstatat+0x2a/0x33
[ 553.195191] [<ffffffff8110fce5>] sys_unlinkat+0x29/0x2b
[ 553.195212] [<ffffffff81607746>] system_call_fastpath+0x1a/0x1f
[ 553.195224] ---[ end trace 0adc4db1ad1a6634 ]---
[ 553.195231] ------------[ cut here ]------------
[ 553.195247] WARNING: at fs/btrfs/inode.c:7909
btrfs_destroy_inode+0x7e/0x25b [btrfs]()
[ 553.195249] Hardware name: OptiPlex 745
[ 553.195251] Modules linked in: ipv6 snd_hda_codec_analog
snd_hda_intel snd_hda_codec snd_hwdep ppdev parport_pc snd_pcm
snd_page_alloc snd_timer snd floppy sr_mod i2c_i801 tg3 ptp iTCO_wdt
pps_core iTCO_vendor_support ehci_pci parport lpc_ich microcode
serio_raw pcspkr ablk_helper cryptd lrw xts gf128mul aes_x86_64
sha256_generic fuse xfs nfs lockd sunrpc reiserfs btrfs zlib_deflate
ext4 jbd2 ext3 jbd ext2 mbcache sl811_hcd hid_generic xhci_hcd
ohci_hcd uhci_hcd ehci_hcd
[ 553.195296] Pid: 4674, comm: rm Tainted: G W 3.8.0-mason-next+ #1
[ 553.195298] Call Trace:
[ 553.195304] [<ffffffff81030522>] warn_slowpath_common+0x83/0x9b
[ 553.195308] [<ffffffff81030554>] warn_slowpath_null+0x1a/0x1c
[ 553.195324] [<ffffffffa018d6b5>] btrfs_destroy_inode+0x7e/0x25b [btrfs]
[ 553.195329] [<ffffffff8111759a>] destroy_inode+0x3b/0x54
[ 553.195333] [<ffffffff811176fc>] evict+0x149/0x151
[ 553.195336] [<ffffffff81117f82>] iput+0x12c/0x135
[ 553.195352] [<ffffffffa0187f42>] ? btrfs_unlink_inode+0x38/0x40 [btrfs]
[ 553.195356] [<ffffffff8110de10>] do_unlinkat+0x145/0x1df
[ 553.195360] [<ffffffff81106e9f>] ? sys_newfstatat+0x2a/0x33
[ 553.195364] [<ffffffff8110fce5>] sys_unlinkat+0x29/0x2b
[ 553.195368] [<ffffffff81607746>] system_call_fastpath+0x1a/0x1f
[ 553.195371] ---[ end trace 0adc4db1ad1a6635 ]---
[ 553.195373] ------------[ cut here ]------------
[ 553.195389] WARNING: at fs/btrfs/inode.c:7911
btrfs_destroy_inode+0xae/0x25b [btrfs]()
[ 553.195391] Hardware name: OptiPlex 745
[ 553.195393] Modules linked in: ipv6 snd_hda_codec_analog
snd_hda_intel snd_hda_codec snd_hwdep ppdev parport_pc snd_pcm
snd_page_alloc snd_timer snd floppy sr_mod i2c_i801 tg3 ptp iTCO_wdt
pps_core iTCO_vendor_support ehci_pci parport lpc_ich microcode
serio_raw pcspkr ablk_helper cryptd lrw xts gf128mul aes_x86_64
sha256_generic fuse xfs nfs lockd sunrpc reiserfs btrfs zlib_deflate
ext4 jbd2 ext3 jbd ext2 mbcache sl811_hcd hid_generic xhci_hcd
ohci_hcd uhci_hcd ehci_hcd
[ 553.195437] Pid: 4674, comm: rm Tainted: G W 3.8.0-mason-next+ #1
[ 553.195439] Call Trace:
[ 553.195444] [<ffffffff81030522>] warn_slowpath_common+0x83/0x9b
[ 553.195449] [<ffffffff81030554>] warn_slowpath_null+0x1a/0x1c
[ 553.195463] [<ffffffffa018d6e5>] btrfs_destroy_inode+0xae/0x25b [btrfs]
[ 553.195470] [<ffffffff8111759a>] destroy_inode+0x3b/0x54
[ 553.195474] [<ffffffff811176fc>] evict+0x149/0x151
[ 553.195480] [<ffffffff81117f82>] iput+0x12c/0x135
[ 553.195495] [<ffffffffa0187f42>] ? btrfs_unlink_inode+0x38/0x40 [btrfs]
[ 553.195499] [<ffffffff8110de10>] do_unlinkat+0x145/0x1df
[ 553.195504] [<ffffffff81106e9f>] ? sys_newfstatat+0x2a/0x33
[ 553.195508] [<ffffffff8110fce5>] sys_unlinkat+0x29/0x2b
[ 553.195512] [<ffffffff81607746>] system_call_fastpath+0x1a/0x1f
[ 553.195515] ---[ end trace 0adc4db1ad1a6636 ]---
[ 553.404031] ------------[ cut here ]------------
[ 553.404068] WARNING: at fs/btrfs/extent-tree.c:4510
btrfs_free_block_groups+0x13d/0x27e [btrfs]()
[ 553.404072] Hardware name: OptiPlex 745
[ 553.404076] Modules linked in: ipv6 snd_hda_codec_analog
snd_hda_intel snd_hda_codec snd_hwdep ppdev parport_pc snd_pcm
snd_page_alloc snd_timer snd floppy sr_mod i2c_i801 tg3 ptp iTCO_wdt
pps_core iTCO_vendor_support ehci_pci parport lpc_ich microcode
serio_raw pcspkr ablk_helper cryptd lrw xts gf128mul aes_x86_64
sha256_generic fuse xfs nfs lockd sunrpc reiserfs btrfs zlib_deflate
ext4 jbd2 ext3 jbd ext2 mbcache sl811_hcd hid_generic xhci_hcd
ohci_hcd uhci_hcd ehci_hcd
[ 553.404146] Pid: 4704, comm: umount Tainted: G W
3.8.0-mason-next+ #1
[ 553.404149] Call Trace:
[ 553.404162] [<ffffffff81030522>] warn_slowpath_common+0x83/0x9b
[ 553.404169] [<ffffffff81030554>] warn_slowpath_null+0x1a/0x1c
[ 553.404188] [<ffffffffa017159d>] btrfs_free_block_groups+0x13d/0x27e [btrfs]
[ 553.404211] [<ffffffffa017c71a>] close_ctree+0x200/0x32f [btrfs]
[ 553.404218] [<ffffffff81118323>] ? evict_inodes+0xd7/0xe3
[ 553.404235] [<ffffffffa015a357>] btrfs_put_super+0x19/0x1b [btrfs]
[ 553.404242] [<ffffffff811047e7>] generic_shutdown_super+0x59/0xd1
[ 553.404248] [<ffffffff8111ad7a>] ? free_vfsmnt+0x17/0x3e
[ 553.404255] [<ffffffff811048dd>] kill_anon_super+0x14/0x1f
[ 553.404270] [<ffffffffa015a132>] btrfs_kill_super+0x17/0x89 [btrfs]
[ 553.404276] [<ffffffff81104a44>] deactivate_locked_super+0x37/0x63
[ 553.404282] [<ffffffff8110576a>] deactivate_super+0x3f/0x43
[ 553.404289] [<ffffffff8111b30c>] mntput_no_expire+0x113/0x11b
[ 553.404295] [<ffffffff8111c18b>] sys_umount+0x30a/0x33c
[ 553.404301] [<ffffffff810415d1>] ? __set_current_blocked+0x36/0x4a
[ 553.404310] [<ffffffff81607746>] system_call_fastpath+0x1a/0x1f
[ 553.404314] ---[ end trace 0adc4db1ad1a6637 ]---
[ 553.404317] ------------[ cut here ]------------
[ 553.404336] WARNING: at fs/btrfs/extent-tree.c:4511
btrfs_free_block_groups+0x158/0x27e [btrfs]()
[ 553.404339] Hardware name: OptiPlex 745
[ 553.404342] Modules linked in: ipv6 snd_hda_codec_analog
snd_hda_intel snd_hda_codec snd_hwdep ppdev parport_pc snd_pcm
snd_page_alloc snd_timer snd floppy sr_mod i2c_i801 tg3 ptp iTCO_wdt
pps_core iTCO_vendor_support ehci_pci parport lpc_ich microcode
serio_raw pcspkr ablk_helper cryptd lrw xts gf128mul aes_x86_64
sha256_generic fuse xfs nfs lockd sunrpc reiserfs btrfs zlib_deflate
ext4 jbd2 ext3 jbd ext2 mbcache sl811_hcd hid_generic xhci_hcd
ohci_hcd uhci_hcd ehci_hcd
[ 553.404406] Pid: 4704, comm: umount Tainted: G W
3.8.0-mason-next+ #1
[ 553.404409] Call Trace:
[ 553.404416] [<ffffffff81030522>] warn_slowpath_common+0x83/0x9b
[ 553.404422] [<ffffffff81030554>] warn_slowpath_null+0x1a/0x1c
[ 553.404441] [<ffffffffa01715b8>] btrfs_free_block_groups+0x158/0x27e [btrfs]
[ 553.404463] [<ffffffffa017c71a>] close_ctree+0x200/0x32f [btrfs]
[ 553.404469] [<ffffffff81118323>] ? evict_inodes+0xd7/0xe3
[ 553.404485] [<ffffffffa015a357>] btrfs_put_super+0x19/0x1b [btrfs]
[ 553.404491] [<ffffffff811047e7>] generic_shutdown_super+0x59/0xd1
[ 553.404497] [<ffffffff8111ad7a>] ? free_vfsmnt+0x17/0x3e
[ 553.404504] [<ffffffff811048dd>] kill_anon_super+0x14/0x1f
[ 553.404519] [<ffffffffa015a132>] btrfs_kill_super+0x17/0x89 [btrfs]
[ 553.404525] [<ffffffff81104a44>] deactivate_locked_super+0x37/0x63
[ 553.404531] [<ffffffff8110576a>] deactivate_super+0x3f/0x43
[ 553.404537] [<ffffffff8111b30c>] mntput_no_expire+0x113/0x11b
[ 553.404543] [<ffffffff8111c18b>] sys_umount+0x30a/0x33c
[ 553.404548] [<ffffffff810415d1>] ? __set_current_blocked+0x36/0x4a
[ 553.404555] [<ffffffff81607746>] system_call_fastpath+0x1a/0x1f
[ 553.404559] ---[ end trace 0adc4db1ad1a6638 ]---
Xfstest 083 is showing a successful completion, and I'm not seeing any
errors using btrfsck on the partitions after the test.
For reference, here are the relevant sections of inode.c and extent-tree.c:
inode.c:
7901 void btrfs_destroy_inode(struct inode *inode)
7902 {
7903 struct btrfs_ordered_extent *ordered;
7904 struct btrfs_root *root = BTRFS_I(inode)->root;
7905
7906 WARN_ON(!hlist_empty(&inode->i_dentry));
7907 WARN_ON(inode->i_data.nrpages);
7908 WARN_ON(BTRFS_I(inode)->outstanding_extents);
7909 WARN_ON(BTRFS_I(inode)->reserved_extents);
7910 WARN_ON(BTRFS_I(inode)->delalloc_bytes);
7911 WARN_ON(BTRFS_I(inode)->csum_bytes);
extent-tree.c:
4506 static void release_global_block_rsv(struct btrfs_fs_info *fs_info)
4507 {
4508 block_rsv_release_bytes(fs_info, &fs_info->global_block_rsv, NULL,
4509 (u64)-1);
4510 WARN_ON(fs_info->delalloc_block_rsv.size > 0);
4511 WARN_ON(fs_info->delalloc_block_rsv.reserved > 0);
4512 WARN_ON(fs_info->trans_block_rsv.size > 0);
4513 WARN_ON(fs_info->trans_block_rsv.reserved > 0);
4514 WARN_ON(fs_info->chunk_block_rsv.size > 0);
4515 WARN_ON(fs_info->chunk_block_rsv.reserved > 0);
4516 WARN_ON(fs_info->delayed_block_rsv.size > 0);
4517 WARN_ON(fs_info->delayed_block_rsv.reserved > 0);
4518 }
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Btrfs: fix wrong outstanding_extents when doing DIO write
2013-02-21 5:35 Kernel WARNINGs on btrfs-next Mitch Harder
@ 2013-02-21 9:48 ` Miao Xie
2013-02-21 13:26 ` Chris Mason
2013-02-21 9:53 ` Kernel WARNINGs on btrfs-next Miao Xie
1 sibling, 1 reply; 5+ messages in thread
From: Miao Xie @ 2013-02-21 9:48 UTC (permalink / raw)
To: linux-btrfs; +Cc: Mitch Harder
When running the 083th case of xfstests on the filesystem with
"compress-force=lzo", the following WARNINGs were triggered.
WARNING: at fs/btrfs/inode.c:7908
WARNING: at fs/btrfs/inode.c:7909
WARNING: at fs/btrfs/inode.c:7911
WARNING: at fs/btrfs/extent-tree.c:4510
WARNING: at fs/btrfs/extent-tree.c:4511
This problem was introduced by the patch "Btrfs: fix deadlock due
to unsubmitted". In this patch, there are two bugs which caused
the above problem.
The 1st one is a off-by-one bug, if the DIO write return 0, it is
also a short write, we need release the reserved space for it. But
we didn't do it in that patch. Fix it by change "ret > 0" to
"ret >= 0".
The 2nd one is ->outstanding_extents was increased twice when
a short write happened. As we know, ->outstanding_extents is
a counter to keep track of the number of extent items we may
use duo to delalloc, when we reserve the free space for a
delalloc write, we assume that the write will introduce just
one extent item, so we increase ->outstanding_extents by 1 at
that time. And then we will increase it every time we split the
write, it is done at the beginning of btrfs_get_blocks_direct().
So when a short write happens, we needn't increase
->outstanding_extents again. But this patch done.
In order to fix the 2nd problem, I re-write the logic for
->outstanding_extents operation. We don't increase it at the
beginning of btrfs_get_blocks_direct(), instead, we just
increase it when the split actually happens.
Reported-by: Mitch Harder <mitch.harder@sabayonlinux.org>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
---
fs/btrfs/inode.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index b009fb5..9a1cc04 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6067,12 +6067,9 @@ static int btrfs_get_blocks_direct(struct inode *inode, sector_t iblock,
int unlock_bits = EXTENT_LOCKED;
int ret = 0;
- if (create) {
- spin_lock(&BTRFS_I(inode)->lock);
- BTRFS_I(inode)->outstanding_extents++;
- spin_unlock(&BTRFS_I(inode)->lock);
+ if (create)
unlock_bits |= EXTENT_DELALLOC | EXTENT_DIRTY;
- } else
+ else
len = min_t(u64, len, root->sectorsize);
lockstart = start;
@@ -6214,6 +6211,10 @@ unlock:
if (start + len > i_size_read(inode))
i_size_write(inode, start + len);
+ spin_lock(&BTRFS_I(inode)->lock);
+ BTRFS_I(inode)->outstanding_extents++;
+ spin_unlock(&BTRFS_I(inode)->lock);
+
ret = set_extent_bit(&BTRFS_I(inode)->io_tree, lockstart,
lockstart + len - 1, EXTENT_DELALLOC, NULL,
&cached_state, GFP_NOFS);
@@ -6716,14 +6717,11 @@ static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb,
if (rw & WRITE) {
if (ret < 0 && ret != -EIOCBQUEUED)
btrfs_delalloc_release_space(inode, count);
- else if (ret > 0 && (size_t)ret < count) {
- spin_lock(&BTRFS_I(inode)->lock);
- BTRFS_I(inode)->outstanding_extents++;
- spin_unlock(&BTRFS_I(inode)->lock);
+ else if (ret >= 0 && (size_t)ret < count)
btrfs_delalloc_release_space(inode,
count - (size_t)ret);
- }
- btrfs_delalloc_release_metadata(inode, 0);
+ else
+ btrfs_delalloc_release_metadata(inode, 0);
}
out:
if (wakeup)
--
1.7.11.7
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Kernel WARNINGs on btrfs-next
2013-02-21 5:35 Kernel WARNINGs on btrfs-next Mitch Harder
2013-02-21 9:48 ` [PATCH] Btrfs: fix wrong outstanding_extents when doing DIO write Miao Xie
@ 2013-02-21 9:53 ` Miao Xie
1 sibling, 0 replies; 5+ messages in thread
From: Miao Xie @ 2013-02-21 9:53 UTC (permalink / raw)
To: Mitch Harder; +Cc: linux-btrfs
hi,
On wed, 20 Feb 2013 23:35:36 -0600, Mitch Harder wrote:
> I'm getting a series of kernel WARNING messages when testing Josef's
> btrfs-next and Chris' next branch running xfstests 083 when mounted
> with compress-force=lzo.
>
> I'm not seeing any other indications of problems other than the
> WARNINGs on xfstests 083, so this may be some sort of false positive.
>
> Here are the messages against Chris' -next branch (the same warnings
> are being generated against josef's branch, except against a 3.7.x
> kernel):
I sent a patch to fix this problem as a reply of this mail, could you
test it for me?
Thanks
Miao
>
> [ 553.194991] ------------[ cut here ]------------
> [ 553.195002] WARNING: at fs/btrfs/inode.c:7908
> btrfs_destroy_inode+0x67/0x25b [btrfs]()
> [ 553.195043] Hardware name: OptiPlex 745
> [ 553.195046] Modules linked in: ipv6 snd_hda_codec_analog
> snd_hda_intel snd_hda_codec snd_hwdep ppdev parport_pc snd_pcm
> snd_page_alloc snd_timer snd floppy sr_mod i2c_i801 tg3 ptp iTCO_wdt
> pps_core iTCO_vendor_support ehci_pci parport lpc_ich microcode
> serio_raw pcspkr ablk_helper cryptd lrw xts gf128mul aes_x86_64
> sha256_generic fuse xfs nfs lockd sunrpc reiserfs btrfs zlib_deflate
> ext4 jbd2 ext3 jbd ext2 mbcache sl811_hcd hid_generic xhci_hcd
> ohci_hcd uhci_hcd ehci_hcd
> [ 553.195099] Pid: 4674, comm: rm Not tainted 3.8.0-mason-next+ #1
> [ 553.195102] Call Trace:
> [ 553.195112] [<ffffffff81030522>] warn_slowpath_common+0x83/0x9b
> [ 553.195118] [<ffffffff81030554>] warn_slowpath_null+0x1a/0x1c
> [ 553.195135] [<ffffffffa018d69e>] btrfs_destroy_inode+0x67/0x25b [btrfs]
> [ 553.195141] [<ffffffff8111759a>] destroy_inode+0x3b/0x54
> [ 553.195145] [<ffffffff811176fc>] evict+0x149/0x151
> [ 553.195149] [<ffffffff81117f82>] iput+0x12c/0x135
> [ 553.195166] [<ffffffffa0187f42>] ? btrfs_unlink_inode+0x38/0x40 [btrfs]
> [ 553.195171] [<ffffffff8110de10>] do_unlinkat+0x145/0x1df
> [ 553.195177] [<ffffffff81106e9f>] ? sys_newfstatat+0x2a/0x33
> [ 553.195191] [<ffffffff8110fce5>] sys_unlinkat+0x29/0x2b
> [ 553.195212] [<ffffffff81607746>] system_call_fastpath+0x1a/0x1f
> [ 553.195224] ---[ end trace 0adc4db1ad1a6634 ]---
> [ 553.195231] ------------[ cut here ]------------
> [ 553.195247] WARNING: at fs/btrfs/inode.c:7909
> btrfs_destroy_inode+0x7e/0x25b [btrfs]()
> [ 553.195249] Hardware name: OptiPlex 745
> [ 553.195251] Modules linked in: ipv6 snd_hda_codec_analog
> snd_hda_intel snd_hda_codec snd_hwdep ppdev parport_pc snd_pcm
> snd_page_alloc snd_timer snd floppy sr_mod i2c_i801 tg3 ptp iTCO_wdt
> pps_core iTCO_vendor_support ehci_pci parport lpc_ich microcode
> serio_raw pcspkr ablk_helper cryptd lrw xts gf128mul aes_x86_64
> sha256_generic fuse xfs nfs lockd sunrpc reiserfs btrfs zlib_deflate
> ext4 jbd2 ext3 jbd ext2 mbcache sl811_hcd hid_generic xhci_hcd
> ohci_hcd uhci_hcd ehci_hcd
> [ 553.195296] Pid: 4674, comm: rm Tainted: G W 3.8.0-mason-next+ #1
> [ 553.195298] Call Trace:
> [ 553.195304] [<ffffffff81030522>] warn_slowpath_common+0x83/0x9b
> [ 553.195308] [<ffffffff81030554>] warn_slowpath_null+0x1a/0x1c
> [ 553.195324] [<ffffffffa018d6b5>] btrfs_destroy_inode+0x7e/0x25b [btrfs]
> [ 553.195329] [<ffffffff8111759a>] destroy_inode+0x3b/0x54
> [ 553.195333] [<ffffffff811176fc>] evict+0x149/0x151
> [ 553.195336] [<ffffffff81117f82>] iput+0x12c/0x135
> [ 553.195352] [<ffffffffa0187f42>] ? btrfs_unlink_inode+0x38/0x40 [btrfs]
> [ 553.195356] [<ffffffff8110de10>] do_unlinkat+0x145/0x1df
> [ 553.195360] [<ffffffff81106e9f>] ? sys_newfstatat+0x2a/0x33
> [ 553.195364] [<ffffffff8110fce5>] sys_unlinkat+0x29/0x2b
> [ 553.195368] [<ffffffff81607746>] system_call_fastpath+0x1a/0x1f
> [ 553.195371] ---[ end trace 0adc4db1ad1a6635 ]---
> [ 553.195373] ------------[ cut here ]------------
> [ 553.195389] WARNING: at fs/btrfs/inode.c:7911
> btrfs_destroy_inode+0xae/0x25b [btrfs]()
> [ 553.195391] Hardware name: OptiPlex 745
> [ 553.195393] Modules linked in: ipv6 snd_hda_codec_analog
> snd_hda_intel snd_hda_codec snd_hwdep ppdev parport_pc snd_pcm
> snd_page_alloc snd_timer snd floppy sr_mod i2c_i801 tg3 ptp iTCO_wdt
> pps_core iTCO_vendor_support ehci_pci parport lpc_ich microcode
> serio_raw pcspkr ablk_helper cryptd lrw xts gf128mul aes_x86_64
> sha256_generic fuse xfs nfs lockd sunrpc reiserfs btrfs zlib_deflate
> ext4 jbd2 ext3 jbd ext2 mbcache sl811_hcd hid_generic xhci_hcd
> ohci_hcd uhci_hcd ehci_hcd
> [ 553.195437] Pid: 4674, comm: rm Tainted: G W 3.8.0-mason-next+ #1
> [ 553.195439] Call Trace:
> [ 553.195444] [<ffffffff81030522>] warn_slowpath_common+0x83/0x9b
> [ 553.195449] [<ffffffff81030554>] warn_slowpath_null+0x1a/0x1c
> [ 553.195463] [<ffffffffa018d6e5>] btrfs_destroy_inode+0xae/0x25b [btrfs]
> [ 553.195470] [<ffffffff8111759a>] destroy_inode+0x3b/0x54
> [ 553.195474] [<ffffffff811176fc>] evict+0x149/0x151
> [ 553.195480] [<ffffffff81117f82>] iput+0x12c/0x135
> [ 553.195495] [<ffffffffa0187f42>] ? btrfs_unlink_inode+0x38/0x40 [btrfs]
> [ 553.195499] [<ffffffff8110de10>] do_unlinkat+0x145/0x1df
> [ 553.195504] [<ffffffff81106e9f>] ? sys_newfstatat+0x2a/0x33
> [ 553.195508] [<ffffffff8110fce5>] sys_unlinkat+0x29/0x2b
> [ 553.195512] [<ffffffff81607746>] system_call_fastpath+0x1a/0x1f
> [ 553.195515] ---[ end trace 0adc4db1ad1a6636 ]---
> [ 553.404031] ------------[ cut here ]------------
> [ 553.404068] WARNING: at fs/btrfs/extent-tree.c:4510
> btrfs_free_block_groups+0x13d/0x27e [btrfs]()
> [ 553.404072] Hardware name: OptiPlex 745
> [ 553.404076] Modules linked in: ipv6 snd_hda_codec_analog
> snd_hda_intel snd_hda_codec snd_hwdep ppdev parport_pc snd_pcm
> snd_page_alloc snd_timer snd floppy sr_mod i2c_i801 tg3 ptp iTCO_wdt
> pps_core iTCO_vendor_support ehci_pci parport lpc_ich microcode
> serio_raw pcspkr ablk_helper cryptd lrw xts gf128mul aes_x86_64
> sha256_generic fuse xfs nfs lockd sunrpc reiserfs btrfs zlib_deflate
> ext4 jbd2 ext3 jbd ext2 mbcache sl811_hcd hid_generic xhci_hcd
> ohci_hcd uhci_hcd ehci_hcd
> [ 553.404146] Pid: 4704, comm: umount Tainted: G W
> 3.8.0-mason-next+ #1
> [ 553.404149] Call Trace:
> [ 553.404162] [<ffffffff81030522>] warn_slowpath_common+0x83/0x9b
> [ 553.404169] [<ffffffff81030554>] warn_slowpath_null+0x1a/0x1c
> [ 553.404188] [<ffffffffa017159d>] btrfs_free_block_groups+0x13d/0x27e [btrfs]
> [ 553.404211] [<ffffffffa017c71a>] close_ctree+0x200/0x32f [btrfs]
> [ 553.404218] [<ffffffff81118323>] ? evict_inodes+0xd7/0xe3
> [ 553.404235] [<ffffffffa015a357>] btrfs_put_super+0x19/0x1b [btrfs]
> [ 553.404242] [<ffffffff811047e7>] generic_shutdown_super+0x59/0xd1
> [ 553.404248] [<ffffffff8111ad7a>] ? free_vfsmnt+0x17/0x3e
> [ 553.404255] [<ffffffff811048dd>] kill_anon_super+0x14/0x1f
> [ 553.404270] [<ffffffffa015a132>] btrfs_kill_super+0x17/0x89 [btrfs]
> [ 553.404276] [<ffffffff81104a44>] deactivate_locked_super+0x37/0x63
> [ 553.404282] [<ffffffff8110576a>] deactivate_super+0x3f/0x43
> [ 553.404289] [<ffffffff8111b30c>] mntput_no_expire+0x113/0x11b
> [ 553.404295] [<ffffffff8111c18b>] sys_umount+0x30a/0x33c
> [ 553.404301] [<ffffffff810415d1>] ? __set_current_blocked+0x36/0x4a
> [ 553.404310] [<ffffffff81607746>] system_call_fastpath+0x1a/0x1f
> [ 553.404314] ---[ end trace 0adc4db1ad1a6637 ]---
> [ 553.404317] ------------[ cut here ]------------
> [ 553.404336] WARNING: at fs/btrfs/extent-tree.c:4511
> btrfs_free_block_groups+0x158/0x27e [btrfs]()
> [ 553.404339] Hardware name: OptiPlex 745
> [ 553.404342] Modules linked in: ipv6 snd_hda_codec_analog
> snd_hda_intel snd_hda_codec snd_hwdep ppdev parport_pc snd_pcm
> snd_page_alloc snd_timer snd floppy sr_mod i2c_i801 tg3 ptp iTCO_wdt
> pps_core iTCO_vendor_support ehci_pci parport lpc_ich microcode
> serio_raw pcspkr ablk_helper cryptd lrw xts gf128mul aes_x86_64
> sha256_generic fuse xfs nfs lockd sunrpc reiserfs btrfs zlib_deflate
> ext4 jbd2 ext3 jbd ext2 mbcache sl811_hcd hid_generic xhci_hcd
> ohci_hcd uhci_hcd ehci_hcd
> [ 553.404406] Pid: 4704, comm: umount Tainted: G W
> 3.8.0-mason-next+ #1
> [ 553.404409] Call Trace:
> [ 553.404416] [<ffffffff81030522>] warn_slowpath_common+0x83/0x9b
> [ 553.404422] [<ffffffff81030554>] warn_slowpath_null+0x1a/0x1c
> [ 553.404441] [<ffffffffa01715b8>] btrfs_free_block_groups+0x158/0x27e [btrfs]
> [ 553.404463] [<ffffffffa017c71a>] close_ctree+0x200/0x32f [btrfs]
> [ 553.404469] [<ffffffff81118323>] ? evict_inodes+0xd7/0xe3
> [ 553.404485] [<ffffffffa015a357>] btrfs_put_super+0x19/0x1b [btrfs]
> [ 553.404491] [<ffffffff811047e7>] generic_shutdown_super+0x59/0xd1
> [ 553.404497] [<ffffffff8111ad7a>] ? free_vfsmnt+0x17/0x3e
> [ 553.404504] [<ffffffff811048dd>] kill_anon_super+0x14/0x1f
> [ 553.404519] [<ffffffffa015a132>] btrfs_kill_super+0x17/0x89 [btrfs]
> [ 553.404525] [<ffffffff81104a44>] deactivate_locked_super+0x37/0x63
> [ 553.404531] [<ffffffff8110576a>] deactivate_super+0x3f/0x43
> [ 553.404537] [<ffffffff8111b30c>] mntput_no_expire+0x113/0x11b
> [ 553.404543] [<ffffffff8111c18b>] sys_umount+0x30a/0x33c
> [ 553.404548] [<ffffffff810415d1>] ? __set_current_blocked+0x36/0x4a
> [ 553.404555] [<ffffffff81607746>] system_call_fastpath+0x1a/0x1f
> [ 553.404559] ---[ end trace 0adc4db1ad1a6638 ]---
>
> Xfstest 083 is showing a successful completion, and I'm not seeing any
> errors using btrfsck on the partitions after the test.
>
> For reference, here are the relevant sections of inode.c and extent-tree.c:
>
> inode.c:
>
> 7901 void btrfs_destroy_inode(struct inode *inode)
> 7902 {
> 7903 struct btrfs_ordered_extent *ordered;
> 7904 struct btrfs_root *root = BTRFS_I(inode)->root;
> 7905
> 7906 WARN_ON(!hlist_empty(&inode->i_dentry));
> 7907 WARN_ON(inode->i_data.nrpages);
> 7908 WARN_ON(BTRFS_I(inode)->outstanding_extents);
> 7909 WARN_ON(BTRFS_I(inode)->reserved_extents);
> 7910 WARN_ON(BTRFS_I(inode)->delalloc_bytes);
> 7911 WARN_ON(BTRFS_I(inode)->csum_bytes);
>
> extent-tree.c:
>
> 4506 static void release_global_block_rsv(struct btrfs_fs_info *fs_info)
> 4507 {
> 4508 block_rsv_release_bytes(fs_info, &fs_info->global_block_rsv, NULL,
> 4509 (u64)-1);
> 4510 WARN_ON(fs_info->delalloc_block_rsv.size > 0);
> 4511 WARN_ON(fs_info->delalloc_block_rsv.reserved > 0);
> 4512 WARN_ON(fs_info->trans_block_rsv.size > 0);
> 4513 WARN_ON(fs_info->trans_block_rsv.reserved > 0);
> 4514 WARN_ON(fs_info->chunk_block_rsv.size > 0);
> 4515 WARN_ON(fs_info->chunk_block_rsv.reserved > 0);
> 4516 WARN_ON(fs_info->delayed_block_rsv.size > 0);
> 4517 WARN_ON(fs_info->delayed_block_rsv.reserved > 0);
> 4518 }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Btrfs: fix wrong outstanding_extents when doing DIO write
2013-02-21 9:48 ` [PATCH] Btrfs: fix wrong outstanding_extents when doing DIO write Miao Xie
@ 2013-02-21 13:26 ` Chris Mason
2013-02-21 14:19 ` Mitch Harder
0 siblings, 1 reply; 5+ messages in thread
From: Chris Mason @ 2013-02-21 13:26 UTC (permalink / raw)
To: Miao Xie; +Cc: linux-btrfs, Mitch Harder
On Thu, Feb 21, 2013 at 02:48:22AM -0700, Miao Xie wrote:
> When running the 083th case of xfstests on the filesystem with
> "compress-force=lzo", the following WARNINGs were triggered.
> WARNING: at fs/btrfs/inode.c:7908
> WARNING: at fs/btrfs/inode.c:7909
> WARNING: at fs/btrfs/inode.c:7911
> WARNING: at fs/btrfs/extent-tree.c:4510
> WARNING: at fs/btrfs/extent-tree.c:4511
>
> This problem was introduced by the patch "Btrfs: fix deadlock due
> to unsubmitted". In this patch, there are two bugs which caused
> the above problem.
I saw this as well on test 132 last night. My plan was to track it down
this morning, so discovering it already fixed while I slept was
wonderful.
Thanks Miao. Josef I've got this one and Miao's defrag unmount patch
queued up.
-chris
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Btrfs: fix wrong outstanding_extents when doing DIO write
2013-02-21 13:26 ` Chris Mason
@ 2013-02-21 14:19 ` Mitch Harder
0 siblings, 0 replies; 5+ messages in thread
From: Mitch Harder @ 2013-02-21 14:19 UTC (permalink / raw)
To: Chris Mason, Miao Xie, linux-btrfs, Mitch Harder
On Thu, Feb 21, 2013 at 7:26 AM, Chris Mason <chris.mason@fusionio.com> wrote:
> On Thu, Feb 21, 2013 at 02:48:22AM -0700, Miao Xie wrote:
>> When running the 083th case of xfstests on the filesystem with
>> "compress-force=lzo", the following WARNINGs were triggered.
>> WARNING: at fs/btrfs/inode.c:7908
>> WARNING: at fs/btrfs/inode.c:7909
>> WARNING: at fs/btrfs/inode.c:7911
>> WARNING: at fs/btrfs/extent-tree.c:4510
>> WARNING: at fs/btrfs/extent-tree.c:4511
>>
>> This problem was introduced by the patch "Btrfs: fix deadlock due
>> to unsubmitted". In this patch, there are two bugs which caused
>> the above problem.
>
> I saw this as well on test 132 last night. My plan was to track it down
> this morning, so discovering it already fixed while I slept was
> wonderful.
>
> Thanks Miao. Josef I've got this one and Miao's defrag unmount patch
> queued up.
>
Thanks, I've also tested this patch, and it cleared the error I was receiving.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-02-21 14:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-21 5:35 Kernel WARNINGs on btrfs-next Mitch Harder
2013-02-21 9:48 ` [PATCH] Btrfs: fix wrong outstanding_extents when doing DIO write Miao Xie
2013-02-21 13:26 ` Chris Mason
2013-02-21 14:19 ` Mitch Harder
2013-02-21 9:53 ` Kernel WARNINGs on btrfs-next Miao Xie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox