From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Cc: <dsterba@suse.com>
Subject: [PATCH 0/4] Metadata crossing stripe boundary fixes
Date: Thu, 23 Jul 2015 17:18:06 +0800 [thread overview]
Message-ID: <1437643090-13920-1-git-send-email-quwenruo@cn.fujitsu.com> (raw)
The problem is originally reported by Chris Murphy<lists@colorremedies.com>,
and Zhao Lei digs out the root cause:
Metadata extent in mixed block group may cross stripe boundary, causing
scrub can't handle them.
For normal data/metadata separated case, as BTRFS_STRIPE_LEN(64K) can
always be divided by nodesize (4~64K, power of 2), so metadata will
never cross the stripe boundary.
But for mixed block group, data is page size(4K) aligned, breaking the
original metadata alignment, make metadata extent possible to cross
stripe boundary.
In the patchset, btrfsck will report such error and normal extent
allocate routine along with btrfs-convert will be patched to fix such
problem.
I'd like to add a test case, but it is already covered by the existing
convert test, and further more, btrfsck can only report the error with
only the 2nd patch applied.
So no good test case yet.
Kernel also needs such check, I'll check kernel codes later.
Qu Wenruo (4):
btrfs: print-tree: print stripe len of a chunk
btrfs: fsck: Check if a metadata tree block crossing stripe boundary
btrfs: extent-tree: Avoid allocating tree block that cross stripe
boundary
btrfs: convert: Avoid allocating metadata extent crossing stripe
boundary
btrfs-convert.c | 15 ++++++++++++---
cmds-check.c | 28 +++++++++++++++++++++++++++-
ctree.h | 2 +-
extent-tree.c | 7 ++++++-
print-tree.c | 4 +++-
volumes.h | 10 ++++++++++
6 files changed, 59 insertions(+), 7 deletions(-)
--
2.4.6
next reply other threads:[~2015-07-23 9:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 9:18 Qu Wenruo [this message]
2015-07-23 9:18 ` [PATCH 1/4] btrfs: print-tree: print stripe len of a chunk Qu Wenruo
2015-07-23 9:18 ` [PATCH 2/4] btrfs: fsck: Check if a metadata tree block crossing stripe boundary Qu Wenruo
2015-07-23 9:18 ` [PATCH 3/4] btrfs: extent-tree: Avoid allocating tree block that cross " Qu Wenruo
2015-07-23 9:18 ` [PATCH 4/4] btrfs: convert: Avoid allocating metadata extent crossing " Qu Wenruo
2015-07-24 12:34 ` David Sterba
2015-07-25 1:18 ` Qu Wenruo
2015-07-27 13:40 ` David Sterba
2015-07-24 12:35 ` [PATCH 0/4] Metadata crossing stripe boundary fixes 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=1437643090-13920-1-git-send-email-quwenruo@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=dsterba@suse.com \
--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).