From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Marat Khalili <mkh@rqc.ru>,
kreijack@inwind.it, linux-btrfs@vger.kernel.org
Cc: pwm <pwm@iapetus.neab.net>, Hugo Mills <hugo@carfax.org.uk>
Subject: Re: Massive loss of disk space
Date: Thu, 3 Aug 2017 13:25:34 -0400 [thread overview]
Message-ID: <2face7a2-2992-d3ad-01f6-8e167bc9d55e@gmail.com> (raw)
In-Reply-To: <AAADF381-631F-4630-B855-46A1658498B2@rqc.ru>
On 2017-08-03 13:15, Marat Khalili wrote:
> On August 3, 2017 7:01:06 PM GMT+03:00, Goffredo Baroncelli
>> The file is physically extended
>>
>> ghigo@venice:/tmp$ fallocate -l 1000 foo.txt
>
> For clarity let's replace the fallocate above with:
> $ head -c 1000 </dev/urandom >foo.txt
>
>> ghigo@venice:/tmp$ ls -l foo.txt
>> -rw-r--r-- 1 ghigo ghigo 1000 Aug 3 18:00 foo.txt
>> ghigo@venice:/tmp$ fallocate -o 500 -l 1000 foo.txt
>> ghigo@venice:/tmp$ ls -l foo.txt
>> -rw-r--r-- 1 ghigo ghigo 1500 Aug 3 18:00 foo.txt
>> ghigo@venice:/tmp$
>
> According to explanation by Austin the foo.txt at this point somehow occupies 2000 bytes of space because I can reflink it and then write another 1000 bytes of data into it without losing 1000 bytes I already have or getting out of drive space. (Or is it only true while there are open file handles?)
>
OK, I think there may be some misunderstanding here. By 'CoW unwritten
extents', I mean that when we write to the extent, a CoW operation
happens, instead of the data being written directly into the extent. In
this case, it has nothing to do with reflinking, and Goffredo is correct
that if your filesystem is small enough, the second fallocate will fail
there.
next prev parent reply other threads:[~2017-08-03 17:25 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 11:43 Massive loss of disk space pwm
2017-08-01 12:20 ` Hugo Mills
2017-08-01 14:39 ` pwm
2017-08-01 14:47 ` Austin S. Hemmelgarn
2017-08-01 15:00 ` Austin S. Hemmelgarn
2017-08-01 15:24 ` pwm
2017-08-01 15:45 ` Austin S. Hemmelgarn
2017-08-01 16:50 ` pwm
2017-08-01 17:04 ` Austin S. Hemmelgarn
2017-08-02 17:52 ` Goffredo Baroncelli
2017-08-02 19:10 ` Austin S. Hemmelgarn
2017-08-02 21:05 ` Goffredo Baroncelli
2017-08-03 11:39 ` Austin S. Hemmelgarn
2017-08-03 16:37 ` Goffredo Baroncelli
2017-08-03 17:23 ` Austin S. Hemmelgarn
2017-08-04 14:45 ` Goffredo Baroncelli
2017-08-04 15:05 ` Austin S. Hemmelgarn
2017-08-03 3:48 ` Duncan
2017-08-03 11:44 ` Marat Khalili
2017-08-03 11:52 ` Austin S. Hemmelgarn
2017-08-03 16:01 ` Goffredo Baroncelli
2017-08-03 17:15 ` Marat Khalili
2017-08-03 17:25 ` Austin S. Hemmelgarn [this message]
2017-08-03 22:51 ` pwm
2017-08-02 4:14 ` Duncan
2017-08-02 11:18 ` 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=2face7a2-2992-d3ad-01f6-8e167bc9d55e@gmail.com \
--to=ahferroin7@gmail.com \
--cc=hugo@carfax.org.uk \
--cc=kreijack@inwind.it \
--cc=linux-btrfs@vger.kernel.org \
--cc=mkh@rqc.ru \
--cc=pwm@iapetus.neab.net \
/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).