linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
To: Jeff Mahoney <jeffm@suse.com>, Josef Bacik <jbacik@fb.com>,
	Ronan Arraes Jardim Chagas <ronisbr@gmail.com>,
	Qu Wenruo <quwenruo@cn.fujitsu.com>,
	Chris Murphy <lists@colorremedies.com>,
	"Austin S. Hemmelgarn" <ahferroin7@gmail.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: BTRFS constantly reports "No space left on device" even with a huge unallocated space
Date: Mon, 19 Sep 2016 10:38:11 +0800	[thread overview]
Message-ID: <57DF4F93.2090708@cn.fujitsu.com> (raw)
In-Reply-To: <9221d4d9-d114-4ffb-d2f8-6dc2d1cdb79c@suse.com>

hi,

On 09/14/2016 10:25 PM, Jeff Mahoney wrote:
> On 9/13/16 10:24 PM, Josef Bacik wrote:
>> On 09/08/2016 07:02 PM, Jeff Mahoney wrote:
>>> On 9/8/16 2:49 PM, Jeff Mahoney wrote:
>>>> On 9/8/16 2:24 PM, Ronan Arraes Jardim Chagas wrote:
>>>>> Hi all!
>>>>>
>>>>> Em Seg, 2016-09-05 às 16:49 +0800, Qu Wenruo escreveu:
>>>>>> Just like what Wang has mentioned, would you please paste all the
>>>>>> output
>>>>>> of the contents of /sys/fs/btrfs/<your fs uuid>/allocation?
>>>>>>
>>>>>> It's recommended to use "grep . -IR <path>" to get all the data as
>>>>>> it
>>>>>> will show the file name.
>>>>> So, one more time, I see the problem. This time I was just using
>>>>> Firefox and I cannot recover using `btrfs balance`. I think that, one
>>>>> more time, I will need to reboot this machine. This problem is really
>>>>> causing me a lot of troubles :(
>>>> I have a hunch the list is about to be flooded with similar reports if
>>>> we don't find this one before 4.8.
>>>>
>>>> commit d555b6c380c644af63dbdaa7cc14bba041a4e4dd
>>>> Author: Josef Bacik <jbacik@fb.com>
>>>> Date:   Fri Mar 25 13:25:51 2016 -0400
>>>>
>>>>      Btrfs: warn_on for unaccounted spaces
>>>>
>>>> This commit isn't the source of the bug, but it's making it a lot more
>>>> noisy.  I spent a few hours last night trying to track down why xfstests
>>>> was throwing these warnings and I was able to reproduce them at least as
>>>> far back as 4.4-vanilla with -oenospc_debug enabled.
>>>>
>>>> Speaking of which, can you turn on mounting with -oenospc_debug if you
>>>> haven't already?
>>>>
>>>> In my case, space_info->bytes_may_use was getting accounted incorrectly.
>>>>
>>>> I am able to reproduce that even with the following commit:
>>>> commit 18513091af9483ba84328d42092bd4d42a3c958f
>>>> Author: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
>>>> Date:   Mon Jul 25 15:51:40 2016 +0800
>>>>
>>>>      btrfs: update btrfs_space_info's bytes_may_use timely
>>> And the btrfs_free_reserved_data_space_noquota WARN_ON I was seeing is
>>> fixed by:
>>>
>>> commit ed7a6948394305b810d0c6203268648715e5006f
>>> Author: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
>>> Date:   Fri Aug 26 11:33:14 2016 +0800
>>>
>>>      btrfs: do not decrease bytes_may_use when replaying extents
>>>
>>> ... which shouldn't change anything for your issue, unfortunately.
>>>
>>> I still see these:
>>> WARNING: CPU: 2 PID: 8166 at ../fs/btrfs/extent-tree.c:9582
>>> btrfs_free_block_groups+0x2a8/0x400 [btrfs]()
>>> Modules linked in: loop dm_flakey af_packet iscsi_ibft iscsi_boot_sysfs
>>> msr ext4 crc16 mbcache jbd2 ipmi_ssif dm_mod igb ptp pps_core
>>> acpi_cpufreq tpm_infineon kvm_amd ipmi_si kvm dca pcspkr ipmi_msghandler
>>> 8250_fintek sp5100_tco fjes irqbypass i2c_piix4 shpchp processor button
>>> amd64_edac_mod edac_mce_amd edac_core k10temp btrfs xor raid6_pq sd_mod
>>> ata_generic mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect
>>> ohci_pci sysimgblt ehci_pci serio_raw ohci_hcd fb_sys_fops pata_atiixp
>>> ehci_hcd ttm ahci libahci drm usbcore libata usb_common sg scsi_mod
>>> autofs4
>>> CPU: 2 PID: 8166 Comm: umount Tainted: G        W
>>> 4.4.19-11.g81405db-vanilla #1
>>> Hardware name: HP ProLiant DL165 G7, BIOS O37 10/17/2012
>>>   0000000000000000 ffff880230317d10 ffffffff813170ec 0000000000000000
>>>   ffffffffa0472528 ffff880230317d48 ffffffff8107d816 0000000000000000
>>>   ffff88009ab03600 ffff8800ba106288 ffff8800ab75a000 ffff8800ba106200
>>> Call Trace:
>>>   [<ffffffff813170ec>] dump_stack+0x63/0x87
>>>   [<ffffffff8107d816>] warn_slowpath_common+0x86/0xc0
>>>   [<ffffffff8107d90a>] warn_slowpath_null+0x1a/0x20
>>>   [<ffffffffa03de3a8>] btrfs_free_block_groups+0x2a8/0x400 [btrfs]
>>>   [<ffffffffa03ef24b>] close_ctree+0x15b/0x330 [btrfs]
>>>   [<ffffffffa03bfeb9>] btrfs_put_super+0x19/0x20 [btrfs]
>>>   [<ffffffff811fe5bf>] generic_shutdown_super+0x6f/0x100
>>>   [<ffffffff811fe662>] kill_anon_super+0x12/0x20
>>>   [<ffffffffa03c4fa8>] btrfs_kill_super+0x18/0x120 [btrfs]
>>>   [<ffffffff811fe003>] deactivate_locked_super+0x43/0x70
>>>   [<ffffffff811fe076>] deactivate_super+0x46/0x60
>>>   [<ffffffff81219dcf>] cleanup_mnt+0x3f/0x80
>>>   [<ffffffff81219e62>] __cleanup_mnt+0x12/0x20
>>>   [<ffffffff81099fb6>] task_work_run+0x86/0xb0
>>>   [<ffffffff81078806>] exit_to_usermode_loop+0x73/0xa2
>>>   [<ffffffff81003b2d>] syscall_return_slowpath+0x8d/0xa0
>>>   [<ffffffff815f928c>] int_ret_from_sys_call+0x25/0x8f
>>> ---[ end trace 09a0cc2892b6305c ]---
>>> BTRFS: space_info 1 has 7946240 free, is not full
>>> BTRFS: space_info total=8388608, used=442368, pinned=0, reserved=0,
>>> may_use=4096, readonly=0
>>>
>>> ... where the value of may_use varies.
>>>
>> What test are you seeing this with?  Thanks,
> btrfs/022 hits it every time for me.
btrfs/022 is not related to this enospc error.
Qu wenruo's patch “ btrfs: Fix leaking bytes_may_use after hitting 
EDQUOTA” has
fixed this warning, please check his patch for detailed commit message.

Regards,
Xiaoguang Wang
>
> -Jeff
>




  reply	other threads:[~2016-09-19  2:43 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 17:36 BTRFS constantly reports "No space left on device" even with a huge unallocated space Ronan Arraes Jardim Chagas
2016-08-12 18:02 ` Chris Murphy
2016-08-12 19:00   ` Ronan Arraes Jardim Chagas
2016-08-12 19:37     ` Chris Murphy
2016-08-12 20:34       ` Chris Murphy
     [not found]         ` <CAKdnfRJeOXHmrumDkfxLTf-nU=KwZ0f7ybET-3o7kwwJDOZ2aw@mail.gmail.com>
2016-08-15 23:24           ` Chris Murphy
2016-08-16 17:49             ` Ronan Arraes Jardim Chagas
2016-08-22 19:11             ` Ronan Arraes Jardim Chagas
2016-08-22 20:39             ` Ronan Arraes Jardim Chagas
2016-08-22 20:49               ` Chris Murphy
2016-08-22 21:04                 ` Ronan Arraes Jardim Chagas
2016-08-24  0:40                   ` Jeff Mahoney
2016-08-25 15:58             ` Lutz Vieweg
2016-08-25 23:56               ` Chris Murphy
2016-08-26  5:59                 ` Marc Haber
2016-08-29 12:12 ` Wang Xiaoguang
2016-08-29 13:20   ` Ronan Arraes Jardim Chagas
2016-08-29 15:52   ` Ronan Arraes Jardim Chagas
2016-08-29 22:25     ` Jeff Mahoney
2016-08-30  2:12     ` Wang Xiaoguang
2016-08-30 12:50       ` Ronan Arraes Jardim Chagas
2016-08-30 16:44         ` Chris Murphy
2016-08-30 16:57           ` Ronan Arraes Jardim Chagas
2016-08-31 20:49           ` Ronan Arraes Jardim Chagas
2016-08-31 21:44             ` Chris Murphy
2016-08-31 21:48               ` Chris Murphy
2016-08-31 22:47                 ` Jeff Mahoney
2016-08-31 22:58                   ` Chris Murphy
2016-08-31 23:03                     ` Jeff Mahoney
2016-08-31 23:09                       ` Chris Murphy
2016-09-01 12:57                         ` Ronan Arraes Jardim Chagas
2016-09-01 13:21                           ` Austin S. Hemmelgarn
2016-09-01 16:34                             ` Ronan Arraes Jardim Chagas
2016-09-01 17:04                               ` Austin S. Hemmelgarn
2016-09-01 17:12                                 ` Jeff Mahoney
2016-09-01 17:39                                   ` Ronan Arraes Jardim Chagas
2016-09-01 17:43                                     ` Jeff Mahoney
2016-09-01 17:58                                       ` Ronan Arraes Jardim Chagas
2016-09-01 17:45                                   ` Chris Murphy
2016-09-01 18:47                                   ` Austin S. Hemmelgarn
2016-09-02  0:12                                     ` Chris Murphy
2016-09-02 14:26                                       ` Jeff Mahoney
2016-09-02 14:43                                         ` Ronan Arraes Jardim Chagas
2016-09-02 14:48                                           ` Jeff Mahoney
2016-09-02 15:20                                             ` Ronan Arraes Jardim Chagas
2016-09-02 15:26                                               ` Jeff Mahoney
2016-09-02 19:25                                                 ` Ronan Arraes Jardim Chagas
2016-09-05  8:49                                                   ` Qu Wenruo
2016-09-08 18:24                                                     ` Ronan Arraes Jardim Chagas
2016-09-08 18:49                                                       ` Jeff Mahoney
2016-09-08 23:02                                                         ` Jeff Mahoney
2016-09-13 20:24                                                           ` Josef Bacik
2016-09-14 14:25                                                             ` Jeff Mahoney
2016-09-19  2:38                                                               ` Wang Xiaoguang [this message]
2016-09-22 13:40                                                                 ` Jeff Mahoney
     [not found]                                                               ` <57DF4E44.2040506@cn.fujitsu.com>
2016-09-22 13:20                                                                 ` Ronan Arraes Jardim Chagas
2016-09-22 13:41                                                                   ` Austin S. Hemmelgarn
2016-09-22 14:03                                                                     ` Ronan Arraes Jardim Chagas
2016-09-22 14:39                                                                       ` Josef Bacik
2016-09-22 17:06                                                                         ` Ronan Arraes Jardim Chagas
2016-09-22 17:49                                                                           ` Josef Bacik
2016-09-22 17:54                                                                             ` Ronan Arraes Jardim Chagas
2016-09-23 15:20                                                                             ` [SOLVED] " Ronan Arraes Jardim Chagas
2016-09-02 19:56                                                 ` Ronan Arraes Jardim Chagas
2016-09-02 21:34                                                   ` Chris Murphy
2016-09-02 22:13                                                     ` Ronan Arraes Jardim Chagas
2016-09-02 22:39                                                       ` Chris Murphy
2016-09-03  2:47                                                         ` Ronan Arraes Jardim Chagas
2016-09-03  3:41                                                           ` Chris Murphy
2016-09-03  3:47                                                             ` Ronan Arraes Jardim Chagas
2016-09-03  4:14                                                               ` Chris Murphy
2016-09-01 17:07                             ` Chris Murphy
2016-09-02  0:37               ` Qu Wenruo
2016-09-02 14:09             ` Jeff Mahoney
2016-09-14 20:15   ` Ronan Arraes Jardim Chagas
2016-09-14 22:25     ` Chris Murphy
2016-09-15  0:56       ` Ronan Arraes Jardim Chagas
2016-09-13  3:17 ` Wang Xiaoguang
2016-09-13 12:54   ` Ronan Arraes Jardim Chagas
2016-09-13 20:49   ` Ronan Arraes Jardim Chagas
2016-09-13 21:01     ` Josef Bacik
2016-09-14 14:40       ` Ronan Arraes Jardim Chagas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57DF4F93.2090708@cn.fujitsu.com \
    --to=wangxg.fnst@cn.fujitsu.com \
    --cc=ahferroin7@gmail.com \
    --cc=jbacik@fb.com \
    --cc=jeffm@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=quwenruo@cn.fujitsu.com \
    --cc=ronisbr@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).