From: Eric Hopper <hopper@omnifarious.org>
To: linux-btrfs@vger.kernel.org
Subject: Re: Rendering a btrfs filesystem unmountable with the btrfs command
Date: Wed, 16 Jan 2013 07:42:16 -0800 [thread overview]
Message-ID: <20130116154216.GE18291@omnifarious.org> (raw)
In-Reply-To: <20130115220601.GD18291@omnifarious.org>
[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]
On Tue, Jan 15, 2013 at 02:06:01PM -0800, hopper@omnifarious.org wrote:
> Here is a sample fix that I believe will allow the offending filesystem
> to at least be mounted. It hasn't been tested at all.
I got this patch into a kernel and tested it. It does indeed allow the
offending filesystem to be mounted. I'm not convinced it's the best
possible patch. Perhaps instead the place where the return value of the
function that's being patched is used should be changed instead.
Here is some data showing what the problem is...
# btrfs qgroup show .
0/266 97579008 97579008
0/268 97640448 97640448
1/1 97619968 97619968
# btrfs-debug-tree /dev/sdb3 | fgrep QGROUP_RELATION_KEY
item 7 key (0/266 BTRFS_QGROUP_RELATION_KEY 1/0) itemoff 3723 itemsize 0
item 8 key (0/266 BTRFS_QGROUP_RELATION_KEY 1/1) itemoff 3723 itemsize 0
item 9 key (0/267 BTRFS_QGROUP_RELATION_KEY 1/0) itemoff 3723 itemsize 0
item 10 key (0/268 BTRFS_QGROUP_RELATION_KEY 1/0) itemoff 3723 itemsize 0
item 11 key (0/268 BTRFS_QGROUP_RELATION_KEY 1/1) itemoff 3723 itemsize 0
item 12 key (1/0 BTRFS_QGROUP_RELATION_KEY 0/266) itemoff 3723 itemsize 0
item 13 key (1/0 BTRFS_QGROUP_RELATION_KEY 0/267) itemoff 3723 itemsize 0
item 14 key (1/0 BTRFS_QGROUP_RELATION_KEY 0/268) itemoff 3723 itemsize 0
item 15 key (1/1 BTRFS_QGROUP_RELATION_KEY 0/266) itemoff 3723 itemsize 0
item 16 key (1/1 BTRFS_QGROUP_RELATION_KEY 0/268) itemoff 3723 itemsize 0
Notice how there are a whole bunch of QGROUP_RELATION_KEY records that
refer to qgroups that no longer exist (1/0 and 0/267). This is because
a qgroup destroy was done on these qgroups but the corresponding
QGROUP_RELATION_KEY records were not removed.
--
"They who can give up essential liberty to obtain a little temporary
safety, deserve neither liberty nor safety." -- Benjanmin Franklin
-- Eric Hopper (http://www.omnifarious.org/~hopper) --
[-- Attachment #2: Type: application/pgp-signature, Size: 665 bytes --]
next prev parent reply other threads:[~2013-01-16 15:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 20:44 Rendering a btrfs filesystem unmountable with the btrfs command hopper
2013-01-15 22:06 ` hopper
2013-01-16 15:42 ` Eric Hopper [this message]
2013-01-17 8:26 ` Arne Jansen
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=20130116154216.GE18291@omnifarious.org \
--to=hopper@omnifarious.org \
--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).