linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 15:32:32 -0600	[thread overview]
Message-ID: <CAJCQCtSLVF8JP_KvFrwsrDDf76b2meS9HjN+ant+d3FbY-9H+Q@mail.gmail.com> (raw)
In-Reply-To: <72230e2d-022c-12bd-cd56-9d728989157d@gmail.com>

On Wed, Jul 18, 2018 at 12:01 PM, Austin S. Hemmelgarn
<ahferroin7@gmail.com> wrote:
> On 2018-07-18 13:40, Chris Murphy wrote:
>>
>> On Wed, Jul 18, 2018 at 11:14 AM, Chris Murphy <lists@colorremedies.com>
>> wrote:
>>
>>> 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?
>>
>>
>> Previous thread is "Problem with file system" from August 2017. And
>> there's these reproduce steps from Austin which have fallocate coming
>> after the dd.
>>
>>      truncate --size=4G ./test-fs
>>      mkfs.btrfs ./test-fs
>>      mkdir ./test
>>      mount -t auto ./test-fs ./test
>>      dd if=/dev/zero of=./test/test bs=65536 count=32768
>>      fallocate -l 2147483650 ./test/test && echo "Success!"
>>
>>
>> My test Btrfs is 2G not 4G, so I'm cutting the values of dd and
>> fallocate in half.
>>
>> [chris@f28s btrfs]$ sudo dd if=/dev/zero of=tmp bs=1M count=1000
>> 1000+0 records in
>> 1000+0 records out
>> 1048576000 bytes (1.0 GB, 1000 MiB) copied, 7.13391 s, 147 MB/s
>> [chris@f28s btrfs]$ sync
>> [chris@f28s btrfs]$ df -h
>> Filesystem                Size  Used Avail Use% Mounted on
>> /dev/mapper/vg-btrfstest  2.0G 1018M  1.1G  50% /mnt/btrfs
>> [chris@f28s btrfs]$ sudo fallocate -l 1000m tmp
>>
>>
>> Succeeds. If I do it with a 1200M file for dd and fallocate 1200M over
>> it, this fails, but I kinda expect that because there's only 1.1G free
>> space. But maybe that's what you're saying is the bug, it shouldn't
>> fail?
>
> Yes, you're right, I had things backwards (well, kind of, this does work on
> ext4 and regular XFS, so it arguably should work here).

I guess I'm confused what it even means to fallocate over a file with
in-use blocks unless either -d or -p options are used. And from the
man page, I don't grok the distinction between -d and -p either. But
based on their descriptions I'd expect they both should work without
enospc.

-- 
Chris Murphy

  reply	other threads:[~2018-07-18 22:12 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
2018-07-18 17:40                     ` Chris Murphy
2018-07-18 18:01                       ` Austin S. Hemmelgarn
2018-07-18 21:32                         ` Chris Murphy [this message]
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=CAJCQCtSLVF8JP_KvFrwsrDDf76b2meS9HjN+ant+d3FbY-9H+Q@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).