From: Adam Borowski <kilobyte@angband.pl>
To: "Chris Mason" <clm@fb.com>,
linux-btrfs@vger.kernel.org, dsj@fb.com,
"Jakob Schürz" <wertstoffe@nurfuerspam.de>,
"Christian Borntraeger" <borntraeger@de.ibm.com>,
"Markus Trippelsdorf" <markus@trippelsdorf.de>
Subject: Re: [PATCH] Btrfs: fix handling of faults from btrfs_copy_from_user
Date: Tue, 17 May 2016 23:57:07 +0200 [thread overview]
Message-ID: <20160517215707.GA9430@angband.pl> (raw)
In-Reply-To: <20160517210049.cjqryttwjxgsszkv@floor.thefacebook.com>
On Tue, May 17, 2016 at 05:00:49PM -0400, Chris Mason wrote:
> On Tue, May 17, 2016 at 10:47:27PM +0200, Adam Borowski wrote:
> > > Hmmm, some of your traces mentioned compression, do you have compression
> > > enabled?
> >
> > Yeah, I mount with noatime,compress=lzo.
> >
> > > Also, if you can gdb your vmlinux (or btrfs.ko) and find this line:
> > >
> > > gdb> list *__btrfs_buffered_write+0x748
> >
> > 0xffffffff8152eb78 is in __btrfs_buffered_write (fs/btrfs/file.c:1564).
> > 1559
> > 1560 reserve_metadata:
> > 1561 ret = btrfs_delalloc_reserve_metadata(inode, reserve_bytes);
> > 1562 if (ret) {
> > 1563 if (!only_release_metadata)
> > 1564 btrfs_free_reserved_data_space(inode, pos,
> > 1565 write_bytes);
> > 1566 else
> > 1567 btrfs_end_write_no_snapshoting(root);
> > 1568 break;
> >
>
> Aha, so you're getting an enospc with compression on and the accounting
> doesn't line up. I should be able to trigger this.
This partition was fully balanced just a few days ago so I didn't even think
to look at df.
[~]# df -h
/dev/sda1 216G 161G 53G 76% /
[~]# btrfs files df /
Data, single: total=209.12GiB, used=156.46GiB
System, single: total=32.00MiB, used=48.00KiB
Metadata, single: total=6.00GiB, used=3.51GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
However, after partially balancing it a bit:
[~]# btrfs files df /
Data, single: total=172.00GiB, used=156.03GiB
System, single: total=32.00MiB, used=48.00KiB
Metadata, single: total=5.00GiB, used=3.50GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
I can't reproduce the failure anymore.
--
A tit a day keeps the vet away.
next prev parent reply other threads:[~2016-05-17 21:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-16 21:06 [PATCH] Btrfs: fix handling of faults from btrfs_copy_from_user Chris Mason
2016-05-17 15:14 ` Adam Borowski
2016-05-17 16:23 ` Chris Mason
2016-05-17 20:47 ` Adam Borowski
2016-05-17 21:00 ` Chris Mason
2016-05-17 21:57 ` Adam Borowski [this message]
2016-05-17 22:01 ` Chris Mason
2016-05-19 20:10 ` Chris Mason
2016-05-19 20:21 ` Adam Borowski
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=20160517215707.GA9430@angband.pl \
--to=kilobyte@angband.pl \
--cc=borntraeger@de.ibm.com \
--cc=clm@fb.com \
--cc=dsj@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=markus@trippelsdorf.de \
--cc=wertstoffe@nurfuerspam.de \
/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