From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>,
kreijack@inwind.it, linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [btrfs-progs] Bug in mkfs.btrfs -r
Date: Fri, 1 Sep 2017 19:54:46 +0800 [thread overview]
Message-ID: <4332f4a4-1ba8-a13c-7f3b-77c56b87eaed@gmx.com> (raw)
In-Reply-To: <6faf4ff6-6913-bfce-6e48-f161452a713a@gmail.com>
On 2017年09月01日 19:28, Austin S. Hemmelgarn wrote:
> On 2017-08-31 20:13, Qu Wenruo wrote:
>>
>>
>> On 2017年09月01日 01:27, Goffredo Baroncelli wrote:
>>> Hi All,
>>>
>>>
>>> I found a bug in mkfs.btrfs, when it is used the option '-r'. It
>>> seems that it is not visible the full disk.
>>
>> Despite the new bug you found, -r has several existing bugs.
> Is this actually a bug though? Every other filesystem creation tool
> that I know of that offers functionality like this generates the
> filesystem just large enough to contain the data you want in it,
At least I tried mkfs.ext4 with an almost empty directory (only one 512K
file),
After mount the fs, there is still over 900M available space.
Even mkfs.ext4 doesn't explain much about its -d option, I think it's
not the case, at least for -d option alone.
Thanks,
Qu
> so I
> would argue that making this use the whole device is actually breaking
> consistency with other tools, not to mention removing functionality that
> is useful (even aside from the system image generation use case I
> mentioned, there are other practical applications (seed 'device'
> generation comes to mind).
>>
>> For example it will create dev extent starting from physical offset 0,
>> while kernel and mkfs will avoid that range, as 0~1M on each device is
>> reserved.
>>
>> According to the code, -r will modify chunk layout by itself, not the
>> traditional way kernel is doing.
>>
>> I'll fix them (if I'm not a lazybone), before that fix, please don't
>> use -r option as it's not well maintained or fully tested.
> FWIW, based on my own testing, filesystems generated with '-r' work just
> fine as long as you don't try to embed boot code in the FS itself.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2017-09-01 11:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 17:27 [btrfs-progs] Bug in mkfs.btrfs -r Goffredo Baroncelli
2017-08-31 18:49 ` Austin S. Hemmelgarn
2017-08-31 20:29 ` Goffredo Baroncelli
2017-09-01 11:49 ` Austin S. Hemmelgarn
2017-09-01 0:13 ` Qu Wenruo
2017-09-01 11:28 ` Austin S. Hemmelgarn
2017-09-01 11:49 ` Qu Wenruo
2017-09-01 12:05 ` Austin S. Hemmelgarn
2017-09-01 12:19 ` Qu Wenruo
2017-09-01 12:47 ` Austin S. Hemmelgarn
2017-09-01 13:54 ` Qu Wenruo
2017-09-01 14:07 ` Austin S. Hemmelgarn
2017-09-02 4:03 ` Duncan
2017-09-05 3:57 ` Duncan
2017-09-01 11:54 ` Qu Wenruo [this message]
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=4332f4a4-1ba8-a13c-7f3b-77c56b87eaed@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=ahferroin7@gmail.com \
--cc=kreijack@inwind.it \
--cc=linux-btrfs@vger.kernel.org \
/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).