From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:39956 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751607AbbAGG6p (ORCPT ); Wed, 7 Jan 2015 01:58:45 -0500 Received: from kw-mxoi2.gw.nic.fujitsu.com (unknown [10.0.237.143]) by fgwmail6.fujitsu.co.jp (Postfix) with ESMTP id C90D13EE0BB for ; Wed, 7 Jan 2015 15:58:43 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (s3.gw.fujitsu.co.jp [10.0.50.93]) by kw-mxoi2.gw.nic.fujitsu.com (Postfix) with ESMTP id DD50BAC063D for ; Wed, 7 Jan 2015 15:58:42 +0900 (JST) Received: from g01jpfmpwyt01.exch.g01.fujitsu.local (g01jpfmpwyt01.exch.g01.fujitsu.local [10.128.193.38]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id 85FB8E08002 for ; Wed, 7 Jan 2015 15:58:42 +0900 (JST) Message-ID: <54ACD917.2050905@jp.fujitsu.com> Date: Wed, 7 Jan 2015 15:58:31 +0900 From: Satoru Takeuchi MIME-Version: 1.0 To: Tomasz Chmielewski , linux-btrfs Subject: Re: kernel BUG at /home/apw/COD/linux/fs/btrfs/inode.c:3123! References: In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Sender: linux-btrfs-owner@vger.kernel.org List-ID: Hi Tomasz, On 2014/12/20 8:28, Tomasz Chmielewski wrote: > Get this BUG with 3.18.1 (pasted at the bottom of the email). > Below all actions from creating the fs to BUG. I did not attempt to reproduce. I tried to reproduce this problem and have some questions. > > # mkfs.btrfs /dev/vdb > Btrfs v3.17.3 > See http://btrfs.wiki.kernel.org for more information. > > Turning ON incompat feature 'extref': increased hardlink limit per file to 65536 > fs created label (null) on /dev/vdb > nodesize 16384 leafsize 16384 sectorsize 4096 size 256.00GiB > > # mount -o noatime /dev/vdb /mnt/test/ > # cd /mnt/test > # btrfs sub cre subvolume > Create subvolume './subvolume' > # dd if=/dev/urandom of=bigfile.img bs=64k Does it really this command? I consider it will fill up whole /dev/vdb. And is it not subvolume/bigfile.img but bigfile.img? > ^C91758+0 records in > 91757+0 records out > 6013386752 bytes (6.0 GB) copied, 374.777 s, 16.0 MB/s > # btrfs sub list /mnt/test/ > ID 257 gen 16 top level 5 path subvolume > > # btrfs quota enable /mnt/test > > # btrfs qgroup show /mnt/test > qgroupid rfer excl > -------- ---- ---- > 0/5 16384 16384 > 0/257 6013403136 6013403136 > > # dd if=/dev/urandom of=bigfile2.img bs=64k > ^C47721+0 records in > 47720+0 records out > 3127377920 bytes (3.1 GB) copied, 194.641 s, 16.1 MB/s If bigfile.img is just under /mnt/test, I can't understand why this command succeeded to write more 3 GiB. > > # btrfs qgroup show /mnt/test > qgroupid rfer excl > -------- ---- ---- > 0/5 16384 16384 > 0/257 8704049152 8704049152 > root@srv2:/mnt/test/subvolume# sync > root@srv2:/mnt/test/subvolume# btrfs qgroup show /mnt/test > qgroupid rfer excl > -------- ---- ---- > 0/5 16384 16384 > 0/257 9140781056 9140781056 > > # dd if=/dev/urandom of=bigfile3.img bs=64k > ^C3617580+0 records in > 3617579+0 records out > 237081657344 bytes (237 GB) copied, 14796 s, 16.0 MB/s It's too. Thanks, Satoru > > # df -h > Filesystem Size Used Avail Use% Mounted on > (...) > /dev/vdb 256G 230G 25G 91% /mnt/test > > > # btrfs qgroup show /mnt/test > qgroupid rfer excl > -------- ---- ---- > 0/5 16384 16384 > 0/257 245960245248 245960245248 > > # ls -l > total 240451584 > -rw-r--r-- 1 root root 3127377920 Dec 19 20:06 bigfile2.img > -rw-r--r-- 1 root root 237081657344 Dec 20 00:15 bigfile3.img > -rw-r--r-- 1 root root 6013386752 Dec 19 20:02 bigfile.img > > # rm bigfile3.img > > # sync > > # dmesg > (...) > [ 95.055420] BTRFS: device fsid 97f98279-21e7-4822-89be-3aed9dc05f2c devid 1 transid 3 /dev/vdb > [ 118.446509] BTRFS info (device vdb): disk space caching is enabled > [ 118.446518] BTRFS: flagging fs with big metadata feature > [ 118.452176] BTRFS: creating UUID tree > [ 575.189412] BTRFS info (device vdb): qgroup scan completed > [15948.234826] ------------[ cut here ]------------ > [15948.234883] kernel BUG at /home/apw/COD/linux/fs/btrfs/inode.c:3123! > [15948.234906] invalid opcode: 0000 [#1] SMP > [15948.234925] Modules linked in: nf_log_ipv6 ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_log_ipv4 nf_log_common xt_LOG ipt_REJECT nf_reject_ipv4 xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack iptable_filter ip_tables x_tables dm_crypt btrfs xor crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel ppdev aes_x86_64 lrw raid6_pq gf128mul glue_helper ablk_helper cryptd serio_raw mac_hid pvpanic 8250_fintek parport_pc i2c_piix4 lp parport psmouse qxl ttm floppy drm_kms_helper drm > [15948.235172] CPU: 0 PID: 3274 Comm: btrfs-cleaner Not tainted 3.18.1-031801-generic #201412170637 > [15948.235193] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org 04/01/2014 > [15948.235222] task: ffff880036708a00 ti: ffff88007b97c000 task.ti: ffff88007b97c000 > [15948.235240] RIP: 0010:[] [] btrfs_orphan_add+0x1a9/0x1c0 [btrfs] > [15948.235305] RSP: 0018:ffff88007b97fc98 EFLAGS: 00010286 > [15948.235318] RAX: 00000000ffffffe4 RBX: ffff88007b80a800 RCX: 0000000000000000 > [15948.235333] RDX: 000000000000219e RSI: 0000000000040000 RDI: ffff880079418138 > [15948.235349] RBP: ffff88007b97fcd8 R08: ffff88007fc1cae0 R09: ffff88007ad272d0 > [15948.235366] R10: 0000000000000000 R11: 0000000000000010 R12: ffff88007a2d9500 > [15948.235381] R13: ffff8800027d60e0 R14: ffff88007b80ac58 R15: 0000000000000001 > [15948.235401] FS: 0000000000000000(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000 > [15948.235418] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [15948.235432] CR2: 00007f0489ff0000 CR3: 000000007a5e0000 CR4: 00000000001407f0 > [15948.235464] Stack: > [15948.235473] ffff88007b97fcd8 ffffffffc0497acf ffff88007b809800 ffff88003c207400 > [15948.235498] ffff88007b809800 ffff88007ad272d0 ffff88007a2d9500 0000000000000001 > [15948.235521] ffff88007b97fd58 ffffffffc04412e0 ffff880079418000 00000004c0427fea > [15948.235551] Call Trace: > [15948.235601] [] ? lookup_free_space_inode+0x4f/0x100 [btrfs] > [15948.235642] [] btrfs_remove_block_group+0x140/0x490 [btrfs] > [15948.235693] [] btrfs_remove_chunk+0x245/0x380 [btrfs] > [15948.235731] [] btrfs_delete_unused_bgs+0x236/0x270 [btrfs] > [15948.235771] [] cleaner_kthread+0x12c/0x190 [btrfs] > [15948.235806] [] ? btrfs_destroy_all_delalloc_inodes+0x120/0x120 [btrfs] > [15948.235844] [] kthread+0xc9/0xe0 > [15948.235872] [] ? flush_kthread_worker+0x90/0x90 > [15948.235900] [] ret_from_fork+0x7c/0xb0 > [15948.235919] [] ? flush_kthread_worker+0x90/0x90 > [15948.235933] Code: e8 7d a1 fc ff 8b 45 c8 e9 6d ff ff ff 0f 1f 44 00 00 f0 41 80 65 80 fd 4c 89 ef 89 45 c8 e8 cf 20 fe ff 8b 45 c8 e9 48 ff ff ff <0f> 0b 4c 89 f7 45 31 f6 e8 8a a2 35 c1 e9 f9 fe ff ff 0f 1f 44 > [15948.236017] RIP [] btrfs_orphan_add+0x1a9/0x1c0 [btrfs] > [15948.236017] RSP > [15948.761942] ---[ end trace 0ccd21c265dce56b ]--- > > # ls > bigfile2.img bigfile.img > > # touch 1 > (...never returned...) >