From: Gabriel C <nix.or.die@gmail.com>
To: Chris Mason <clm@fb.com>,
Chandan Rajendra <chandan@linux.vnet.ibm.com>,
linux-btrfs@vger.kernel.org, quwenruo@cn.fujitsu.com
Subject: Re: A lot warnings in dmesg while running thunderbird
Date: Wed, 20 Jul 2016 19:50:54 +0200 [thread overview]
Message-ID: <2ce1eb99-2e9f-f9cb-7601-6e67301979cd@gmail.com> (raw)
In-Reply-To: <5f1dc52b-11cb-8977-3410-e71e0b2d0c00@fb.com>
On 20.07.2016 15:50, Chris Mason wrote:
>
>
> On 07/19/2016 08:11 PM, Gabriel C wrote:
>>
>>
>> On 19.07.2016 13:05, Chris Mason wrote:
>>> On Mon, Jul 11, 2016 at 11:28:01AM +0530, Chandan Rajendra wrote:
>>>> Hi Chris,
>>>>
>>>> I am able to reproduce the issue with the 'short-write' program. But before
>>>> the call trace associated with btrfs_destroy_inode(), I see the following call
>>>> trace ...
>>>>
>>>> ------------[ cut here ]------------
>>>> WARNING: CPU: 2 PID: 2311 at /home/chandan/repos/linux/fs/btrfs/extent-tree.c:4303 btrfs_free_reserved_data_space_noquota+0xe8/0x100
>>>
>>> [ ... ]
>>>
>>> Ok, the problem is in how we're dealing with the offset into the sector when
>>> we fail. The dirty_sectors variable already has this accounted in it, so
>>> this patch fixes it for me. I ran overnight, but I'll let it go for a few
>>> days just to make sure:
>>>
>>> diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
>>> index fac9b839..5842423 100644
>>> --- a/fs/btrfs/file.c
>>> +++ b/fs/btrfs/file.c
>>> @@ -1629,13 +1629,11 @@ again:
>>> * managed to copy.
>>> */
>>> if (num_sectors > dirty_sectors) {
>>> - /*
>>> - * we round down because we don't want to count
>>> - * any partial blocks actually sent through the
>>> - * IO machines
>>> - */
>>> - release_bytes = round_down(release_bytes - copied,
>>> - root->sectorsize);
>>> +
>>> + /* release everything except the sectors we dirtied */
>>> + release_bytes -= dirty_sectors <<
>>> + root->fs_info->sb->s_blocksize_bits;
>>> +
>>> if (copied > 0) {
>>> spin_lock(&BTRFS_I(inode)->lock);
>>> BTRFS_I(inode)->outstanding_extents++;
>>>
>>
>> Since I guess you are testing this on latest git code I started to test on latest stable.
>
> Any v4.7-rc or v4.6 stable where the patch applies ;)
>
>>
>> Until now all seems file .. your test program is still running without to trigger the bug.
>>
>> Also thunderbird is running without to trigger the bug.
>>
>> I let it run overnight and report back.
>
> Great, thanks!
After 24h of running the program and thundirbird all is still fine here.
I let it run one more day.. But looks very good.
Regards,
Gabriel
next prev parent reply other threads:[~2016-07-20 17:51 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-07 10:24 A lot warnings in dmesg while running thunderbird Gabriel C
2016-07-07 19:21 ` Chris Mason
2016-07-08 9:57 ` Gabriel C
2016-07-08 12:41 ` Chris Mason
2016-07-08 14:05 ` Gabriel C
2016-07-08 15:02 ` Gabriel C
2016-07-08 16:02 ` Chris Mason
2016-07-08 18:21 ` Adam Borowski
2016-07-08 21:47 ` Adam Borowski
2016-07-08 18:23 ` Duncan
2016-07-11 5:58 ` Chandan Rajendra
2016-07-11 10:51 ` Chris Mason
2016-07-19 11:05 ` Chris Mason
2016-07-20 0:11 ` Gabriel C
2016-07-20 13:50 ` Chris Mason
2016-07-20 17:50 ` Gabriel C [this message]
2016-07-21 12:56 ` Chris Mason
2016-07-21 21:25 ` Gabriel C
2016-07-22 0:53 ` Adam Borowski
2016-07-25 0:36 ` Dave Chinner
2016-08-01 15:23 ` Chris Mason
2016-07-15 19:35 ` Chris Mason
2016-07-15 21:08 ` Chris Mason
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=2ce1eb99-2e9f-f9cb-7601-6e67301979cd@gmail.com \
--to=nix.or.die@gmail.com \
--cc=chandan@linux.vnet.ibm.com \
--cc=clm@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.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).