From: Anand Jain <Anand.Jain@oracle.com>
To: kreijack@inwind.it, Lutz Vieweg <lvml@5t9.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Mixed and raid [was Re: BUG: btrfsRe: Does btrfs "raid1" actually provide any resilience?]
Date: Fri, 15 Nov 2013 12:44:31 +0800 [thread overview]
Message-ID: <5285A6AF.8090607@oracle.com> (raw)
In-Reply-To: <52853ED2.8040606@libero.it>
Hi G.Baroncelli, Lutz,
Thanks for the test case and heads-up on this. The code missed
the check if the user has provided the option before default
profile for the mixed group (due to small vol) is enforced.
I have sent out the following patch to fix it.
[PATCH] btrfs-progs: for mixed group check opt before default raid
profile is enforced
Kindly let us know how it performed if you could.
Thanks,
Anand
On 11/15/2013 05:21 AM, Goffredo Baroncelli wrote:
> Hi Anand,
>
> after some tests and looking at the code I discovered that the current
> mkfs.btrfs doesn't allow any raid profile other than SINGLE for data and
> meta-data when the mixed metadata/data group is enabled. It seems this
> behaviour was introduce by a your commit [1].
>
>
> mkfs.c line 1384 onwards
>
> /*
> * Set default profiles according to number of added devices.
> * For mixed groups defaults are single/single.
> */
> if (!mixed) {
> [....]
> } else {
> u32 best_leafsize = max_t(u32, sysconf(_SC_PAGESIZE),
> sectorsize);
> metadata_profile = 0;
> data_profile = 0;
>
>
> But in another your commit [2] it seems that you check that in case of
> mixed, the metadata and data profile have to be equal (implicitly
> allowing that they could be different than single ?).
>
> mkfs.c line 1373 onward
>
> if (is_vol_small(file)) {
> printf("SMALL VOLUME: forcing mixed metadata/data
> groups\n");
> mixed = 1;
> if (metadata_profile != data_profile) {
> if (metadata_profile_opt || data_profile_opt) {
> fprintf(stderr, "With mixed block
> groups data and metadata profiles must be the same\n");
> exit(1);
> }
> }
> }
>
>
> So I am a bit confusing: it is allowed a raid profile different than
> single when the mixed is enabled ? Of course mixed and raid together
> doesn't make sense (or almost make very little sense) but the code of
> mkfs is a bit confused, and a warning should be raised when the raid
> profile are forced to a default different from the one selected by the user.
>
>
> Thanks for the attention.
> BR
> G.Baroncelli
>
>
> [1] btrfs-progs: avoid write to the disk before sure to create fs
> 71d6bd3c8d70fb682c7fd50796f587ce1f1cf6f8
> .
> [2] btrfs-progs: mkfs should check for small vol well before
> cdbc10729266c03aeb2eb812c17a3ef6c1ceae26
>
next prev parent reply other threads:[~2013-11-15 4:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 11:02 Does btrfs "raid1" actually provide any resilience? Lutz Vieweg
2013-11-14 17:18 ` George Mitchell
2013-11-14 17:35 ` Lutz Vieweg
2013-11-14 19:59 ` Kyle Gates
2013-11-15 1:58 ` George Mitchell
2013-11-14 18:22 ` Goffredo Baroncelli
2013-11-14 20:47 ` BUG: btrfsRe: " Goffredo Baroncelli
2013-11-14 21:21 ` Mixed and raid [was Re: BUG: btrfsRe: Does btrfs "raid1" actually provide any resilience?] Goffredo Baroncelli
2013-11-15 4:44 ` Anand Jain [this message]
2013-11-15 10:35 ` Lutz Vieweg
2013-11-15 10:36 ` Lutz Vieweg
2013-11-15 7:12 ` Duncan
2013-11-15 7:30 ` Goffredo Baroncelli
2013-11-15 9:37 ` Duncan
2013-11-14 21:22 ` BUG: btrfsRe: Does btrfs "raid1" actually provide any resilience? Chris Murphy
2013-11-14 21:31 ` Goffredo Baroncelli
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=5285A6AF.8090607@oracle.com \
--to=anand.jain@oracle.com \
--cc=kreijack@inwind.it \
--cc=linux-btrfs@vger.kernel.org \
--cc=lvml@5t9.de \
/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).