From: Eric Sandeen <sandeen@redhat.com>
To: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org, chris.mason@fusionio.com
Subject: Re: [PATCH 0/2] btrfs-progs: prevent mkfs from aborting with small volume
Date: Thu, 29 Aug 2013 11:11:50 -0500 [thread overview]
Message-ID: <521F72C6.3040600@redhat.com> (raw)
In-Reply-To: <521D842D.6020100@jp.fujitsu.com>
On 8/28/13 12:01 AM, Hidetoshi Seto wrote:
> (2013/08/26 23:23), Eric Sandeen wrote:
>> Thanks for looking into this - how small of a device did you test?
>>
>> I tried a 2MB device w/ these 2 patches and still got:
>>
>> [btrfs-progs]# truncate --size=2m testfile
>> [btrfs-progs]# ./mkfs.btrfs testfile
>>
>> WARNING! - Btrfs v0.20-rc1-360-geeeb4e9 IS EXPERIMENTAL
>> WARNING! - see http://btrfs.wiki.kernel.org before using
>>
>> SMALL VOLUME: forcing mixed metadata/data groups
>> mkfs.btrfs: volumes.c:857: btrfs_alloc_chunk: Assertion `!(ret)' failed.
>> Aborted (core dumped)
>>
>> which was at:
>>
>> ret = btrfs_alloc_dev_extent(trans, device,
>> info->chunk_root->root_key.objectid,
>> BTRFS_FIRST_CHUNK_TREE_OBJECTID, key.offset,
>> calc_size, &dev_offset);
>> BUG_ON(ret);
>>
>> :(
>
> Wow...
> It seems that this abort is different problem from the bug which
> my patches are going to fix. I'll try to make new patch to fix this
> problem.
>
>>
>> Also, I'm curious - I know the code existed before your patch 2/2,
>> but I don't understand why it reserves 1MB for the first superblock
>> when the first superblock is actually at 64k. Any idea?
>>
>> -Eric
>
> I'm not sure... According to the git-log, this 1M trick is in
> the following old commit by Chris:
>
> commit a6de0bd778475504f42a142c83b8077993cbddfe
> Author: Chris Mason <chris.mason@oracle.com>
> Date: Thu Apr 3 16:35:48 2008 -0400
>
> Add mirroring support across multiple drives
Yep I saw that too. Seemingly unrelated. :( Unless I'm missing
something (which I probably am).
-Eric
>
> Thanks,
> H.Seto
>
next prev parent reply other threads:[~2013-08-29 16:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 6:28 [PATCH 0/2] btrfs-progs: prevent mkfs from aborting with small volume Hidetoshi Seto
2013-08-23 6:30 ` [PATCH 1/2] btrfs-progs: treat reserved 1MB for superblock properly Hidetoshi Seto
2013-08-23 6:31 ` [PATCH 2/2] btrfs-progs: exit if there is not enough free space for mkfs Hidetoshi Seto
2013-08-26 14:23 ` [PATCH 0/2] btrfs-progs: prevent mkfs from aborting with small volume Eric Sandeen
2013-08-28 5:01 ` Hidetoshi Seto
2013-08-29 16:11 ` Eric Sandeen [this message]
2013-08-30 23:10 ` David Sterba
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=521F72C6.3040600@redhat.com \
--to=sandeen@redhat.com \
--cc=chris.mason@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=seto.hidetoshi@jp.fujitsu.com \
/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).