From: Jan Schmidt <list.btrfs@jan-o-sch.net>
To: miaox@cn.fujitsu.com
Cc: Chris Mason <chris.mason@oracle.com>,
Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [RFC][PATCH 1/2] Btrfs: try to allocate new chunks with degenerated profile
Date: Fri, 20 Jan 2012 11:36:48 +0100 [thread overview]
Message-ID: <4F1943C0.9080404@jan-o-sch.net> (raw)
In-Reply-To: <4F17B108.1020103@cn.fujitsu.com>
On 19.01.2012 06:58, Miao Xie wrote:
> On wed, 18 Jan 2012 11:12:20 +0100, Jan Schmidt wrote:
>> On 17.01.2012 21:58, Chris Mason wrote:
>>> These two didn't make my first pull request just because I wanted to get
>>> something out the door. I'll definitely have them in the next pull.
>>
>> Please, don't do that! You can't just degenerate to DUP when RAID1 is
>> out of space, that's entirely different.
>>
>> It's debatable whether degeneration from RAID0 to single is acceptable,
>> but that again has different characteristics.
>>
>> ENOSPC is the best choice for both in my opinon.
>
> I understand what you said, but in fact, the free space allocator can degenerate
> the profile if it doesn't find enough free space. This patch just follows the
> rule which exists in the current code.
I'm not sure what you mean with "free space allocation". In my
understanding, new "free" space is made available by allocating a new
chunk, and that's what you're suggesting to change. What am I missing here?
Calculation of free space like for df output is known to be at least
unintuitive (I'd say wrong). We'd better fix that.
Space reservation may be wrongly assuming it can use the whole disk. If
that's the case, we must fix it.
> Maybe adding a new mount option is another good option.
I don't think so. If you want RAID-1, you get RAID-1, i.e. every stripe
on two disks. If you're okay with DUP, use DUP. But even with a mount
option, degeneration would still go silent and you'd never know which
part of your data would survive a single disk failure.
Think of degenration of your metadata profile to DUP: Suddenly, your
most recent extent tree wouldn't survive a single disk failure.
In my opinion, we're responsible not to offer any dangerous (mount)
options that can make users lose data eventually. Even if we can point
them to the documentation (which they didn't read) that explains the
risks of that option.
-Jan
next prev parent reply other threads:[~2012-01-20 10:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 10:02 [RFC][PATCH 1/2] Btrfs: try to allocate new chunks with degenerated profile Miao Xie
2012-01-17 20:58 ` Chris Mason
2012-01-18 10:12 ` Jan Schmidt
2012-01-18 12:41 ` Hugo Mills
2012-01-18 13:42 ` Roman Kapusta
2012-01-19 5:58 ` Miao Xie
2012-01-20 10:36 ` Jan Schmidt [this message]
2012-01-18 10:14 ` Arne Jansen
2012-01-18 12:34 ` 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=4F1943C0.9080404@jan-o-sch.net \
--to=list.btrfs@jan-o-sch.net \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=miaox@cn.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.