From: Chris Murphy <lists@colorremedies.com>
To: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
Cc: Chris Murphy <lists@colorremedies.com>,
Martin Steigerwald <martin@lichtvoll.de>,
Nikolay Borisov <nborisov@suse.com>, Wolf <wolf@wolfsden.cz>,
Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Healthy amount of free space?
Date: Wed, 18 Jul 2018 11:14:01 -0600 [thread overview]
Message-ID: <CAJCQCtQrY2rz0CTntCO9szii7SveshtSMgCPz4JQqq16kfATNw@mail.gmail.com> (raw)
In-Reply-To: <0a3a8550-3622-0c7b-bcf7-e2d7cabf6b4a@gmail.com>
On Wed, Jul 18, 2018 at 11:06 AM, Austin S. Hemmelgarn
<ahferroin7@gmail.com> wrote:
> On 2018-07-18 13:04, Chris Murphy wrote:
>>
>> On Wed, Jul 18, 2018 at 7:30 AM, Austin S. Hemmelgarn
>> <ahferroin7@gmail.com> wrote:
>>
>>>
>>> I'm not sure. In this particular case, this will fail on BTRFS for any X
>>> larger than just short of one third of the total free space. I would
>>> expect
>>> it to fail for any X larger than just short of half instead.
>>
>>
>> I'm confused. I can't get it to fail when X is 3/4 of free space.
>>
>> lvcreate -V 2g -T vg/thintastic -n btrfstest
>> mkfs.btrfs -M /dev/mapper/vg-btrfstest
>> mount /dev/mapper/vg-btrfstest /mnt/btrfs
>> cd /mnt/btrfs
>> fallocate -l 1500m tmp
>> dd if=/dev/zero of=/mnt/btrfs/tmp bs=1M count=1450
>>
>> Succeeds. No enospc. This is on kernel 4.17.6.
>
> Odd, I could have sworn it would fail reliably. Unless something has
> changed since I last tested though, doing it with X equal to the free space
> on the filesystem will fail.
OK well X is being defined twice here so I can't tell if I'm doing
this correctly. There's fallocate X and that's 75% of free space for
the empty fs at the time of fallocate.
And then there's dd which is 1450m which is ~2.67x the free space at
the time of dd.
I don't know for sure, but based on the addresses reported before and
after dd for the fallocated tmp file, it looks like Btrfs is not using
the originally fallocated addresses for dd. So maybe it is COWing into
new blocks, but is just as quickly deallocating the fallocated blocks
as it goes, and hence doesn't end up in enospc?
--
Chris Murphy
next prev parent reply other threads:[~2018-07-18 17:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-16 20:58 Healthy amount of free space? Wolf
2018-07-17 7:20 ` Nikolay Borisov
2018-07-17 8:02 ` Martin Steigerwald
2018-07-17 8:16 ` Nikolay Borisov
2018-07-17 17:54 ` Martin Steigerwald
2018-07-18 12:35 ` Austin S. Hemmelgarn
2018-07-18 13:07 ` Chris Murphy
2018-07-18 13:30 ` Austin S. Hemmelgarn
2018-07-18 17:04 ` Chris Murphy
2018-07-18 17:06 ` Austin S. Hemmelgarn
2018-07-18 17:14 ` Chris Murphy [this message]
2018-07-18 17:40 ` Chris Murphy
2018-07-18 18:01 ` Austin S. Hemmelgarn
2018-07-18 21:32 ` Chris Murphy
2018-07-18 21:47 ` Chris Murphy
2018-07-19 11:21 ` Austin S. Hemmelgarn
2018-07-20 5:01 ` Andrei Borzenkov
2018-07-20 11:36 ` Austin S. Hemmelgarn
2018-07-17 11:46 ` Austin S. Hemmelgarn
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=CAJCQCtQrY2rz0CTntCO9szii7SveshtSMgCPz4JQqq16kfATNw@mail.gmail.com \
--to=lists@colorremedies.com \
--cc=ahferroin7@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=martin@lichtvoll.de \
--cc=nborisov@suse.com \
--cc=wolf@wolfsden.cz \
/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).