All of lore.kernel.org
 help / color / mirror / Atom feed
From: hopper@omnifarious.org
To: linux-btrfs@vger.kernel.org
Subject: Re: Rendering a btrfs filesystem unmountable with the btrfs command
Date: Tue, 15 Jan 2013 14:06:01 -0800	[thread overview]
Message-ID: <20130115220601.GD18291@omnifarious.org> (raw)
In-Reply-To: <20130115204436.GC18291@omnifarious.org>

[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]

On Tue, Jan 15, 2013 at 12:44:36PM -0800, hopper@omnifarious.org wrote:
> Help!  BTW, I'm not a mailing list subscriber.

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.

----------------------------
diff -ur kernel-3.7.fc17.orig/linux-3.7.2-201.fc17.x86_64/fs/btrfs/qgroup.c kernel-3.7.fc17/linux-3.7.2-201.fc17.x86_64/fs/btrfs/qgroup.c
--- kernel-3.7.fc17.orig/linux-3.7.2-201.fc17.x86_64/fs/btrfs/qgroup.c	2012-12-10 19:30:57.000000000 -0800
+++ kernel-3.7.fc17/linux-3.7.2-201.fc17.x86_64/fs/btrfs/qgroup.c	2013-01-15 14:02:39.643630137 -0800
@@ -379,8 +379,13 @@
 
 		ret = add_relation_rb(fs_info, found_key.objectid,
 				      found_key.offset);
-		if (ret)
+		/* Failing to add a relation because one side or the other
+		 * doesn't exist isn't a fatal error here. */
+		if (ret) {
+			if (ret == -ENOENT)
+				ret = ENOENT;
 			goto out;
+		}
 next2:
 		ret = btrfs_next_item(quota_root, path);
 		if (ret < 0)
----------------------------


-- 
"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 --]

  reply	other threads:[~2013-01-15 22:06 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 [this message]
2013-01-16 15:42   ` Eric Hopper
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=20130115220601.GD18291@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 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.